-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Switching on by setLevel #221
Comments
While I think of it, Perhaps Edomoticz should filter out the callback message upon "switching on by setLevel"? |
I was able to reproduce the issue. This is what causes the issue...
Both of these commands are send to Domoticz through this plugin. But the "set level" API call of Domoticz will also trigger a power on inside the Domoticz API. Now get's bit random (due to timing) which of the two power on commands if processed through MQTT. Sometimes it's the the one triggered by Domoticz and sometimes the on trigger by HomeKit. If the power on command from Homekit is first then Domoticz uses the old dim level in it's MQTT message as the "set level" API call isn't yet processed. I think loop protection prevents the final "set level" command from being send back to HomeBridge (through MQTT) which results in this issue. I applied a small fix to just ignore the power on command (for 500ms) from Homekit when the device was just turned on by a dimmer command: sander1988@4ee6936 Can you test it? It now works fine in my setup. |
Hi,
Occasionally there is a problem with dimmers, when they are switched on by setting a new level. 50% of the time they jump back to the level when last active.
I tested the following scenario:
This does not occur 100% of the time. If it's not reproduced the first time, repeat the above steps a couple of times to reveal the issue.
I attached a GIF to demo the issue:
Switch is 'on' at level 83.
Switch set to 'off'.
Open switch, set level 26.
Results in switch set to 'on', and level jumps to 83.
This behaviour is tested with:
Domoticz: 2020.2
Homebridge: 1.1.2
Edomoticz: 2.1.37
The text was updated successfully, but these errors were encountered: