Open natethelen opened 1 year ago
Same thing happens to analogs.
Crestron-side Intersystem Communications
light_current_level ain200 aout200 light_level
If you have a light level that is off (Crestron light_level = 0, light_current_level = 0), you turn it on in crestron (Crestron light_level = 0, light_current_level = 65535) , then try and turn it off in HA (setting light_level to 0 and sending to Crestron), nothing happens because from Crestron's point of view nothing has changed.
When I try setting light_level to light_current_level on the Crestron side, it works most of the time, but I run into flashing light problems, especially when doing dimming transitions.
My current solution on this one is to use a Analog Value Sample to propagate the light_current_level to the light_level every couple seconds but I am not completely satisfied as it introduces a delay on the HA side
I am wondering if anyone else has seen this problem and if so, what you have done to deal with it. I am using a media player mute for the example but this happens with any digital.
My setup:
The problem happens when you control a digital from both sides. Sometime you interact with a Crestron interface, sometimes a HA interface. This can happen for example if your remote control is integrated with Crestron but on your phone you only use HA. Before the process below someone has muted and unmuted on Crestron and another time someone has muted and unmuted on HA. Everything is fine as long as you do both the mute and the unmute on one side or the other. The problem occurs when you do one on Crestron then try to do the other on HA. For example:
Crestron State (Currently Unmuted):
Press Mute in Crestron, New Crestron State:
Press Mute in HA. Nothing happens. No change in Crestron's state. If you turn on debug logging in the crestron add-on on the HA side you will see that it sent a mute_control of 0 to Crestron but since the Crestron mute_control value was already 0, Crestron didn't do anything with it, never bubbling the event up to anything the program knows about.
The solution I have put into place is to change the value of the mute_control to be the feedback. This works in any case that you have discrete controls (a "turn mute on" AND a "turn mute off"), but if you only can toggle, this won't work. Does anyone have thoughts as to the best way to handle this overall?