The tv attached to this receiver isnāt a smart tv.
But since the receiver has a telnet interface and hubitat driver, Hubitat knows when the receiver is on/off and which input itās set to.
So for the moment Iām thinking of something like the following.
A rule in rule machine that is triggered by motion sensors in my living room/kitchen (where the receiver and HEOS speaker are). If motion is present, turn on receiver and cancel delayed events. Else if no motion, turn off receiver (cancelable delay by 5 mins).
That at least keeps the receiver on when people are home, now to figure out how to keep the input set to HEOS, unless I want to watch the fire TV, in which case the receiver switches to the appropriate input (which should occur every time I use the fire tv cube remote). So the trigger/condition to make use of is the receiver input changing to Fire TV cube.
Not sure if I explained that last part well, but if anyone has any ideas, Iād appreciate it.
I believe that was suggested already. If you want to have your receiver on whenever someone is in the living room, than you can certainly turn it on with a motion sensor. Of you could just issue one extra command to Alexa when you want to listen to music. Is that really that bad?
My original goal was to turn the receiver on when amazon music starts playing on a WiFi speaker. From that perspective, no, just keeping the receiver input set to amazon music isnāt sufficient, unfortunately.
But if itās not possible to come up with a trigger that turns the receiver on every time music starts playing, then Iāll have to come up with a way to create rule machine rules that do something like this:
Keep the AV receiver on and set the input to amazon music as long as thereās movement in the room. If thereās no movement, turn off the receiver. If someone turns on the fire tv, donāt change the input back to amazon music until theyāre done watching tv.
In the big scheme of things? Of course not. Most of the stuff we discuss in this forum consists of first world problems. But when it comes to home automation and xAF (trying to be inclusive, not everyone has a wife ), then one extra voice command is really that bad.
This does look like it's a screenshot from Echo speaks. I tried installing it, haven't had a chance to really play around with it yet, but it looks like the hubitat echo devices that the app creates will report when they are playing or stopped. This is probably on the right track, thanks @GatVlieg.
I also did some googling, and since what I'm ideally looking for is to detect whether a HEOS speaker is playing music (I'm using Echo devices for the voice commands but actually playing the music with HEOS), it looks like HEOS has a published API. If I'm understanding these documents correctly, there's a way to connect to HEOS speakers over telnet?
However, not being a developer, and generally pretty dumb when it comes to this kind of stuff, I have no idea what to do after installing that npm package...
ask
Asks for what to play ( which it totally possible by using the $ sign in the play filed on the action which prompts Alexa to ask āwhat do you want to play ā )
It would still require an extra step (vs. the standard voice command telling Alexa to play x, with the receiver turning on because the music stream started), thus not ideal for WAF.
But since Iām unlikely to figure out a way to make calls to the HEOS api directly, Iāll have to make do with what I can.
Yea I was messing with Alexa over Christmas and stumbled across the capability... it is very handy when u want to play music and do a few other things at the same time ..... eg make it spouse friendly
in the routine add a music / play action ... in there the first field is play... put the $ there and it will try to play whatever came after your activation phrase