LinuxMCE Forums
May 24, 2013, 02:17:42 am GMT-1 *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Rule #1 - Be Patient - Rule #2 - Don't ask when, if you don't contribute - Rule #3 - You have coding skills - LinuxMCE's small brother is available: http://www.agocontrol.com
 
   Home   Help Search Chat Login Register  
Pages: [1] 2
  Print  
Author Topic: New Onkyo device  (Read 3004 times)
WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« on: July 18, 2011, 06:06:32 pm »

So, I recently picked up a new Onkyo receiver that has an Ethernet port instead of the serial. This makes it much easier to hook up to my LinuxMCE system but I now need to create the new device and I have two questions.

First, how can I copy the old device to a new one? All the same items apply and I was hoping to shortcut things a little bit.

Second, it appears that the same connection type can be used since it supports both serial and network connections but how do I send binary data? The string values are the same but there is a bunch of header/footer information that needs sent in a binary format.

Thanks!
Logged

merkur2k
Addicted
*
Posts: 513


View Profile
« Reply #1 on: July 19, 2011, 07:19:38 am »

there is no way to copy an existing template unfortunately, other than manually. and i dont think its possible to have a single template describe two connection methods.
while i have not done so myself, there should be a way to send hex values in ruby.
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #2 on: July 19, 2011, 09:26:22 am »

Hex works nicely, as the following OFF command for a JVC DLA projector shows

Code:
<$"\x21\x89\x01\x50\x57\x30\x0a"$>
Logged

WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #3 on: July 26, 2011, 06:34:16 am »

Thanks guys! I'll get that going and tested out on my system. Once I get it working properly, how do I go about submitting it? I've never had the privilege of adding a new device before.
Logged

purps
NEEDS to work for LinuxMCE
***
Posts: 1270


If it ain't broke, tweak it


View Profile
« Reply #4 on: July 26, 2011, 09:29:00 am »

In web admin, go Advanced -> sqlCVS. Check in both DCE and IR repositories. Then, create a trac ticket that contains the sqlCVS Batch IDs, as well as your contact details (batch IDs can be found out here http://schema.linuxmce.org/sqlCVS/?site=batch/view). Think that's it.

Cheers,
Matt.
Logged

1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps
my blog :: http://projectsofmatt.wordpress.com/
WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #5 on: January 16, 2012, 06:24:39 pm »

OK, so after a brief hiatus, I'm back at work on this device. I have all the codes researched and configured (I wrote a Perl script to send these commands to my receiver) and have just created the device in LinuxMCE.

Here is the command I think I have it attempting to send for #192 On:
Code:
<$"ISCP\x00\x00\x00\x10\x00\x00\x0\x01\x00\x00\x00!1PWR01\x0D\r"$>

Here is the log entry generated:
Code:
05 01/16/12 9:17:48.395 GSDMessageTranslator isCmdImplemented = false <0xb58f0b70>
05 01/16/12 9:17:48.395 #### Pre-Process Queue = 1 <0xb58f0b70>
05 01/16/12 9:17:48.417 _QueueProc Pre - 994 : 0 <0xb76f3b70>
05 01/16/12 9:17:48.417 GSD-Sleep Pre 994 : 0 <0xb76f3b70>
05 01/16/12 9:17:48.417 Process Queue = 1 <0xb76f3b70>
01 01/16/12 9:17:48.417 For obscure reasons could not handle the message <0xb4eefb70>
05 01/16/12 9:17:48.669 GSD-Sleep Post 994 : 250 <0xb76f3b70>
05 01/16/12 9:17:48.669 _QueueProc Post - 994 : 250 <0xb76f3b70>

Now, how do I go about debugging this? I've tried
Code:
/usr/pluto/bin/MessageSend localhost 0 62 1 994
but that gives me nothing extra. Thanks!
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #6 on: January 16, 2012, 07:59:58 pm »

Hello.

Could you post the contents of your /var/log/xx_Generic_Serial_Device.log, where xx is your device #.

The most common reason that this error occurs is that your device data is incorrect.

For ethernet devices, you need to make sure that the TCP Port device data is defined, and that the correct port is specified. You also need to make sure the device has an IP Address specified, so that it knows where to connect to the device.

-Thom
Logged
WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #7 on: January 18, 2012, 01:53:43 am »

Thanks Thom!

So, I forgot the TCP Port. I knew I was missing something there. I fixed it but I still got errors. I think I might have it working now. I made some changes to the selected checkboxes on the template. I'm at work right now so I can only monitor the logs. I'll test as soon as I get home.  Cheesy
Logged

WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #8 on: January 18, 2012, 07:55:27 am »

Works great! Needed to do some bit fiddling to get it all working since I have to send binary commands. So far I have power on, off, and volume up, down working. As soon as I have something complete, I'll check it in.

Thanks again!

The next steps would be to get PNP working on this device.
Logged

stedaniels
Regular Poster
**
Posts: 27


View Profile
« Reply #9 on: January 18, 2012, 02:44:12 pm »

Hi,

Out of interest, what receiver did you get?

Steve
Logged
WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #10 on: January 18, 2012, 09:11:25 pm »

I got the NR609. I really like it.

http://www.us.onkyo.com/model.cfm?m=TX-NR609&class=Receiver&p=i
Logged

tschak909
LinuxMCE God
****
Posts: 5101

DOES work for LinuxMCE.


View Profile
« Reply #11 on: January 19, 2012, 12:33:28 am »

We really need some people to get together a nice simple tutorial on making GSD devices, as it really is simple, if you avoid the common mistakes.

-Thom
Logged
posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #12 on: January 19, 2012, 12:06:04 pm »

Just a small tidbit of information regarding network controlling receivers. All of the receivers I have looked at til now have one BIG problem when controlled via network. Their "standyby" power usage sky rockets from <1W when not using network controll or HDMI control, to >50W when using it. This is standby power usage. Just something to look out for.
* posde is only using RS-232 controlled devices atm.
Logged

WhateverFits
Veteran
***
Posts: 142



View Profile WWW
« Reply #13 on: January 19, 2012, 09:13:20 pm »

I don't even know if I can turn off the network control. My unit does chew through some power in standby mode, that's for sure. My almost airtight cabinet gets warm even when in standby. I put a computer chassis fan on the back of my cabinet to ventilate due to this.

Yes, Thom, it was rather simple but there are a few "gotchas" along the way if you don't know no better. My biggest problems are getting my binary strings correct. The Onkyo network protocol is annoying to begin with and then having to properly escape all the non-printable characters is fun too!

I will most likely be done with this by this weekend so I would love to ask, any pointers on doing a DHCP auto-detect script for this? All I need is to find something that exists already that I can steal.

Thanks!
Logged

posde
Administrator
LinuxMCE God
*****
Posts: 2621


Wastes Life On LinuxMCE Since 2007


View Profile WWW
« Reply #14 on: January 21, 2012, 01:24:46 pm »

Look at the device template 54. It has autodetection for SqueezeBoxes using their MAC address
Logged

Pages: [1] 2
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.18 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!