[RELEASED] Python plugin to control Onkyo receivers

Python and python framework

Moderator: leecollings

Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

Hey guys,

updated to the latest beta an now the native domoticz plugin does not work anymore for my TX-NR545. Anything i can do that it is working again?
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

(How do I delete a duplicate post? Cannot see how, from my phone...)
Last edited by dwmw2 on Friday 01 December 2017 12:52, edited 1 time in total.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

Lyrex wrote: Friday 01 December 2017 12:12 Hey guys,

updated to the latest beta an now the native domoticz plugin does not work anymore for my TX-NR545. Anything i can do that it is working again?
Hm, I didn't think that should have broken. I'll check and fix it. Thanks.
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

Edit: checked the document which i got from onkyo a time ago when i implemented my own eiscp stuff. My TX-NR545 supports NRI

When doing a manual NRIQSTN i just got a timeout. The last version i used was just with pwr on vor zone1/2 and the volume slider.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

Lyrex wrote: Friday 01 December 2017 12:52 Edit: checked the document which i got from onkyo a time ago when i implemented my own eiscp stuff. My TX-NR545 supports NRI.
When doing a manual NRIQSTN i just got a timeout.
You mean, it's *supposed* to support NRI, but empirically, it doesn't seem to?
Lyrex wrote: Friday 01 December 2017 12:52 The last version i used was just with pwr on vor zone1/2 and the volume slider.
Yeah, that much should still have worked. It won't probe for the current state at Domoticz startup, but it should still see whenever they change. And the existing devices in the Domoticz database should still exist and work. And even if you wipe your database and start from scratch, it should create the devices when it first gets a notification for them.

I'll test...
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

hmmm yeaht, it seems NRIQSTN does not work properly:

( echo -en 'ISCP\0\0\0\020\0\0\0\n\01\0\0\0!1NRIQSTN\r\n\0\0\0' ; sleep 2 ) | nc <ip> 60128 | cut -f3- -dI | xmlstarlet fo -R
-:1.1: Document is empty

^

The devices are not created again. I just get a Send NRIQSTN in the log files and thats it.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

What happens when you interact with one of the existing volume control devices, after the upgrade?
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

The Plugin gives me no devices :? The old ones does not work anymore so i deleted the stuff to get a fresh start. Now i dont have any Onkyo devices.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

If you turn the zones on/off on the amp ,and turn the volumes for each zone up/down, the devices come back? But just don't have the correct icon, yes?
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

Edit: performed a fw update for my avr :) NRIQSTN is working!
Nope. Didnt you changed the plugin to "NRI only"?
JimmyH1969
Posts: 153
Joined: Tuesday 28 June 2016 16:38
Target OS: Windows
Domoticz version: Beta
Location: Amersfoort NL
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by JimmyH1969 »

Just thinking out loud, but is accept new hardware enabled?
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

Jep and now after the firmware update everything is working perfectly for me. But i think for Onkyo AVR's which not accept the NRIQSTN the Plugin is not working anymore.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

OK, this should fix the support for models without NRIQSTN somewhat:
https://github.com/dwmw2/domoticz/commits/onkyo-dev

It still doesn't precreate devices; it needs to learn them. So turn each zone on/off and change its volume, and select every one of the inputs that it can manage.

I still need to add something to query the state of the known devices, at startup.
Lyrex
Posts: 30
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi / ODroid
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex »

cant you just check the other QSTN types and set the state?
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

Lyrex wrote: Friday 01 December 2017 17:47 cant you just check the other QSTN types and set the state?
Yeah, it could send QSTN at startup for any device which has previously been seen. There are caveats though, because the device sometimes doesn't respond if you send too much at once, especially if one of them is NRIQSTN. I probably need to rate-limit the queries somehow.
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

I've rolled those fixes into https://github.com/domoticz/domoticz/pull/1971

Still need to make it send the queries on startup, if NRIQSTN isn't supported. Real work intrudes though...
JimmyH1969
Posts: 153
Joined: Tuesday 28 June 2016 16:38
Target OS: Windows
Domoticz version: Beta
Location: Amersfoort NL
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by JimmyH1969 »

Thanks for all the work so far, now we wait till it's merged in a beta...
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

JimmyH1969 wrote: Tuesday 05 December 2017 10:39 Thanks for all the work so far, now we wait till it's merged in a beta...
Should be in the next beta build. For receivers without NRIQSTN support it'll learn the devices (per-zone volume, power, source selector) as it sees them change. And it'll learn the available sources as it sees each one selected. The text sensors are there for the net playback information, and the ability to send raw commands.

https://github.com/domoticz/domoticz/co ... f5c4e8e309
JimmyH1969
Posts: 153
Joined: Tuesday 28 June 2016 16:38
Target OS: Windows
Domoticz version: Beta
Location: Amersfoort NL
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by JimmyH1969 »

Yes, it is in the latest beta build. I've been playing with it al evening (night). It works extremely well. The RAW command option is great.
Thanks again, i do hope you add more functionality in the feature. You seem to have great idea's with the remote control option etc.
Getting the response from the receiver when sending a RAW command would be nice if possible.
But these new functions just made my day :D
dwmw2
Posts: 52
Joined: Thursday 03 December 2015 12:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 »

Responses are a bit hard. You don't always get one. But it might be possible to cobble something together — perhaps with a timeout of 2 seconds, wait to see if anything comes back which has the first three letters of what was sent. There are use cases that wouldn't work for, though.

But really... why? Whatever's going to interpret these responses, it may be best just to implement them as part of the hardware driver. The sending of raw commands for the remote-control parts makes sense, and maybe for some esoteric features that we might not implement in the driver. But we shouldn't need it for the general case.

What additional features would you *like* to see next? There's a whole bunch of stuff in the EISCP docs, and the chances of me doing it *all* any time soon are slim. If there are specific things that people want to be able to do though, I could take a look.
Post Reply

Who is online

Users browsing this forum: Bing [Bot] and 1 guest