peteS-UK / emotiva

Home Assistant Media Player for Emotiva Processors
Other
1 stars 1 forks source link

Update Sound Modes for Gen 3 Processors #2

Closed JoshMcWilson closed 1 month ago

JoshMcWilson commented 1 month ago

I'm not sure if I created the Pull Request correctly, as it seems I have to fork the repo to create one, but I did so and listed the sound modes as they appear on the processor (XMC-2). Let me know if anything else is needed.

JoshMcWilson commented 1 month ago

I’m new to GitHub so not sure that my pull request shows up. Looks like it is under the fork I created since I couldn’t open a pull request without doing so. Let me know if you need me to do something different. Thanks!

peteS-UK commented 1 month ago

Hi @JoshMcWilson

Sorry, I led you astray on the need for a PR - I was creating another PR (for the squeezebox integration) while I was sending that and typed the wrong thing. A PR is when you're submitting suggested code changes for me, which I'm happy to take, but don't think is your intent :-)

What I need is the debug code when you're changing sound modes. So, with teh xmc-2 alreadt turned on (to save aiddtional debug), go to the device and enable debug logging

image

Then step through all of the sound modes and keep a note of the names displayed and the order as you go. Then, turn off debug logging and it'll give you a log file. That'll have the whole log from HA in there, so you just need to send me all of the bit for the emotiva stuff at the end of the log, along with the names and order.

JoshMcWilson commented 1 month ago

Ah, no worries, that makes more sense now!

Ok I ran through those steps, here is the order of the sound modes as I cycled through:

Started on Dolby Surround DTS Nerual:X All Stereo Auto Stereo Direct Ended on Dolby Surround

Here are the debug logs, I also attached the actual log txt file to this as well with only this information if it's easier to read that:

home-assistant_emotiva_2024-05-20T02-45-37.860Z.log

2024-05-19 21:44:58.926 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="0">\n <mode value="Dolby Surround" visible="true"/>\n <selected_mode value="Dolby Surround" visible="true"/>\n <center value=" 0.0" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value=" 0.0" visible="true"/>\n <back value=" 0.0" visible="true"/>\n <width value="None" visible="true"/>\n <height value=" 0.0" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:44:58.929 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:44:58.930 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:03.190 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="1">\n <mode value="dts Neural:X" visible="true"/>\n <selected_mode value="Dolby Surround" visible="true"/>\n <center value=" 0.0" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value=" 0.0" visible="true"/>\n <back value=" 0.0" visible="true"/>\n <width value="None" visible="true"/>\n <height value=" 0.0" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:03.191 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:03.191 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:03.191 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:03.192 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:03.951 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from SHIELD Bedroom at 192.168.1.115 2024-05-19 21:45:04.097 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage. 2024-05-19 21:45:06.954 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="2">\n <mode value="All Stereo" visible="true"/>\n <selected_mode value="dts Neural:X" visible="true"/>\n <center value=" 0.0" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value=" 0.0" visible="true"/>\n <back value=" 0.0" visible="true"/>\n <width value="None" visible="true"/>\n <height value=" 0.0" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:06.955 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:06.955 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:06.955 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:06.955 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:06.955 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:06.956 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:06.956 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:06.956 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:06.956 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:06.956 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:10.606 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="3">\n <mode value="Auto" visible="true"/>\n <selected_mode value="All Stereo" visible="true"/>\n <center value=" 0.0" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value=" 0.0" visible="true"/>\n <back value=" 0.0" visible="true"/>\n <width value="None" visible="true"/>\n <height value=" 0.0" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:10.607 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:10.607 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:10.608 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:16.868 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="4">\n <mode value="Stereo" visible="true"/>\n <selected_mode value="Auto" visible="true"/>\n <center value=" 0.0" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value=" 0.0" visible="true"/>\n <back value=" 0.0" visible="true"/>\n <width value="None" visible="true"/>\n <height value=" 0.0" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:16.869 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:16.869 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:16.869 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:16.869 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:16.869 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:16.870 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:16.870 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:16.870 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:16.870 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:16.870 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:20.107 WARNING (MainThread) [homeassistant.components.androidtv_remote] Disconnected from SHIELD Bedroom at 192.168.1.115 2024-05-19 21:45:20.247 ERROR (MainThread) [androidtvremote2] Device doesn't support sending keys. Try clearing the storage of the Android TV Remove Service system app. On the Android TV device, go to Settings > Apps > See all apps > Show system apps. Then, select Android TV Remote Service > Storage > Clear data/storage. 2024-05-19 21:45:21.314 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="5">\n <mode value="Direct" visible="true"/>\n <selected_mode value="Stereo" visible="true"/>\n <center value="None" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value="None" visible="true"/>\n <back value="None" visible="true"/>\n <width value="None" visible="true"/>\n <height value="None" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:21.315 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:21.315 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:21.315 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:21.315 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:21.315 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:21.316 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:21.316 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:21.316 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:21.316 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:21.316 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible 2024-05-19 21:45:24.967 DEBUG (MainThread) [custom_components.emotiva.emotiva] ### Received notification b'<?xml version="1.0"?>\n<emotivaNotify sequence="6">\n <mode value="Dolby Surround" visible="true"/>\n <selected_mode value="Direct" visible="true"/>\n <center value="None" visible="true"/>\n <subwoofer value=" 0.0" visible="true"/>\n <surround value="None" visible="true"/>\n <back value="None" visible="true"/>\n <width value="None" visible="true"/>\n <height value="None" visible="true"/>\n <mode_auto value="Auto" visible="true"/>\n <mode_music value="Music" visible="false"/>\n <mode_movie value="Movie" visible="false"/>\n <selected_movie_music value="Movie" visible="true"/>\n <mode_direct value="Direct" visible="true"/>\n <mode_surround value="Surround" visible="false"/>\n <mode_ref_stereo value="Reference Stereo" visible="true"/>\n <mode_dolby value="Dolby" visible="true"/>\n <mode_dts value="DTS" visible="true"/>\n <mode_all_stereo value="All Stereo" visible="true"/>\n <mode_stereo value="Stereo" visible="true"/>\n</emotivaNotify>\n' 2024-05-19 21:45:24.968 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: selected_mode 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: center 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: subwoofer 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: surround 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: back 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: width 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] Unknown element: height 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_music is no longer visible 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_movie is no longer visible 2024-05-19 21:45:24.969 DEBUG (MainThread) [custom_components.emotiva.emotiva] mode_surround is no longer visible

peteS-UK commented 1 month ago

OK - that's all pretty similar. The dolby and dts names are different, and it handles the music/movie selection slightly differntly, but not a problem. I'm going to use the Model tag to differentiate the settings. Are you discovering the xmc-2, or did you enter the details manually? If you discovered it, what's the Model name? Look at the Device it creates, top left is device info

Device info XMC1VideoUpgrade by Emotiva

My model is XMC1VideoUpgrade. I've added a model field to the manual setup as before model wasn't set if you did manual vs. discovery.

peteS-UK commented 1 month ago

I've made a guess at model names and posted a version 1.7.1, which I think should allow xmc-2 sound modes. I've called the modes generic names (Dolby Music, Dolby Movie, DTS Movie etc.) as I can use these for all models and they actually line up better with the names actually used internally by the API. Let me know how you get on - I can't test it of course. You'll need to delete your integration entry and add a new entry so that it sets things up cleanly.

JoshMcWilson commented 1 month ago

Latest version seems to be working! I did use the auto discover and it finds the XMC-2 with no issues.

I cycled through the Dolby, DTS, stereo, and auto modes and they all seemed to work great. Thanks for getting this working!

peteS-UK commented 1 month ago

Glad to heat it's all working now. Fixed in 1.7.1