PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Switches in Domoticz don't react to state change in home bridge #206

Closed RomanZ17 closed 2 years ago

RomanZ17 commented 4 years ago

When I click a switch in home bridge ui, its state changes in domoticz, but lights don't actually switch. And if i click same switch in domoticz, it works fine. No errors in logs and mqtt seems to be working fine.

villmatt commented 4 years ago

I am experiencing the same issue. I know a work around by having another dummy switch and a rule So if the new dummy switch is on turn old dummy switch on.

But I have other tasmota/mqtt devices working without the need for that solution. Just stumped on what I’ve done wrong

stas-demydiuk commented 4 years ago

Have just the same issue and only with tasmota/mqtt devices

ludonice54 commented 4 years ago

Hi ,

Same issue here . In my case problem seems be on switch with extinction delay . In Domoticz i set my switch to turn off after 1sec .

  1. When i turn On in homekit my switch turn on and after 1 second turn off but in logs domotics i see only turn on action .
  2. When I turn it On again via Homekit, my switch on homekit stay ON and nothing are send to Domoticz via MQTT .
  3. If I turn it off in homekit , request to turn off is sending .
  4. If I turn On again i restarted on step 1

homebridge-edomoticz v2.1.34 Homebridge Version 1.1.1

Thanks for your help

tukestolo1 commented 3 years ago

I am facing the same problem :/

skywalker1979 commented 3 years ago

i see the same problem as well. It also happens if you use events on some switches (for example you switch on a switch and using lua events, at the same time you turn off another switch.)

skywalker1979 commented 3 years ago

Maybe i'm wrong, but i noticed that MQTT receives ok the first "on" and first "off" message. The following (third, right after the auto delay triggered or a lua event) "ON" message is never received on MQTT Explorer. The fourth MQTT message just updates the "last seen" field on domoticz.

skywalker1979 commented 3 years ago

Yesterday i updated nodejs and after all plugins (Homebridge edomoticz, homebridge, Homebridge Config UI X) I cannot see this problem anymore.

ojozef commented 3 years ago

Yesterday i updated nodejs and after all plugins (Homebridge edomoticz, homebridge, Homebridge Config UI X) I cannot see this problem anymore.

I have the same problem. Could you please share all software versions of your setup (nodes, domoticz, edomoticz, etc)?

skywalker1979 commented 3 years ago

Sure thing: NodeJS: 12.18.3 Homebridge: 1.1.3 homebridge-edomoticz v2.1.38 homebridge-config-ui-x v4.27.1

ojozef commented 3 years ago

Sure thing: NodeJS: 12.18.3 Homebridge: 1.1.3 homebridge-edomoticz v2.1.38 homebridge-config-ui-x v4.27.1

Thank you! What version of domoticz you have? I think I have this issue after update domoticz from 4.9700 to the 2020.02

skywalker1979 commented 3 years ago

i have 2020.2 Version: 2020.2 Build Hash: b63341bc0 Compile Date: 2020-04-26 13:47:55 dzVents Version: 3.0.2 Python Version: 3.7.3 (default, Dec 20 2019, 18:57:59) [GCC 8.3.0]

ojozef commented 3 years ago

Thank you. Looks like I have the same setup and I'm still facing this issue :(

skywalker1979 commented 3 years ago

if it was the same problem, it's completely disappeared for me with the version indicated above. in the mqtt client i have localhost instead of 127.0.0.1 (probably has nothing to do ) and port 1883 Otherwise i have not made other changes, and suddenly after updating "something" of what i wrote above, the problem was gone.

ojozef commented 3 years ago

Finally found what is the problem. I didn't mention it before but like @stas-demydiuk I had problems with my tasmota devices. It turns out that mqtt implementation has changed in domoticz. Details can be found here: https://www.domoticz.com/forum/viewtopic.php?f=6&t=31711&start=20

To fix tasmota devices you need to set "Prevent loop" to "false" under "Hardware" configuration for "MQTT Client Gateway with LAN interface" in domoticz.

odelma commented 1 year ago

Finally found what is the problem. I didn't mention it before but like @stas-demydiuk I had problems with my tasmota devices. It turns out that mqtt implementation has changed in domoticz. Details can be found here: https://www.domoticz.com/forum/viewtopic.php?f=6&t=31711&start=20

To fix tasmota devices you need to set "Prevent loop" to "false" under "Hardware" configuration for "MQTT Client Gateway with LAN interface" in domoticz.

Only have a couple of Tasmota devices and very rarely want to command them via Homekit. So took me a while to notice this. The link to Domoticz forum is not working anymore and I will not want to create a loop for mqtt so prefer to keep the prevent loop setting as true. Is there no hope for me, except dummy switches?