Evening,
I have a strange MQTT problem:
I have a wifi dimmer running Tasmota
It is autoDiscovered by Domoticz fine, appearing as a switch with a dimmer slider.
From the domoticz UI, I can set the brightness level, and the dimmer responds. In response, the Domoticz UI updates to match reality.
However, if I toggle the switch from the Domoticz UI, though the light responds, turning OFF / ON as requested, the Domoticz UI does not update
I can only assume that some MQTT response that is expected has not been seen:
Switching the dimmer on using the Domoticz UI icon does indeed turn the light on - but the UI does not change - it still thinks it is off.
Taken from the device logs:
Code: Select all
00:17:49.466 MQT: tele/bedroom_light/SENSOR = {"Time":"2021-11-30T00:17:49","COUNTER":{"C1":0}}
00:17:50.452 SRC: MQTT
00:17:50.454 CMD: Grp 0, Cmnd 'POWER', Idx 1, Len 2, Data 'ON'
00:17:50.468 MQT: tele/bedroom_light/STATE = {"Time":"2021-11-30T00:17:50","Uptime":"0T01:10:10","UptimeSec":4210,"Heap":23,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":19,"MqttCount":1,"POWER":"ON","Dimmer":44,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"barkernet","BSSId":"78:65:59:7C:9E:47","Channel":6,"Mode":"11n","RSSI":100,"Signal":-50,"LinkCount":1,"Downtime":"0T00:00:03"}}
00:17:50.474 MQT: stat/bedroom_light/RESULT = {"POWER":"ON"}
00:17:50.476 MQT: stat/bedroom_light/POWER = ON
00:17:50.488 MQT: tele/bedroom_light/HASS_STATE = {"Version":"10.0.0(tasmota)","BuildDateTime":"2021-11-29T22:05:54","Module or Template":"WiFi-Dimmer","RestartReason":"Software/System restart","Uptime":"0T01:10:10","Hostname":"bedroom-light-6487","IPAddress":"192.168.1.23","RSSI":"100","Signal (dBm)":"-50","WiFi LinkCount":1,"WiFi Downtime":"0T00:00:03","MqttCount":1,"LoadAvg":19}
00:17:50.558 CFG: Saved to flash at FB, Count 1444, Bytes 4096
The Domoticz logs for the same event show:
Code: Select all
2021-11-29 23:16:28.635 MQTT: onMQTTPublish: tele/bedroom_light/STATE:b'{"Time":"2021-11-30T00:16:28","Uptime":"0T01:08:48","UptimeSec":4128,"Heap":23,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":32,"MqttCount":1,"POWER":"ON","Dimmer":45,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"barkernet","BSSId":"78:65:59:7C:9E:47","Channel":6,"Mode":"11n","RSSI":100,"Signal":-50,"LinkCount":1,"Downtime":"0T00:00:03"}}'
2021-11-29 23:16:28.635 MQTT: getDevices key: '' configkey: '' hasconfigkey: '' value: '' config: '' topic: 'tele/bedroom_light/STATE'
2021-11-29 23:16:28.636 MQTT: getDevices found 1 devices
2021-11-29 23:16:28.636 MQTT: Got state_topic
2021-11-29 23:16:28.636 MQTT: No value_template
2021-11-29 23:16:28.636 MQTT: nValue: '0'
2021-11-29 23:16:28.636 MQTT: Got brightness_state_topic
2021-11-29 23:16:28.637 MQTT: brightness_value_template: 'Dimmer'
2021-11-29 23:16:28.637 MQTT: message[brightness_value_template]: '45'
2021-11-29 23:16:28.506 Status: User: Admin (IP: 192.168.1.154) initiated a switch command (2659/MQTT - Bedroom light/On)
Could the issue be related to the "no value_template" line...?
Cheers!