Add soundmode Heos(AVR)

Tags: #<Tag:0x00007f73b4895b00>

Adding select sound_mode to Heos devices such as the AVR to select the best sound mode based on the signal. Audio signal format and sound mode are exposed in the app, so it should be possible to add this to the Heos integration.

FYI, I’m using Node Red and node-red-contrib-denon
to send commands to my receiver.

You can set sound modes with this method, but I do it based on the input or source, not sure if I’d want to do it based on signal format. I can also send commands to select the input source.

Since “best” is subjective, I’d think if you had the ability to send sound modes and read the signal format then you could do it with an automation.

I would like to create automations based on the audio signal to select a sound mode.

For instance, if the source outputs PCM I do want my AVR in the stereo mode, and if the source is Dolby Digital I do want my AVR to set the mode to auto.

This should be possible if the signal and sound mode are exposed by the Heos integration.
For now, this is not possible. The integration only shows info about the source, not the signal or sound mode.

When this isn’t possible the node-red workaround should be fine I guess.

I may try playing with the DenonAVR integration to see what that can do.

With Node Red and contrib-denon, I’m not able to get information from the receiver, can only send commands right now.

Tried DenonAVR, it didn’t help any, the Heos integration provides more information.

So did some research, and found if you send a denon this command

It will return status the includes power, input selected and volume in a xml formatted message.

So in Node Red, if you put the above into. a http request node, feed that into a xml formatting node, then use a function node with this

if (msg.payload.item.InputFuncSelect[0].value[0] === "SAT/CBL") {
    return [msg,null];

This will direct the flow into the top output.
I have an output for every sound mode, and then direct the output based on the input selected. SAT/CBL is the TV so it selects Dolby Digital. Other inputs select Direct.

I was only able to figure out how to set sound mode based on input, but that’s what I was looking to do.