Closed platgeo closed 5 years ago
Issue was not related to the script, I solved the problem by removing mqtt.things in Openhab and configured MQTT thing in paper UI as there is a known bug with textual MQTT thing definiton in OH2.4 Binding. So I close this issue.
Installed the actual script with OH MQTT-binding 2.4, stateTopic is working, commandTopic not:
mqtt.things:
Bridge mqtt:broker:myUnsecureBroker [ host="127.0.0.1", secure=false ] { Thing mqtt:topic:mything { Channels: Type switch : Tuya_Bulb_1_mqtt "LED1 MQTT" [ stateTopic="tuya/lightbulb/12204702807d3a49b2ae/dd28170cbf5dcd08/192.168.75.118/state", commandTopic="tuya/lightbulb/12204702807d3a49b2ae/dd28170cbf5dcd08/192.168.75.118/command" ] } }
item:
Switch tuya_OG_Schlafzimmer1_mqtt "LED1 MQTT 1" <light> {channel="mqtt:topic:mything:Tuya_Bulb_1_mqtt"}
sitemap:
Switch item=tuya_OG_Schlafzimmer1_mqtt label="LED1 MQTT 1"
Expected:
Switching switches light on and off
Behaviour:
When switching light with external app, change of state is reflected. But switching with commandTopic does not work.
Changing commandTopic to
commandTopic="tuya/lightbulb/12204702807d3a49b2ae/dd28170cbf5dcd08/192.168.75.118/command/on" ]
at least switches light on, like before last update.