Page 12 of 14

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 12:12
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?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 12:46
by dwmw2
(How do I delete a duplicate post? Cannot see how, from my phone...)

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 12:46
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 12:52
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 13:31
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...

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 13:47
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:01
by dwmw2
What happens when you interact with one of the existing volume control devices, after the upgrade?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:21
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:24
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?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:33
by Lyrex
Edit: performed a fw update for my avr :) NRIQSTN is working!
Nope. Didnt you changed the plugin to "NRI only"?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:37
by JimmyH1969
Just thinking out loud, but is accept new hardware enabled?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 14:40
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 17:23
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 17:47
by Lyrex
cant you just check the other QSTN types and set the state?

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Friday 01 December 2017 19:44
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.

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Monday 04 December 2017 15:15
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...

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Tuesday 05 December 2017 10:39
by JimmyH1969
Thanks for all the work so far, now we wait till it's merged in a beta...

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Wednesday 06 December 2017 20:57
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

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Thursday 07 December 2017 1:24
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

Re: [RELEASED] Python plugin to control Onkyo receivers

Posted: Thursday 07 December 2017 1:49
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.