Announcement

Collapse
No announcement yet.

Store and retrieve device status (in virtual device?)

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Store and retrieve device status (in virtual device?)

    Hello,

    I use a Sonos device connected to the CD input on my AV receiver for my Homeseer speaker client. I use the BLDenon plugin to control the receiver. My other media devices are connected into other receiver inputs. What I am trying to do: Before a speech event, save the BLDenon input and volume status of the receiver. Switch the input to CD and the volume to 70. Do the speech event. After the speech event, switch the input and volume back to what they were before.

    The method I have tried is to create one virtual device for volume and one for input, then to copy the value of the BLDenon volume and input to the virtual devices before the speech event. I have been able to accomplish that using simple scripts. However, when I attempt to go in the opposite direction and read and restore the virtual device values to the BLDenon devices after the speech event, I am having a hard time. The BLDenon input device status appears to update in the Homeseer UI, but it doesn't seem to send the command to the receiver.

    Am I on the right track? Is there a better way to do this? Thanks,

    Kenny

  • #2
    I figured this out, sort of, so I decided to share what I did in case anyone else encounters a similar situation. First, as I stated above, I created virtual devices to save the status of each zone's input source and volume. When the event ran, it copied the current value (for volume) or string (for input source) to the virtual devices. The part I couldn't figure out before and finally did is that it is apparently not enough to change the status of the BLDenon devices back to the desired state. Instead, I used a script to send the commands directly to the receiver using the BlDenon plugin functions (see plugin documentation). I had to do some text string manipulation in my script to put the saved input source string (such as SAT/CBL) into the correct raw command format for my receiver (SISAT/CLB<CR>).

    In the end, it worked--sort of--but it was not as reliable as I'd hoped. (As referenced in another thread, I have been having some connection issues with the BLDenon plugin.)

    After I figured it out, I took a step back and decided the whole thing violated the KISS principle, and deleted it all. I resolved my issue today by installing a Aeon Labs Smart Switch that can track the power usage of my TV. I created an event that monitors the TV power. Any the TV is turned off (watts are changed to 0), the Denon receiver switches zones 1 and 2 to the Sonos input. That way, if nobody is watching TV (Zone 1) the whole house hears the Sonos output. If someone is doing something else with the TV and has not manually switched the Zone 2 input source, Sonos output (HS TTS) comes out everywhere except the living room. This gets me 95% of the way to where I want to be, and is 100% simpler and more reliable than what I had initially planned.

    Comment

    Working...
    X