problem with updating the reported state of a dimmer device via MQTT

Topics (not sure which fora)
when not sure where to post, post here and mods will move it to right forum.

Moderators: leecollings, remb0

Post Reply
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

problem with updating the reported state of a dimmer device via MQTT

Post by dbrb2 »

Hi,

This may not be a bug, so I didn't want to put it into that forum....though it could be one.

I have a strange MQTT problem:

I have a wifi dimmer running Tasmota v10

Having enabled autodiscovery in the tasmota code, it is autoDiscovered by Domoticz fine, appearing as a switch with a dimmer slider.
Looking at the MQTT broker with MQTT explorer I can see that the homeassistant topic is created, and populated with device info. Corresponding tele topics are also created to track the behaviour of the discovered units.


When I power up one of these units, it is discovered by Domoticz, and appears as a slider with a light switch.
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

Likewise, if I change the dimmer value from tasmota directly, the value in Domoticz UI does not change,

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)
From the above, I would expect Domoticz to be aware of the device state change...so I have obviously missed something. Any ideas?
User avatar
McMelloW
Posts: 434
Joined: Monday 20 November 2017 17:01
Target OS: Raspberry Pi / ODroid
Domoticz version: V2024.1
Location: Harderwijk, NL
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by McMelloW »

Please check this issue on github. https://github.com/arendst/Tasmota/issues/13700 Perhaps this can be of some help.
Greetings McMelloW
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by dbrb2 »

Thanks - I don't /think/ that is the issue (though I could be wrong)

Through MQTT explorer, I can see that the status of the device is being updated - but this status is not being picked up by Domoticz for some reason
Jimmy06
Posts: 10
Joined: Tuesday 30 January 2018 22:07
Target OS: NAS (Synology & others)
Domoticz version: 2021.1
Location: France
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by Jimmy06 »

Hi,

I have exactly the same problem, and I cannot find any solution on the web...

Did you manage to resolve it?

Thanks,

Jimmy
Synology 1010+ & DS216+ & DS720+ / PI 3 & Domoticz 2021.1 / RFPlayer / ZStick gen5 / Tasmota / Espeasy
dbrb2
Posts: 13
Joined: Saturday 07 March 2020 14:32
Target OS: -
Domoticz version:
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by dbrb2 »

I'm afraid not - I ended up biting the bullet and moving to HA
Sorry!
mrblond18
Posts: 9
Joined: Monday 21 December 2015 11:40
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: netherlands
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by mrblond18 »

Jimmy06 wrote: Sunday 12 December 2021 16:28 Hi,

I have exactly the same problem, and I cannot find any solution on the web...

Did you manage to resolve it?

Thanks,

Jimmy
I have the same problem... Were you able to fix it?
sciurius
Posts: 55
Joined: Monday 26 July 2021 16:39
Target OS: Raspberry Pi / ODroid
Domoticz version: 2021.1
Location: NL
Contact:

Re: problem with updating the reported state of a dimmer device via MQTT

Post by sciurius »

Did you try the Domoticz feature of Tasmota.

Read the docs and then Configuration > Configure Domoticz.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest