PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

mqtt true - domoticz status change but not switch #213

Closed Enjoy-Combi closed 3 years ago

Enjoy-Combi commented 3 years ago

Hello,

If mqtt is set to true, the switch indication changes (to switch on or off) but there is no toggle (switch remains on or off).

Any idea ?

Enjoy-Combi commented 3 years ago

Hello,

I google this issue. From the results I get I wonder if edomoticz sends messages in some thing like : mosquitto_pub -h localhost -m '{"command": "switchlight", "idx": 24, "switchcmd": "Toggle" }' -t 'domoticz/in' Or trying to communicate directly with the switch which is under tasmato firmware with a different topic. I think this is the first method used ?

Enjoy-Combi commented 3 years ago

With mosquitto_sub -h localhost -t "domoticz/in"

I can see that mosquitto gets the following messages when clicking under homebridge: {"command":"switchlight","idx":79,"switchcmd":"Off"} {"command":"switchlight","idx":79,"switchcmd":"On"} {"command":"switchlight","idx":79,"switchcmd":"Off"} {"command":"switchlight","idx":33,"switchcmd":"On"} {"command":"switchlight","idx":33,"switchcmd":"Off"} {"command":"switchlight","idx":39,"switchcmd":"On"} {"command":"switchlight","idx":39,"switchcmd":"Off"} {"command":"switchlight","idx":83,"switchcmd":"Off"} {"command":"switchlight","idx":79,"switchcmd":"On"} {"command":"switchlight","idx":79,"switchcmd":"Off"}

if I do mosquitto_pub -h localhost -m '{"command":"switch","idx":79,"switchcmd":"Toggle"}' -t "domoticz/in": Under domoticz the status of the switch changes but not the state, status under homebridge unchanged.

if I do this : mosquitto_pub -h localhost -m toggle -t "cmnd/lumieres-garage/Power" toggles the relay and status under domoticz but status unchanged under homebridge.

If I click on a light under domoticz and listen domoticz/out, here is what I get { "Battery" : 255, "RSSI" : 12, "description" : "", "dtype" : "Temp", "hwid" : "4", "id" : "1", "idx" : 8, "name" : "CPU raspberry serveur", "nvalue" : 0, "stype" : "LaCrosse TX3", "svalue1" : "56.0", "unit" : 1 }

And relay toggled, status changed both under domoticz & homebridge.

I am lost :-)

Enjoy-Combi commented 3 years ago

Finally the issue I reported is the same as the #206 issue. Fixed