Author Topic: New Onkyo device  (Read 13034 times)

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
New Onkyo device
« on: July 18, 2011, 07: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!

merkur2k

  • Addicted
  • *
  • Posts: 513
    • View Profile
Re: New Onkyo device
« Reply #1 on: July 19, 2011, 08: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.

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: New Onkyo device
« Reply #2 on: July 19, 2011, 10:26:22 am »
Hex works nicely, as the following OFF command for a JVC DLA projector shows

Code: [Select]
<$"\x21\x89\x01\x50\x57\x30\x0a"$>

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« Reply #3 on: July 26, 2011, 07: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.

purps

  • NEEDS to work for LinuxMCE
  • ***
  • Posts: 1402
  • If it ain't broke, tweak it
    • View Profile
Re: New Onkyo device
« Reply #4 on: July 26, 2011, 10: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.
1004 RC :: looking good :: upgraded 01/04/2013
my setup :: http://wiki.linuxmce.org/index.php/User:Purps

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« 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: [Select]
<$"ISCP\x00\x00\x00\x10\x00\x00\x0\x01\x00\x00\x00!1PWR01\x0D\r"$>
Here is the log entry generated:
Code: [Select]
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: [Select]
/usr/pluto/bin/MessageSend localhost 0 62 1 994but that gives me nothing extra. Thanks!

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Onkyo device
« 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

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« 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.  :D

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« 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.

stedaniels

  • Regular Poster
  • **
  • Posts: 30
    • View Profile
Re: New Onkyo device
« Reply #9 on: January 18, 2012, 02:44:12 pm »
Hi,

Out of interest, what receiver did you get?

Steve

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« Reply #10 on: January 18, 2012, 09:11:25 pm »

tschak909

  • LinuxMCE God
  • ****
  • Posts: 5549
  • DOES work for LinuxMCE.
    • View Profile
Re: New Onkyo device
« 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

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: New Onkyo device
« 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.

WhateverFits

  • Guru
  • ****
  • Posts: 230
    • View Profile
    • Sean Walker
Re: New Onkyo device
« 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!

Marie.O

  • Administrator
  • LinuxMCE God
  • *****
  • Posts: 3675
  • Wastes Life On LinuxMCE Since 2007
    • View Profile
    • My Home
Re: New Onkyo device
« 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