OnkyoISCP plugin

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

Re: OnkyoISCP plugin

Postby abraxxa » Fri Mar 30, 2012 2:49 pm

You can't have two nics in the identical network, both are 192.168.168.0/24.
Choose a different for one of them.
Does powering on (the first command) work or not even that?
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Sat Mar 31, 2012 2:14 am

abraxxa wrote:You can't have two nics in the identical network, both are 192.168.168.0/24.
Choose a different for one of them.
Does powering on (the first command) work or not even that?


Sorry, I'm not sure what you mean. Can you suggest an IP for the pre-pro NIC that will work? Is the gateway IP supposed to be the same for all 3?

Powering on or off doesn't work, no.

Thanks
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby abraxxa » Sat Mar 31, 2012 11:14 am

Addresses in IP are like addresses in the real world, you can't choose one, they are assigned.
RFC1918 defines three networks that can be used for private, non-internet networks: 10.0.0.0/8, 172.16.0.0/12 and 192.168.0.0/16.
You can choose a network for your home out of those. The subnet mask is the number after the slash and defines the number of bits that are used for the network part vs. the host part.
/24 means the first 24 bits, an IPv4 address has 32bits so 8 bits are for the host part.
In your case 192.168.168.0/24 means that 192.168.168 is the network part and your hosts can have the host part .1 to .254 (the first .0 and last .255 addresses of a network have special meanings).
If your pc talks to the internet router vs. the pre-pro it wouldn't know on which interface it should send the packet if both nics are connected to the same network (192.168.168.0/24).
I suggest you buy a switch and put your internet router, pc and pre-pro all in the same network and don't change that.
If you don't want to spend any more money you have to keep your complicated setup and I'd change the network between pc and pre-pro to 192.168.255.0/24.
Use something like .1 for your pc and .2 for your pre-pro.

HTH
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Sun Apr 01, 2012 1:29 am

Thanks for the detailed response. I have ordered a switch, so I might just wait for that to arrive, but if it takes a while I'll give your 192.168.255.1 &.2 a go.
Cheers! :)

I'll report back either way.
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby blaher » Sun Apr 01, 2012 4:14 am

Well, I was too impatient to wait and tried your suggested IP addresses, but the same problem exists, i.e. it will connect and display what is happening on the pre-pro, but it won't send commands.

Just in case it was a cabling problem, or my shared Internet, I ran another cable directly from my router to the pre-pro, and the same thing happens. I even installed a plug-in for my Vera home automation box and it works fine sending commands too, (it only sends on/off and volume levels, but they all work).

So it works with Vera, Oyremote and the webpage, but unfortunately just not with EventGhost. Is there any log file, or testing I can do to help narrow down the problem?

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

Re: OnkyoISCP plugin

Postby abraxxa » Sun Apr 01, 2012 11:24 am

The plugin doesn't have the ability to display what the Onkyo does, are you sure you're talking about my plugin?
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Mon Apr 02, 2012 1:40 am

I was actually using the one posted here: http://www.eventghost.org/forum/viewtop ... 964#p21054, but I just reinstalled the one that came with EventGhost and it doesn't want to send the message either; it still connects though.

I also tried using v0.05 from github, (just in case it was different from the one that comes with EventGhost), by clicking on "raw", and then copying and pasting the contents into __init__.py, because when I tried to save the file from the link it didn't work. Is that how you're supposed to do it?

One thing that's unusual, and that's not even listed in my manual, is that I have a DNS server 0.0.0.0 in my options on the pre-pro. Could this have any bearing on matters?

I'm using DHCP and running straight to the router.

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

Re: OnkyoISCP plugin

Postby abraxxa » Mon Apr 02, 2012 6:09 am

How do you connect the Onkyo and your PC to the router if you don't have a switch?
Which Onkyo model do you have, maybe it's incompatible.
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Mon Apr 02, 2012 6:52 am

abraxxa wrote:How do you connect the Onkyo and your PC to the router if you don't have a switch?
Which Onkyo model do you have, maybe it's incompatible.


It's an Integra DHC-9.9 pre-pro. It uses the same Onkyo commands because they make Integra products.

The router has four ports: one cable runs to my PC, the other cable runs to the pre-pro.

https://sites.google.com/a/webarts.ca/t ... olprotocol says that the last character in the packet can vary depending on model, so maybe that's the difference.

It works using the ordinary webpage and sending !1PWR01 but I don't know what the last character is being sent.

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

Re: OnkyoISCP plugin

Postby abraxxa » Mon Apr 02, 2012 7:14 am

Then your router has a switch built-in and you can cancel your order. :wink:
You could do a capture of the traffic between your pc and the pre-pro with wireshark with one of the working programms like oyremote and with the plugin and compare the sent strings.
You can also attach them here so I can take a look if you don't have the knowledge to do yourself.
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Mon Apr 02, 2012 7:36 am

abraxxa wrote:Then your router has a switch built-in and you can cancel your order. :wink:


Yeah, but it's in another room and I've run out of ports. :) I've got a 20m cable draped across the floor temporarily, but a little switch by my PC linking to the pre-pro should be a more permanent option.

You could do a capture of the traffic between your pc and the pre-pro with wireshark with one of the working programms like oyremote and with the plugin and compare the sent strings.
You can also attach them here so I can take a look if you don't have the knowledge to do yourself.


Thanks very much. I'll Google wireshark and have a go.
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby blaher » Mon Apr 02, 2012 8:26 am

I presume the blue bit is the important bit, but I'm just guessing really. Eventghost is sending MVL2D on the left, Oyremote the same on the right. I can post the logs if I've screen-capped the wrong bits.

http://i.imgur.com/pNGGT.gif

They're quite similar, but there's a couple of differences.
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby abraxxa » Mon Apr 02, 2012 8:41 am

Looks ok to me.
The only strange thing is that there are no acks from the pre-pro back to your pc.
abraxxa
Experienced User
 
Posts: 80
Joined: Wed Dec 22, 2010 9:10 pm

Re: OnkyoISCP plugin

Postby blaher » Wed Apr 04, 2012 2:52 am

I've tried comparing the two, but I don't know what I'm doing, so I've tried to be thorough. :)

http://i.imgur.com/Z53nj.gif is a new one with ACKs.
I needed to pick follow TCP stream, rather than just filtering the destination of 192.168.168.194, like I said, I don't know what I'm doing. :)

The figures on the left are from OYremote, the right EventGhost.

Internet Protocol Version 4:

Identification: 0x2c85 vs. 0x2b9e

The header checksums are different, but both [correct]

TCP:
The source ports are different, but this seems to change each time in both programs.

Window size value: 65040 vs. 65039

Calculated window size: 65040 vs. 65039

The checksums are different, but validation is disabled on both of them anyway

Data:
49:53:43:50:00:00:00:10:00:00:00:08:01:00:00:00:21:31:4d:56:4c:32:44:0d
49:53:43:50:00:00:00:10:00:00:00:06:01:00:00:00:21:31:4d:56:4c:32:44:0d

08 vs. 06 is the only difference in the middle.

Otherwise everything seems identical, but one works in one doesn't. It's very frustrating because EventGhost is far better than Oyremote.
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

Re: OnkyoISCP plugin

Postby blaher » Wed Apr 04, 2012 3:12 am

I found a workaround, with thanks to your suggestion of Wireshark, I monitored the Integra webpage when sending commands.

"Full request URI: http://192.168.168.194/1?3=!1PWR01" was what Wireshark told me, and pasting it into a browser works fine to send signals, except a new tab is created each time a command is sent.

But using Wget.exe (http://users.ugent.be/~bpuype/wget/#download) as a 'Start Program' in EventGhost, and a command line option of: http://192.168.168.194/1?3=!1PWR01 works well and doesn't create tabs in the browser.

So now using Wget in conjunction with Sem;colon's v0.06 addition to your plug-in, I can send commands and receive them as well.

It might not be as pretty as a plug-in, but at least it works now.

Thanks to both of you for your help. :)

Edit: the Wget.exe command needs a "--delete-after" before the address, or else it saves the webpage, e.g. "C:\program files\wget.exe --delete-after http://192.168.168.194/1?3=!1PWR01"
blaher
Experienced User
 
Posts: 277
Joined: Thu Nov 17, 2011 1:27 am

PreviousNext

Return to Coding Corner

Who is online

Users browsing this forum: No registered users and 0 guests