Skip to content
This repository has been archived by the owner on Dec 12, 2023. It is now read-only.

Added sound modes #15

Open
wants to merge 4 commits into
base: develop
Choose a base branch
from
Open

Added sound modes #15

wants to merge 4 commits into from

Conversation

uvjustin
Copy link

Hi, just started playing around with home assistant. I added sound mode (sound program in Yamaha speak) functionality and it seems to work on my system.
This is my first time using git to collaborate so please let me know if I'm doing anything wrong especially with the fork/branch/pull request process.

The current way of updating status relies on a worker thread that listens for UDP status messages from the musiccast receiver. The UDP subscription is renewed periodically by the get_status function.
This status update methodology doesn't seem to work for a sound program change because of the way the device responds to a sound program change - while a UDP status message is sent after a sound program change, it doesn't seem to contain any meaningful info, just something like
 {"main":{"status_updated":true},"device_id":"xxxxxxxxxxxx"}. Because of this, the sound program state is not updated immediately and is not updated until the next time get_status is called as part of its resubscribe loop.
I put in a quick and dirty workaround which just sets the sound_program state directly. However this only will only reflect status instantly if the state is updated via HA - for updates from elsewhere we still have to wait for the next resubscribe loop.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant