[RELEASED] Python plugin to control Onkyo receivers

Python and python framework
Lyrex
Posts: 33
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 13: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?

dwmw2
Posts: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 13:46

(How do I delete a duplicate post? Cannot see how, from my phone...)
Last edited by dwmw2 on Friday 01 December 2017 13:52, edited 1 time in total.

dwmw2
Posts: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 13:46

Lyrex wrote:
Friday 01 December 2017 13: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: 33
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 13: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. The last version i used was just with pwr on vor zone1/2 and the volume slider.

dwmw2
Posts: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 14:31

Lyrex wrote:
Friday 01 December 2017 13: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 13: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: 33
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 14:47

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: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 15:01

What happens when you interact with one of the existing volume control devices, after the upgrade?

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

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 15:21

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: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 15:24

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: 33
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 15:33

Edit: performed a fw update for my avr :) NRIQSTN is working!
Nope. Didnt you changed the plugin to "NRI only"?

JimmyH1969
Posts: 99
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 » Friday 01 December 2017 15:37

Just thinking out loud, but is accept new hardware enabled?

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

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 15:40

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: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 18:23

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: 33
Joined: Thursday 19 May 2016 13:34
Target OS: Raspberry Pi
Domoticz version: beta
Location: Germany
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by Lyrex » Friday 01 December 2017 18:47

cant you just check the other QSTN types and set the state?

dwmw2
Posts: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Friday 01 December 2017 20:44

Lyrex wrote:
Friday 01 December 2017 18: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: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Monday 04 December 2017 16:15

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: 99
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 » Tuesday 05 December 2017 11:39

Thanks for all the work so far, now we wait till it's merged in a beta...

dwmw2
Posts: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Wednesday 06 December 2017 21:57

JimmyH1969 wrote:
Tuesday 05 December 2017 11: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: 99
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 » Thursday 07 December 2017 2:24

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: 51
Joined: Thursday 03 December 2015 13:42
Target OS: Linux
Domoticz version:
Contact:

Re: [RELEASED] Python plugin to control Onkyo receivers

Post by dwmw2 » Thursday 07 December 2017 2:49

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: No registered users and 6 guests