PatchworkBoy / homebridge-edomoticz

Domoticz Homebridge-Plugin
Other
118 stars 44 forks source link

Sonoff Tasmota devices don't react to commands via HomeBridge #232

Closed Calzor-Suzay closed 3 years ago

Calzor-Suzay commented 3 years ago

I have a problem with two Sonoff plugs running Tasmota 9.2.

They appear in Domoticz I can turn them on/off through domoticz, I can also turn them on/off at the button on the plug and Domoticz can see the status change. I've added them to a room and they appear in Homebridge fine, the status also follows through.

The problem I have is if I activate it either by the homebridge accessories page or homekit the devices update in homebridge and show the required status in Domoticz but don't actually turn on/off.

If I press on/off in Domoticz 2021-02-01 20:51:23.635 Status: User: Admin (IP: 192.168.1.9) initiated a switch command (248/Sonoff_plug-142/On) 2021-02-01 20:51:25.565 (Dummy_Hardware) Lighting 1 (Sonoff_plug-142) 2021-02-01 20:51:25.549 Status: User: Admin (IP: 192.168.1.9) initiated a switch command (248/Sonoff_plug-142/Off) The status updates in Domoticz, Homebridge and you can see it in homekit iOS along with the device actually turning on/off

If I press on/off on the actual device 2021-02-01 20:53:00.437 MQTT: Topic: domoticz/in, Message: {"idx":248,"nvalue":1,"svalue":"","Battery":100,"RSSI":8} 2021-02-01 20:53:09.486 MQTT: Topic: domoticz/in, Message: {"idx":248,"nvalue":0,"svalue":"","Battery":100,"RSSI":8} The status updates in Domoticz, Homebridge and you can see it in homekit iOS along with the device actually turning on/off

If I press on/off in Homebridge 2021-02-01 20:55:00.360 MQTT: Topic: domoticz/in, Message: {"command":"switchlight","idx":248,"switchcmd":"On"} 2021-02-01 20:55:00.369 (Dummy_Hardware) Lighting 1 (Sonoff_plug-142) 2021-02-01 20:55:06.837 MQTT: Topic: domoticz/in, Message: {"command":"switchlight","idx":248,"switchcmd":"Off"} 2021-02-01 20:55:06.850 (Dummy_Hardware) Lighting 1 (Sonoff_plug-142) The status updates in Domoticz, Homebridge and you can see it in homekit iOS but the actual device doesn't turn on/off

Any ideas?

K1WIZ commented 3 years ago

Having this problem as well. If I don't use MQTT, then I can control Domoticz/Tasmota devices just fine (assuming homebridge uses rest calls when MQTT is not selected).

When NOT using MQTT, and doing HOMEKIT >> homebridge >> Domoticz >> tasmota endpoint - I can control the end device and it responds, but if I change the state of the device (not through homekit) but through Domoticz directly, I can change the state, but the state is not reflected in HomeKit or Homebridge.

If using MQTT, I seem to be able to change the state when doing HomeKit >> Homebridge >> Domoticz and can change teh state on domoticz directly and have the state change show up to HomeKit. In this scenario, the actual end device (in this case all my switches and endpoints run Tasmota) do not respond, but yet I can see the object in Domoticz and Homekit respond (like the OP mentioned).

It appears that homebridge is not sending the correct MQTT message that Tasmota devices expect when their associated Domoticz controls are manipulated via Homebridge.

Calzor-Suzay commented 3 years ago

I've now since moved away from Domoticz to Home Assistant, numerous issues never resolved or sorted from Domoticz so gave up and moved the whole ship to HASS.

Sorry https://github.com/K1WIZ you might need to open a separate issue.