It would be great if changing the listening mode (Stereo, Auto Surround, Ext. Stereo,…) of a media player or AVR would be supported.
I use the Onkyo integration with HA and miss it.
I implemented such a feature for another platform and would like to have it in HA too.
Github link
nickrout
(Nick Rout)
March 19, 2022, 8:24pm
2
It is supported for, eg, denon. Can’t see it in my onkyo, or in the source.
Would be great if you add it to onkyo! The underlying library seems to support it (and much more)
koying
(Chris B)
March 20, 2022, 9:35am
3
Does it? How is that presented?
AFAIK, HA only support selecting sources, not tweaking the output…
nickrout
(Nick Rout)
March 20, 2022, 9:02pm
4
These are my attributes.
source_list:
- AUX1
- AUX2
- Blu-ray
- Bluetooth
- CBL/SAT
- CD
- DVD
- Favorites
- Flickr
- Game
- Internet Radio
- Media Player
- Media Server
- Online Music
- Spotify
- TV Audio
- Tuner
- iPod/USB
sound_mode_list:
- MUSIC
- MOVIE
- GAME
- AUTO
- STANDARD
- VIRTUAL
- MATRIX
- ROCK ARENA
- JAZZ CLUB
- VIDEO GAME
- MONO MOVIE
- DIRECT
- PURE DIRECT
- DOLBY DIGITAL
- DTS SURROUND
- AURO3D
- MCH STEREO
- STEREO
- ALL ZONE STEREO
friendly_name: Family Room Amp
supported_features: 69004
koying
(Chris B)
March 21, 2022, 8:23am
5
Ok, and how do you actually apply a sound mode from HA?
nickrout
(Nick Rout)
March 21, 2022, 8:19pm
6
In the ui, I’ll do a screenshot when not on tablet, or via the media_player.select_sound_mode
service.
I note the docs say it is only available currently on denon and songpal Media Player - Home Assistant
1 Like
koying
(Chris B)
March 22, 2022, 8:04am
7
Thanks. I see indeed that there is a “SUPPORT_SELECT_SOUND_MODE” capability.
Will see to add that to onkyo. It would be an actual plus as changing the sound mode with the remote is a PITA
nickrout
(Nick Rout)
March 22, 2022, 10:06am
8
Very good of you, I look forward to that as I have both onkyo and denon. Testing if you need.
koying
(Chris B)
March 22, 2022, 4:13pm
9
nickrout:
Testing if you need
Happily.
There is no api to get a list of supported sound modes from the AVR, unfortunately, so I use a kind of baseline list, much like what is done for sources.
Likewise, you can also override the list the same way in YAML with sound_modes
.
Code is at home-assistant/homeassistant/components/onkyo at onkyosoundmode · koying/home-assistant · GitHub
Don’t forget to add a “version” key in the manifest to test the code as a custom component.
nickrout
(Nick Rout)
March 23, 2022, 3:37am
10
Here is my attributes with the stock HA onkyo integration (HA 2022.3.6)
source_list:
- TV
- Bluray
- Game
- Aux1
- Video 1
- Video 2
- Video 3
- Video 4
- Video 5
- Video 6
- Video 7
- Radio
volume_level: 0.5625
is_volume_muted: false
source: Bluray
audio_information:
format: ''
input_frequency: ''
input_channels: ''
listening_mode: All Ch Stereo
output_channels: 3.1 ch
output_frequency: ''
video_information:
input_resolution: UNKNOWN
input_color_schema: ''
input_color_depth: ''
output_resolution: UNKNOWN
output_color_schema: ''
output_color_depth: ''
picture_mode: Direct
video_out: yes,out
friendly_name: TX-NR515_0009B0CC1B8B
supported_features: 20364
nickrout
(Nick Rout)
March 23, 2022, 4:19am
11
And with your custom code (installed as a custom component) NB I have edited this as I mucked up the manifest.json, got it this time!)
source_list:
- TV
- Bluray
- Game
- Aux1
- Video 1
- Video 2
- Video 3
- Video 4
- Video 5
- Video 6
- Video 7
- Radio
sound_mode_list:
- Stereo
- Direct
- Surround
- Film
- Musical
- Orchestra
- Unplugged
- Studio Mix
- TV Logic
- All channels Stereo
- Theatrical
- Dolby Surround
- DTS-X
- Neo 6 Music
volume_level: 0.5625
is_volume_muted: false
source: Bluray
sound_mode: All channels Stereo
audio_information:
format: ''
input_frequency: ''
input_channels: ''
listening_mode: All Ch Stereo
output_channels: 3.1 ch
output_frequency: ''
video_information:
input_resolution: UNKNOWN
input_color_schema: ''
input_color_depth: ''
output_resolution: UNKNOWN
output_color_schema: ''
output_color_depth: ''
picture_mode: Direct
video_out: yes,out
friendly_name: TX-NR515_0009B0CC1B8B
supported_features: 85900
nickrout
(Nick Rout)
March 23, 2022, 4:31am
12
@saxn-paule do you want to give it a try and see if it works on your system?
1 Like
koying
(Chris B)
March 23, 2022, 8:06am
13
As I said, what sound mode is shown as available is pretty much hardcoded.
What would be interesting to test:
test if applying the available sound modes work as expected
Identify missing ones on your devices
Adapt the YAML configuration accordingly
The list of all sound modes across onkyo devices is available at onkyo-eiscp/commands/main/LMD.yaml at e9269e21b346a783dc4902b9003d7467a648695f · miracle2k/onkyo-eiscp · GitHub
The default list is
DEFAULT_SOUND_MODES = {
"stereo": "Stereo",
"direct": "Direct",
"surround": "Surround",
"film": "Film",
"musical": "Musical",
"orchestra": "Orchestra",
"unplugged": "Unplugged",
"studio-mix": "Studio Mix",
"tv-logic": "TV Logic",
"all-ch-stereo": "All channels Stereo",
"theater-dimensional": "Theatrical",
"dolby-surround": "Dolby Surround",
"dts-x": "DTS-X",
"neo-6-music": "Neo 6 Music",
}
If adaptation is needed, you’d have to do the same as what’s done for the source list: build your own with the key being one of the “name” in the github list above, and the value a description of your liking.
nickrout
(Nick Rout)
March 23, 2022, 7:24pm
14
I’ll try it out more today if I get some time Thanks for the great work.
Yes I would give it a try. How could I install your version?
Just adding the sound_mode_list doesn’t work as the config is invalid.
media_player:
- platform: onkyo
host: 192.168.0.195
name: VSX-831
sources:
video2: 'HTPC'
tv: 'TV'
sound_mode_list:
- Stereo
- Direct
- Surround
- All channels Stereo
nickrout
(Nick Rout)
March 29, 2022, 7:14pm
16
It is @koying 's code. Install it as a custom component.
Copy from koying’s repo the directory onkyo and everything below it to your custom_components
directory.
Add a version key to manifest.json
Restart.
1 Like
Mhh doesn’t seem to work. It isn’t listed in custom components:
And also not listed in the installable repos list:
Custom component is in place, version added to manifest.json and HA restarted.
nickrout
(Nick Rout)
March 29, 2022, 7:52pm
18
Did you read my post! Do so. Nothing to do with HACS.
Yes. Please see my last screenshot. I copied the onkyo folder from github into the custom_component folder of my HA installation, added a version entry to manifest.json and restarted HA.
nickrout
(Nick Rout)
March 29, 2022, 8:04pm
20
So after restarting ha, is it working?