OnkyoISCP plugin

Do you have questions about writing plugins or scripts in Python? Meet the coders here.

Re: OnkyoISCP plugin

Postby abraxxa » Wed Apr 04, 2012 4:41 pm

The plugin doesn't use http to talk to the pre-pro, so it's a different protocol.
Maybe there is a firmware update for your pre-pro that fixes the bug.
Please attach both wireshark captures from a working oyremote and the non-working plugin communication.
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Thu Apr 05, 2012 3:32 am

There actually is a later firmware version available for my pre-pro, but the only thing it adds is Audyssey Pro, which I don't have, so I don't think it's worth the risk or effort.

Attached are the two log files in a .rar.

Cheers
Attachments
wireshark.rar
Oyremote vs. EventGhost
(671 Bytes) Downloaded 56 times
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby Sem;colon » Thu Apr 05, 2012 11:40 am

you're welcome! (even as I didn't do anything)
Well I also can't see any Problem with the plugin, your receiver uses exactly the same protocol as all the other onkyos.
Maybe you should reconsider updating your receiver, sometimes there are changes that aren't listed in the changelog.
I sadly can't give you further support for the plugin as I replaced my Onkyo TX-NR509 with an Pioneer VSX-921...
But I guess the part I added to the plugin works just fine :)
Sem;colon
 
Posts: 25
Joined: Sat Feb 18, 2012 10:51 am

Re: OnkyoISCP plugin

Postby abraxxa » Fri Apr 06, 2012 3:20 pm

If you do a follow tcp stream in wireshark you can see the difference:
ISCP............!1MVL2D
ISCP............!1MVLN/A.

vs.

ISCP............!1MVL2D
ISCP............!1MVL2D.

Are you really sending the same commands?
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby abraxxa » Fri Apr 06, 2012 4:19 pm

@sem;colon: I finally took the time to look at your code and have cleaned it up (English instead of German wording, better variable names).
Can you please add comments what exactly happens in the Receive (formerly Empfange) method?
I've commited your changes to github, you can add your comments directly there if you want:
https://github.com/abraxxa/EventGhost-Onkyo-ISCP-plugin/commits/master
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Sun Apr 08, 2012 1:08 am

abraxxa wrote:If you do a follow tcp stream in wireshark you can see the difference:
ISCP............!1MVL2D
ISCP............!1MVLN/A.

vs.

ISCP............!1MVL2D
ISCP............!1MVL2D.

Are you really sending the same commands?


Yeah, I've made sure the commands were the same for both. I think the 2nd line is the response from the pre-pro.
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby Sem;colon » Sun Apr 08, 2012 7:27 pm

@abraxxa: Thanks!
I left an explanation... I hope it helps! :roll:
Sem;colon
 
Posts: 25
Joined: Sat Feb 18, 2012 10:51 am

Re: OnkyoISCP plugin

Postby abraxxa » Mon Apr 09, 2012 10:56 pm

I've implemented a proper ISCP parser: https://github.com/abraxxa/EventGhost-Onkyo-ISCP-plugin/commit/4435ece068f78894c89b7d39f9999d2958b2ef0e
Please test the new version, if it works for everybody else I'll release it as 0.06.
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Wed Apr 11, 2012 3:53 am

abraxxa wrote:I've implemented a proper ISCP parser: https://github.com/abraxxa/EventGhost-Onkyo-ISCP-plugin/commit/4435ece068f78894c89b7d39f9999d2958b2ef0e
Please test the new version, if it works for everybody else I'll release it as 0.06.


I'm afraid this version doesn't report the feedback correctly like the last one did. It reports some of it, eg. if you change the volume manually, in EG it shows up as: MVL '', but wireshark shows it's getting !1MVL2E. If I reinstall sem;colon's version then I get: MVL '2E' showing up in EventGhost.

I have attached a wireshark log of me sending a power off signal, and one of the pre-pro sending a volume change signal. I hope that helps.

Cheers
Attachments
eg pre 0.06.rar
(635 Bytes) Downloaded 69 times
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby abraxxa » Wed Apr 11, 2012 6:07 pm

The captures look identical to mine.
Please uncomment the print lines in __init__.py and post what it outputs.
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Thu Apr 12, 2012 1:21 am

I hope I've done this right, but I can post the __init__.py, if you think I've messed something up:
http://i.imgur.com/Ug4e1.gif

I sent the power off command, 'PWR00', and then moved the volume knob on my receiver.

No matter what the variable for the last two numbers, eg. SLI01, MVL20, PWR00, LMD40, it always seems to send, !1SLIN, !1MVLN, !1PWRN, !1LMDN respectively. In other words, it's sending N, instead of the correct variable.

Cheers
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby abraxxa » Thu Apr 12, 2012 10:15 am

Do a wireshark at the same time and compare the print output with the wireshark capture.
The data size for my Onkyo 5507 pre-pro is 10 most of the time, at least for volume change events.
The docs I've found about ISCP (serial connection) and eISCP (ISCP over Ethernet) didn't exactly match what my pre-pro does.
For example the eISCP docs spec says the message starts with 1 whereas for me it starts with !1.
Maybe the models use slightly different variants of the protocol.
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Thu Apr 12, 2012 12:19 pm

abraxxa wrote:Do a wireshark at the same time and compare the print output with the wireshark capture.


I attached the logs in my post above; Wireshark says it's sending !1PWR00 with 24 bytes, print output says !1PWRN with a data size of 9.

For volume event reception, Wireshark says !1MVL2E with 24 bytes, print says !1MVLN with a data size of 8.

Cheers
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby abraxxa » Thu Apr 12, 2012 8:32 pm

You forgot to uncomment line where the var unit_type gets defined, so the output is missing the parsed message.

I've compared your captures with mine:
yours:
Code: Select all
00000000  49 53 43 50 00 00 00 10  00 00 00 08 01 00 00 00 ISCP.... ........
00000010  21 31 4d 56 4c 32 45 1a                          !1MVL2E.


mine:
Code: Select all
00000000  49 53 43 50 00 00 00 10  00 00 00 0a 01 00 00 00 ISCP.... ........
00000010  21 31 4d 56 4c 32 38 1a  0d 0a                   !1MVL28. ..


As you can see my Onkyo 5507 pre-pro sends a CRLF at the end as documented whereas yours doesn't.

I've changed the parsing in commit 8357639 to remove \x1a\r\n dynamically if it exists and not the last three chars regardless of what they are.
abraxxa
Experienced User
 
Posts: 78
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Fri Apr 13, 2012 3:55 am

Here is a screen capture of EventGhost receiving two lots of volume down while it is muted:
http://i.imgur.com/mLgvu.gif

As you can see, you have fixed the pre-pro receiving events in EventGhost! Woo, well done. :) It shows the volume being unmuted, and then 2 volume presses down.

Here is a screen capture of EventGhost sending PWR01, SLI20, MVL2D:
http://i.imgur.com/T1QZ4.gif The data size seems to to be different from the receiving ones that work.

In the comments of: https://sites.google.com/a/webarts.ca/t ... olprotocol it says,
// the official ISCP docs say this is supposed to be just the data size (eiscpDataSize)
// ** BUT **
// It only works if you send the size of the entire Message size (eiscpMsgSize)

Could this have anything to do with it? I'm just guessing, sorry I can't be of more help.

I've attached Wireshark captures of both the receiving events, and trying to send them.

I've uncommented the unit_type variable initiation, so that seems to be showing up fine too.

Cheers
Attachments
8357639.rar
(918 Bytes) Downloaded 53 times
blaher
Experienced User
 
Posts: 151
Joined: Thu Nov 17, 2011 1:27 am

PreviousNext

Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 1 guest