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

Main Menu

New Onkyo device

Started by WhateverFits, July 18, 2011, 07:06:32 PM

Previous topic - Next topic

WhateverFits

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!
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

merkur2k

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.

Marie.O

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

<$"\x21\x89\x01\x50\x57\x30\x0a"$>
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

WhateverFits

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.
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

purps

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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: [url="http://wiki.linuxmce.org/index.php/User:Purps"]http://wiki.linuxmce.org/index.php/User:Purps[/url]

WhateverFits

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:
<$"ISCP\x00\x00\x00\x10\x00\x00\x0\x01\x00\x00\x00!1PWR01\x0D\r"$>

Here is the log entry generated:
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
/usr/pluto/bin/MessageSend localhost 0 62 1 994
but that gives me nothing extra. Thanks!
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

tschak909

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

WhateverFits

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.  :D
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

WhateverFits

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.
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

stedaniels

Hi,

Out of interest, what receiver did you get?

Steve

WhateverFits

[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

tschak909

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

Marie.O

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.
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]

WhateverFits

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!
[url="http://www.seanwalker.org"]http://www.seanwalker.org[/url]

Marie.O

Look at the device template 54. It has autodetection for SqueezeBoxes using their MAC address
If I helped you, feel free to buy me a coffee: [url="https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES"]https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=2VKASZLTJH7ES[/url]