PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Commands not sent when HomeBridge thinks device is already in that state #227

Closed jotheman0303 closed 2 years ago

jotheman0303 commented 3 years ago

Very happy using the plugin! Only thing I am still running into is: When I, for example, say "turn off the lights" in a specific room, it does not send the command when it thinks the lights are already in that state. This can happen for example when the lights where already turned off using a separate remote control. It would be great if there would be an option (or the default behavior) that would force sending the command(s) even if the devices are already in the state that is requested. Thanks in advance for looking into this!

nl2rma commented 3 years ago

I can confirm this problem. When I go to bed I have configured 1 virtual-switch in Domoticz that is set when say to Google that I am going to sleep. The state virtual-switch is detected by Domoticz and triggers an event that turns all lights off. The next morning then I ask Google home to turn on the Livingroom noting happens because all lights in the Livingroom still have the status "on" in the accessories page in Homebridge. The quick solve looks like (just as jotheman0303 mentioned) resending the status command even if Homebrigde thinks it already has the state that is asked. But maybe its better if Homebridge\eDomoticz-plugin regularly checks the device status and updates the device state in Homebridge accessories? Many thanks for this great plugin

PatchworkBoy commented 2 years ago

All changes within Domoticz should be pushed to homebridge-edomoticz via MQTT in realtime. Either your remotes / google commands aren't triggering an MQTT message over domoticz/out, or you don't have MQTT configured correctly.

Use Node-Red or MQTTExplorer to monitor domoticz/out topic, and watch for MQTT messages matching the device IDX / command and verify these are taking place.