- Platform information:
- Hardware:Intel® Xeon® E-2224G CPU @ 3.50GHz, 16GB RAM
- OS: UNRAID 6.9.1
- openHAB version: 3
The same issue was already posted a while ago from @black0r1337:
Tuyagateway / Gismocaster with OpenHab2
Unfortunately, there was no solution posted, so I try it again.
I have Openhab, Mosquitto and also Tuyagateway running in Docker on a Unraid system. Openhab works fine with the MQTT broker. Now I would like to control my Tuya lamps via the Tuyagateway.
The Tuyagateway log actually looks promising:
2021-07-04 09:19:41,684 INFO (Thread-1) [tuyagateway.configure] MQTT Connection state: Connection successful for topic tuyagateway/#
2021-07-04 09:19:41,684 INFO (Thread-1) [tuyagateway.configure] discovery message received {"name": "BULB_106", "deviceid": "581......5", "localkey": "c..........7", "ip": "192.168.1.106", "ha_discovery": false, "tuya_discovery": true, "protocol": "3.3", "pref_status_cmd": 10, "dps": [{"key": 1, "name": "Switch on/off", "type_value": "bool", "minimal": 0.0, "maximal": 255.0, "device_component": "switch", "device_topic": "state_topic"}, {"key": 3, "name": "Dimmer", "type_value": "int", "minimal": 0.0, "maximal": 255.0, "device_component": "light", "device_topic": "brightness_state_topic"}, {"key": 4, "name": "Farbe", "type_value": "int", "minimal": 0.0, "maximal": 255.0, "device_component": "light", "device_topic": "color_temp_state_topic"}]} topic tuyagateway/discovery/581........5 retained 1
Discovering from Gismocaster seems to be successfull and also the MQTT-Connection is succcessfull.
But I don’t know how to setup the things. According to the documentation, I thought it should actually be as follows:
Thing topic bulb106 "bulb-106" @ "FF_Wohnzimmer"{
Channels:
Type switch : power [stateTopic="tuya/3.3/581.....5/c.....7/192.168.1.106/1/state",commandTopic="tuya/3.3/581.....5/c.....7/192.168.1.106/command", on="true", off="false"]
}
I also tried the topics:
tuyagateway/3.3/581…5/c…7/192.168.1.106/1/state (same with command)
tuya/581…5/1/state (same with command)
tuyagateway/581…5/1/state (same with command)
Nothing works so far, I cannot switch the bulb on/off.
Maybe there is someone who was able to get that working and give me some hints?
Thanks
Dieter