mcwieger wrote:@Jake: I saw you're working on a better integration of your Onkyo in Domoticz. Could you give some more info on your project to get the status and write it to the log?
I'm looking to find a way to resolve the following issue: when I turn on the Onkyo using Domoticz, but turn it off using the regular remote control, the status is not updated and it looks like the receiver is still on.
Possible solution would be:
1. Create a switch to query Onkyo status
2. Write the status to this switch
3. Run a blockly script every x minutes that adjusts the actual Onkyo On/Off switch accordingly
Obviously, step 2 is the hard part. Any ideas how to do that? Or another way to resolve the issue?
My project scope is to let the Onkyo receiver follow my use of Kodi media player. What works at the moment is:
I choose an album with the Yatse app, connected to a 2nd RPI running Kodi (Xbian).
The script will do the following
- detect a devicechange on the Kodi Media player from 'on' to 'audio' (or 'video')
- Domoticz changes the Onkyo input to the HDMI input for the Kodi player
Result: if the receiver is off, it will be turned on to the right input, if it was already on, it will just change input
- Last used listening mode (stored in a Domoticz variable, one for 'audio' one for 'video') will be made active
- Detect a devicechange from 'audio' to 'video' or vice versa or to 'on'
- Store the actual 'listening mode' in the Domotiz variable
Problems I run into:
-Timing, timing, timing:
Command order like:
- Detect 'Audio' --> SET to 'pause'
- Turn Onkyo on
- wait 2 seconds (to let the Onkyo boot, it seems to miss the command completely during boot
- change listening mode
- Set 'play'
are not executed on time, or not at all. The Kodi media player is not always put to 'pause', the 2 second delay will not delay the next command, but seems to be executed somewhat later etc. Very strange
- Querying listening modes for instance, returns a different string then the string needed to SET the listening mode (for instance: Query result is 'Video 6' 'PC', while setting it to that same input, 'pc' is sufficient. I started a new topic for that: how can can make a sort of table that compares query results, with SET commands?
http://www.domoticz.com/forum/viewtopic.php?t=9854 Unfortunately no answers yet and as a mechanical engineer, I can't dream it up myself
- The Onkyo status needs to be pulled, while Onky itself is pushing it's status over the network:
I have the ONKYO app installed on my phone. When this app is running and I change input/volume/listening mode with my std IR remote, the app is updated immediately. My conclusion is that therefore the receiver must be pushing / publishing it's status changes all the time. How to catch these results?