AVR control and audio balancing

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.

1 Like

Impressive rule machine chops!

But does your receiver not allow you to adjust the output level for each source?

I believe it does. It is awkward but looks like you can do it one input at a time. Switch input, enter setup, navigate menus, switch input, enter setup, …

Even so, I don’t always listen to each source at comparable levels. And then there’s the streaming apps. HBO is lower than anything else and you can’t adjust the streams. If the radio and Apple TV matched for the most part HBO would still need to be 10 points higher.

And I do find myself switching more. If I’m watching something and get up to fix something in the kitchen I’ll switch back to radio because it is now so easy. I can’t see the screen from the kitchen but I do have ceiling speakers there.

1 Like

Download the Hubitat app