This was a fun little project. My AV receiver is in another room and the different inputs volume levels don’t match. I would have to reach for a phone app or remote to make changes. I decided to let HE track the volume levels and do the switching.
Normally I would have to unlock my phone, open the Onkyo app, switch to the input, and finally adjust the volume. Since the remote is RF I can’t use it. I could have set it up with the Harmony Hub but why not use HE?
I started with the two most used inputs and created a global variable for each.
The first rule watches for a volume change and updates the variable related to the currently selected input.
I then created two virtual switches and connected them to an Alexa routine. When you say "Alexa, switch to movie" it turns on the movie virtual switch and triggers this rule.
If the receiver is off it will turn on, otherwise it ignores this line. It will then switch inputs and set the volume to the stored value. Finally it turns off the virtual switch because the rule won’t trigger again if the switch is already on.
It works great and is quick. Now the volume tracks with the devices and preferred levels. At 4:30 am a rule sets the values to a default level. That way if I was jamming out the night before it doesn’t blast me first thing in the morning.
Working from home I am using these devices more often. I’ve also added "Alexa, mute" that toggles the receivers mute. This is great when I have a meeting or get a video call. I don’t have to fumble with my phone app to mute the radio.
I just finished adding "Alexa, increase/decrease." This changes the volume by +/-4. Not something I use often but it’s nice if the remote is out of reach.
This one took me a while to figure out. I had to update the respective global variable and then use that to change the volume. Not terribly complex but it was a bear to figure out how to get Rule Machine to work.
It isn’t an Earth shattering implementation but it is a really welcome addition to my automation. It will tie in nicely as I continue to build out movie mode. Ultimately the lights will switch to a scene, the blinds will close, projector will fire up, etc. Currently the biggest holdup is getting the MiLights on HE. I really need to get that project done.