_A clear and concise description of what the problem is._
Dimmer value overshoots consistently when set using either MQTT or the slider in the web interfaces. The dimmer value increases if the lamp is toggled off and then on again (observed to happen at least twice in two cycles of off and on again).
_Make sure your have performed every step and checked the applicable boxes before submitting your issue. Thank you!_
Backlog Template; Module; GPIO 255: Configuration output here:
20:38:43 CMD: Backlog Template; Module; GPIO 255
20:38:43 SRC: WebConsole from 192.168.2.81
20:38:43 CMD: Group 0, Index 1, Command "BACKLOG", Data "Template; Module; GPIO 255"
20:38:44 SRC: Backlog
20:38:44 CMD: Group 0, Index 1, Command "TEMPLATE", Data ""
20:38:44 MQT: Dimmer_2/stat/RESULT = {"NAME":"RJWF-02A","GPIO":[17,107,0,108,0,0,0,0,0,0,52,0,0],"FLAG":0,"BASE":54}
20:38:44 SRC: Backlog
20:38:44 CMD: Group 0, Index 1, Command "MODULE", Data ""
20:38:44 MQT: Dimmer_2/stat/RESULT = {"Module":{"0":"RJWF-02A"}}
20:38:44 SRC: Backlog
20:38:44 CMD: Group 0, Index 1, Command "GPIO", Data "255"
20:38:44 MQT: Dimmer_2/stat/RESULT = {"GPIO0":{"17":"Button1"},"GPIO1":{"107":"Tuya Tx"},"GPIO2":{"0":"None"},"GPIO3":{"108":"Tuya Rx"},"GPIO4":{"0":"None"},"GPIO5":{"0":"None"},"GPIO9":{"0":"None"},"GPIO10":{"0":"None"},"GPIO12":{"0":"None"},"GPIO13":{"0":"None"},"GPIO14":{"52":"Led1"},"GPIO15":{"0":"None"},"GPIO16":{"0":"None"}}
Backlog Rule1; Rule2; Rule3: Rules output here:
Status 0: STATUS 0 output here:
20:40:30 CMD: Status 0
20:40:30 SRC: WebConsole from 192.168.2.81
20:40:30 CMD: Group 0, Index 1, Command "STATUS", Data "0"
20:40:30 MQT: Dimmer_2/stat/STATUS = {"Status":{"Module":0,"FriendlyName":["Dimmer 2"],"Topic":"Dimmer_2","ButtonTopic":"0","Power":1,"PowerOnState":3,"LedState":1,"LedMask":"FFFF","SaveData":1,"SaveState":1,"SwitchTopic":"0","SwitchMode":[0,0,0,0,0,0,0,0],"ButtonRetain":0,"SwitchRetain":0,"SensorRetain":0,"PowerRetain":0}}
20:40:30 MQT: Dimmer_2/stat/STATUS1 = {"StatusPRM":{"Baudrate":9600,"SerialConfig":"8N1","GroupTopic":"tasmotas","OtaUrl":"http://thehackbox.org/tasmota/release/tasmota.bin","RestartReason":"Software/System restart","Uptime":"0T00:21:12","StartupUTC":"2019-12-30T19:19:18","Sleep":50,"CfgHolder":4617,"BootCount":22,"SaveCount":369,"SaveAddress":"F4000"}}
20:40:30 MQT: Dimmer_2/stat/STATUS2 = {"StatusFWR":{"Version":"8.1.0.2(1e06976-tasmota)","BuildDateTime":"2019-12-30T19:00:11","Boot":31,"Core":"2_6_1","SDK":"2.2.2-dev(38a443e)","Hardware":"ESP8266EX","CR":"321/699"}}
20:40:30 MQT: Dimmer_2/stat/STATUS3 = {"StatusLOG":{"SerialLog":0,"WebLog":4,"MqttLog":0,"SysLog":0,"LogHost":"","LogPort":514,"SSId":["SuperIoT",""],"TelePeriod":300,"Resolution":"558180C0","SetOption":["000A8009","2805C8000100060000005A00000000000000","08080200","00000000"]}}
20:40:30 MQT: Dimmer_2/stat/STATUS4 = {"StatusMEM":{"ProgramSize":567,"Free":436,"Heap":23,"ProgramFlashSize":1024,"FlashSize":2048,"FlashChipId":"1540C8","FlashMode":0,"Features":["00000809","8FDAE397","043683A0","22B617CD","01001BC0","00007881"],"Drivers":"1,2,3,4,5,6,7,8,9,10,12,16,18,19,20,21,22,24,26,29","Sensors":"1,2,3,4,5,6,7,8,9,10,14,15,17,18,20,22,26,34"}}
20:40:30 MQT: Dimmer_2/stat/STATUS5 = {"StatusNET":{"Hostname":"Dimmer_2","IPAddress":"192.168.2.98","Gateway":"192.168.2.254","Subnetmask":"255.255.255.0","DNSServer":"192.168.2.10","Mac":"2C:F4:32:19:18:94","Webserver":2,"WifiConfig":2,"WifiPower":17.0}}
20:40:30 MQT: Dimmer_2/stat/STATUS6 = {"StatusMQT":{"MqttHost":"192.168.2.2","MqttPort":1883,"MqttClientMask":"Dimmer 2","MqttClient":"Dimmer 2","MqttUser":"mqtt","MqttCount":1,"MAX_PACKET_SIZE":1000,"KEEPALIVE":30}}
20:40:30 MQT: Dimmer_2/stat/STATUS7 = {"StatusTIM":{"UTC":"Mon Dec 30 19:40:30 2019","Local":"Mon Dec 30 20:40:30 2019","StartDST":"Sun Mar 31 02:00:00 2019","EndDST":"Sun Oct 27 03:00:00 2019","Timezone":"+01:00","Sunrise":"08:43","Sunset":"17:01"}}
20:40:30 MQT: Dimmer_2/stat/STATUS10 = {"StatusSNS":{"Time":"2019-12-30T20:40:30"}}
20:40:30 MQT: Dimmer_2/stat/STATUS11 = {"StatusSTS":{"Time":"2019-12-30T20:40:30","Uptime":"0T00:21:12","UptimeSec":1272,"Heap":23,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER":"ON","Dimmer":68,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":100,"Signal":-44,"LinkCount":1,"Downtime":"0T00:00:07"}}}
weblog 4 _for more debug information)_ Console output here:
00:00:17 MQT: Received Topic "Dimmer_2/cmnd/Dimmer", Data Size 2, Data "50"
00:00:17 SRC: MQTT
00:00:17 CMD: Group 0, Index 1, Command "DIMMER", Data "50"
00:00:17 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:17","Uptime":"0T00:00:19","UptimeSec":19,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":99,"MqttCount":1,"POWER":"ON","Dimmer":50,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":100,"Signal":-44,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:17 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":50}
00:00:17 LGT: Channels 02020000000000000000
00:00:17 TYA: Send dim value=128 (id=2)
00:00:17 TYA: Send "55aa00060008020200040000008095"
00:00:17 {"TuyaReceived":{"Data":"55AA00070008020200040000008096","Cmnd":7,"CmndData":"0202000400000080","DpId":2,"DpIdType":2,"DpIdData":"00000080"}}
00:00:17 TYA: fnId=21 is set for dpId=2
00:00:17 TYA: RX Dim State=128
00:00:17 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:17 TYA: fnId=11 is set for dpId=1
00:00:17 TYA: RX Relay-1 --> MCU State: On Current State:On
00:00:17 {"TuyaReceived":{"Data":"55AA00070008020200040000008EA4","Cmnd":7,"CmndData":"020200040000008E","DpId":2,"DpIdType":2,"DpIdData":"0000008E"}}
00:00:17 TYA: fnId=21 is set for dpId=2
00:00:17 TYA: RX Dim State=142
00:00:17 SRC: Switch
00:00:17 CMD: Group 0, Index 1, Command "DIMMER", Data "56"
00:00:17 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:17","Uptime":"0T00:00:19","UptimeSec":19,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":104,"MqttCount":1,"POWER":"ON","Dimmer":56,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":100,"Signal":-44,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:17 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":56}
00:00:18 LGT: Channels 3E020000000000000000
00:00:18 TYA: Send dim skipped value=143
00:00:18 CFG: Saved to flash at F4, Count 385, Bytes 4096
00:00:20 TYA: Send "55aa00000000ff"
00:00:20 {"TuyaReceived":{"Data":"55AA000000010101","Cmnd":0,"CmndData":"01"}}
00:00:20 TYA: Heartbeat
00:00:24 {"TuyaReceived":{"Data":"55AA0007000501010001000E","Cmnd":7,"CmndData":"0101000100","DpId":1,"DpIdType":1,"DpIdData":"00"}}
00:00:24 TYA: fnId=11 is set for dpId=1
00:00:24 TYA: RX Relay-1 --> MCU State: Off Current State:On
00:00:24 SRC: Switch
00:00:24 LGT: Channels 00000000000000000000
00:00:24 TYA: Send dim skipped value=0
00:00:24 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:24","Uptime":"0T00:00:25","UptimeSec":25,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":99,"MqttCount":1,"POWER":"OFF","Dimmer":56,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":84,"Signal":-58,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:24 MQT: Dimmer_2/stat/RESULT = {"POWER":"OFF"}
00:00:24 MQT: Dimmer_2/stat/POWER = OFF
00:00:24 {"TuyaReceived":{"Data":"55AA00070008020200040000008EA4","Cmnd":7,"CmndData":"020200040000008E","DpId":2,"DpIdType":2,"DpIdData":"0000008E"}}
00:00:24 TYA: fnId=21 is set for dpId=2
00:00:24 TYA: RX Dim State=142
00:00:24 {"TuyaReceived":{"Data":"55AA0007000501010001000E","Cmnd":7,"CmndData":"0101000100","DpId":1,"DpIdType":1,"DpIdData":"00"}}
00:00:24 TYA: fnId=11 is set for dpId=1
00:00:24 TYA: RX Relay-1 --> MCU State: Off Current State:Off
00:00:24 {"TuyaReceived":{"Data":"55AA00070008020200040000001026","Cmnd":7,"CmndData":"0202000400000010","DpId":2,"DpIdType":2,"DpIdData":"00000010"}}
00:00:24 TYA: fnId=21 is set for dpId=2
00:00:24 TYA: RX Dim State=16
00:00:24 CFG: Saved to flash at FB, Count 386, Bytes 4096
00:00:25 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":6}
00:00:25 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:25 TYA: fnId=11 is set for dpId=1
00:00:25 TYA: RX Relay-1 --> MCU State: On Current State:On
00:00:25 {"TuyaReceived":{"Data":"55AA00070008020200040000008EA4","Cmnd":7,"CmndData":"020200040000008E","DpId":2,"DpIdType":2,"DpIdData":"0000008E"}}
00:00:25 TYA: fnId=21 is set for dpId=2
00:00:25 TYA: RX Dim State=142
00:00:25 SRC: Switch
00:00:25 CMD: Group 0, Index 1, Command "DIMMER", Data "56"
00:00:25 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:25","Uptime":"0T00:00:26","UptimeSec":26,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":49,"MqttCount":1,"POWER":"ON","Dimmer":56,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:25 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":56}
00:00:25 {"TuyaReceived":{"Data":"55AA00070008020200040000008FA5","Cmnd":7,"CmndData":"020200040000008F","DpId":2,"DpIdType":2,"DpIdData":"0000008F"}}
00:00:25 TYA: fnId=21 is set for dpId=2
00:00:25 TYA: RX Dim State=143
00:00:25 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:25 TYA: fnId=11 is set for dpId=1
00:00:25 TYA: RX Relay-1 --> MCU State: On Current State:On
00:00:25 {"TuyaReceived":{"Data":"55AA00070008020200040000009FB5","Cmnd":7,"CmndData":"020200040000009F","DpId":2,"DpIdType":2,"DpIdData":"0000009F"}}
00:00:25 TYA: fnId=21 is set for dpId=2
00:00:25 TYA: RX Dim State=159
00:00:25 SRC: Switch
00:00:25 CMD: Group 0, Index 1, Command "DIMMER", Data "62"
00:00:25 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:25","Uptime":"0T00:00:26","UptimeSec":26,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":49,"MqttCount":1,"POWER":"ON","Dimmer":62,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:25 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":62}
00:00:25 LGT: Channels 7A020000000000000000
00:00:25 TYA: Send dim skipped value=158
00:00:25 CFG: Saved to flash at FA, Count 387, Bytes 4096
00:00:26 WIF: Checking connection...
00:00:26 WIF: Connected
00:00:26 {"TuyaReceived":{"Data":"55AA0007000501010001000E","Cmnd":7,"CmndData":"0101000100","DpId":1,"DpIdType":1,"DpIdData":"00"}}
00:00:26 TYA: fnId=11 is set for dpId=1
00:00:26 TYA: RX Relay-1 --> MCU State: Off Current State:On
00:00:26 SRC: Switch
00:00:26 LGT: Channels 00000000000000000000
00:00:26 TYA: Send dim skipped value=0
00:00:26 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:26","Uptime":"0T00:00:28","UptimeSec":28,"Heap":27,"SleepMode":"Dynamic","Sleep":50,"LoadAvg":77,"MqttCount":1,"POWER":"OFF","Dimmer":62,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:26 MQT: Dimmer_2/stat/RESULT = {"POWER":"OFF"}
00:00:26 MQT: Dimmer_2/stat/POWER = OFF
00:00:26 {"TuyaReceived":{"Data":"55AA00070008020200040000009FB5","Cmnd":7,"CmndData":"020200040000009F","DpId":2,"DpIdType":2,"DpIdData":"0000009F"}}
00:00:26 TYA: fnId=21 is set for dpId=2
00:00:26 TYA: RX Dim State=159
00:00:26 {"TuyaReceived":{"Data":"55AA0007000501010001000E","Cmnd":7,"CmndData":"0101000100","DpId":1,"DpIdType":1,"DpIdData":"00"}}
00:00:26 TYA: fnId=11 is set for dpId=1
00:00:26 TYA: RX Relay-1 --> MCU State: Off Current State:Off
00:00:26 {"TuyaReceived":{"Data":"55AA00070008020200040000001026","Cmnd":7,"CmndData":"0202000400000010","DpId":2,"DpIdType":2,"DpIdData":"00000010"}}
00:00:26 TYA: fnId=21 is set for dpId=2
00:00:26 TYA: RX Dim State=16
00:00:27 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:27 TYA: fnId=11 is set for dpId=1
00:00:27 TYA: RX Relay-1 --> MCU State: On Current State:Off
00:00:27 SRC: Switch
00:00:27 LGT: Channels 7A020000000000000000
00:00:27 TYA: Send dim value=158 (id=2)
00:00:27 TYA: Send "55aa00060008020200040000009eb3"
00:00:27 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:27","Uptime":"0T00:00:29","UptimeSec":29,"Heap":27,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":53,"MqttCount":1,"POWER":"ON","Dimmer":62,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:27 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON"}
00:00:27 MQT: Dimmer_2/stat/POWER = ON
00:00:27 {"TuyaReceived":{"Data":"55AA00070008020200040000001026","Cmnd":7,"CmndData":"0202000400000010","DpId":2,"DpIdType":2,"DpIdData":"00000010"}}
00:00:27 TYA: fnId=21 is set for dpId=2
00:00:27 TYA: RX Dim State=16
00:00:27 SRC: Switch
00:00:27 CMD: Group 0, Index 1, Command "DIMMER", Data "6"
00:00:27 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:27","Uptime":"0T00:00:29","UptimeSec":29,"Heap":26,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":53,"MqttCount":1,"POWER":"ON","Dimmer":6,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:27 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":6}
00:00:27 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:27 TYA: fnId=11 is set for dpId=1
00:00:27 TYA: RX Relay-1 --> MCU State: On Current State:On
00:00:27 {"TuyaReceived":{"Data":"55AA00070008020200040000009FB5","Cmnd":7,"CmndData":"020200040000009F","DpId":2,"DpIdType":2,"DpIdData":"0000009F"}}
00:00:27 TYA: fnId=21 is set for dpId=2
00:00:27 TYA: RX Dim State=159
00:00:27 SRC: Switch
00:00:27 CMD: Group 0, Index 1, Command "DIMMER", Data "62"
00:00:27 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:27","Uptime":"0T00:00:29","UptimeSec":29,"Heap":26,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":53,"MqttCount":1,"POWER":"ON","Dimmer":62,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:27 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":62}
00:00:27 {"TuyaReceived":{"Data":"55AA00070008020200040000009EB4","Cmnd":7,"CmndData":"020200040000009E","DpId":2,"DpIdType":2,"DpIdData":"0000009E"}}
00:00:27 TYA: fnId=21 is set for dpId=2
00:00:27 TYA: RX Dim State=158
00:00:28 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpId":1,"DpIdType":1,"DpIdData":"01"}}
00:00:28 TYA: fnId=11 is set for dpId=1
00:00:28 TYA: RX Relay-1 --> MCU State: On Current State:On
00:00:28 {"TuyaReceived":{"Data":"55AA0007000802020004000000ADC3","Cmnd":7,"CmndData":"02020004000000AD","DpId":2,"DpIdType":2,"DpIdData":"000000AD"}}
00:00:28 TYA: fnId=21 is set for dpId=2
00:00:28 TYA: RX Dim State=173
00:00:28 SRC: Switch
00:00:28 CMD: Group 0, Index 1, Command "DIMMER", Data "68"
00:00:28 MQT: Dimmer_2/tele/STATE = {"Time":"1970-01-01T00:00:28","Uptime":"0T00:00:29","UptimeSec":29,"Heap":26,"SleepMode":"Dynamic","Sleep":10,"LoadAvg":53,"MqttCount":1,"POWER":"ON","Dimmer":68,"Fade":"OFF","Speed":1,"LedTable":"ON","Wifi":{"AP":1,"SSId":"SuperIoT","BSSId":"18:E8:29:FE:4D:16","Channel":11,"RSSI":78,"Signal":-61,"LinkCount":1,"Downtime":"0T00:00:07"}}
00:00:28 MQT: Dimmer_2/stat/RESULT = {"POWER":"ON","Dimmer":68}
00:00:28 LGT: Channels B6020000000000000000
00:00:28 TYA: Send dim skipped value=173
00:00:28 CFG: Saved to flash at F8, Count 389, Bytes 4096
00:00:31 TYA: Send "55aa00000000ff"
00:00:31 {"TuyaReceived":{"Data":"55AA000000010101","Cmnd":0,"CmndData":"01"}}
00:00:31 TYA: Heartbeat
_Steps to reproduce the behavior:_
I first identified the max and min dimmer ranges, initially set to 0 and 1000. i found a spot of medium brightness and then maxed out the brightness, a TuyaReceive reply out at 255. I did exactly the same thing for minimum, medium brightness, then to 0%, a TuyaReceive reply out at 58.
I then set dimmerrange 58, 255
If I control the dimmer using MQTT to 50, the lamp sets itself to 56.
If I then toggle the lamp on and off with hardware button it sets the dimmer to 62
If I then toggle the lamp on and off with hardware button it sets the dimmer to 68
as shown in log
I think the toggling problem will be solved if the lamp actually set itself properly to 50 and didn't add 6% on to the value.
FYI if I set the dimmer to 44% the log will report 50% so it isn't like the tuya dimmer controller cant be set to 50%
_A clear and concise description of what you expected to happen._
I expected with min and max of 58 and 255 to be set that 0% would send 58 and 100% would send 255 and 50% to send roughly 98 but it sends 128 as per log
There are also some other weird behaviors where anything below 23% it just sends 58 but the percentage slider goes up to 23%
_If applicable, add screenshots to help explain your problem._
_Add any other context about the problem here._
if max is purely the 100% value and min is just cropping off of the bottom this wasn't particularly obvious in the documentation, I just assumed it worked differently because now I have a dead bottom half of a slider just because tuya doesn't like values below 58.
however disregarding this i still don't know why every percentage value i send comes back with 6% added on to it, and subsequently keeps getting compounded every time the switch is toggled.
as per Blackadder's template page here I have tried these settings however the 6% thing still happens.
I have 2 of these dimmers and they both do the same thing.
(Please, remember to close the issue when the problem has been addressed)
Hello! I started to do some digging on this today.
I have a tuya dimmer (Treatlife DS01) that does something similar - though mine dims to 15% minimum.
Not sure about the 6% adder, but in the case of the minimum - this is a setting stored in the tuya MCU, not the esp8266.
In the original firmware, there is a function to change this lower limit, but now that I have tasmota flashed I canāt determine the proper serial command to send to the mcu to set this range.
I wonder if anyone here has done this work yet, but my plan of attack is below.
Unfortunately I was out of time for the weekend and my kitchen needs a light switch, so Iāll have to return to it another day.
Yes I purchased a couple of the same dimmers as the OP and experienced the same issues. The original firmware was much better at dimming smoothly across the range however still not great at the lower limits.
Let me add something that might help in regards to the 6% adder. I use HASS but the same issue can be created using the built in web interface. If you set the dimmer to 15% and then click toggle to turn off the light, then continuously click toggle to turn the light on then off, each time you do so the brightness increases by 6% so eventually after a few toggles the light is fully lit and no longer dim. The slider however in the interface does not move.
Have you tried disabling Gamma Correction (LedTable)? In my experience, a lot of Tuya-related things have hardware curves, and it causes issues like this, at least in my lightbulbs. How it applies to your dimmer, I'm not entirely sure, but it might be a good thing to check out.
Set LedTable 0 made no difference.
I was able to fix the lower limit issue!
In my case the TuyaMCU defined:
dpid 3 = Dimmer low limit, (int range 0-1000)
and
dpid 4 = dimmer mode, (enum LED, incandescent, halogen)
This is consistent with the default tuya āgeneric dimmerā template, so I suspect most will be similar.
Once I found them Iām able to set the dimmer lower limit to āxā in MCU scale with:
TuyaSend2 3,x
You will have to do some digging to ensure your dpids are the same. A good start is to send this:
SerialSend5 55aa0001000000
Which will request the status of all dpids. You should see one of data type āintā with the value of the low limit you see (150 in my case)
On increasing by 6% each time, can you test this after setting:
Dimmerrange 0,255
I think it may be a scaling issue.
Also ensure that Fade OFF As I was having strange issues with fade on mine.
Hope this helps!!
Thanks for sharing your solution. We should add this information to the docs. Thanks
LOL how is the answer a solution and it is CLOSED? The original question has not been answered. What a waste of space a forum like this is.
Hi, @KmanOz
The steps explained by @dalovering didn't solve your issue? Please share what you have done and why it is not solved for you. Thanks.
The instructions above attempt to fix the lower dimming level, not level increase on toggling on/off.
Maybe we should split this question in two sepparate issues? I would say that "Tuya Dimmer keeps adding on 6% to all dimming values" was not addressed so it should not be closed.
I observe the same issue with my dimmer freshly flashed with Tasmota 8.1.0.2, where on each light toggle the dimmer level increases. Any thing I could try to fix this?
The issue is not present when cycling on/off by short pressing the hardware button on the module itself.
I am attaching the relevant files. Thanks!
Tasmota_Backlog_Template_Module_GPIO_255.txt
Tasmota_Status_0.txt
Tasmota_Weblog_4.txt
Tasmota_Backlog_Rule1_Rule2_Rule3.txt

@ovidiugm You're far more patient than myself. This is still closed with no real resolution.
I was able to fix the lower limit issue!
In my case the TuyaMCU defined:
dpid 3 = Dimmer low limit, (int range 0-1000)
and
dpid 4 = dimmer mode, (enum LED, incandescent, halogen)This is consistent with the default tuya āgeneric dimmerā template, so I suspect most will be similar.
Once I found them Iām able to set the dimmer lower limit to āxā in MCU scale with:
TuyaSend2 3,xYou will have to do some digging to ensure your dpids are the same. A good start is to send this:
SerialSend5 55aa0001000000
Which will request the status of all dpids. You should see one of data type āintā with the value of the low limit you see (150 in my case)On increasing by 6% each time, can you test this after setting:
Dimmerrange 0,255
I think it may be a scaling issue.
Also ensure thatFade OFFAs I was having strange issues with fade on mine.Hope this helps!!
@dalovering
May I ask how you find out the dpid's for the minimum dimmer range?
I just successfully flashed a tuya dimmer with the latest tasmota 8.4.0 and noticed when the dimmer range is all the way down to 1 it still shows a relative bright light. I understand this is a mcu limit and not tasmota, and just wondering if I could change it to dim just a little more.
All seems to work fine with module 54 selected and added the TuyaMCU 21,2 command.
This is my first tuyamcu unit I have, so not that experienced with it.
thanks!
@martin072 I kind of got lucky with mine - I made a tuya developer account and began "creating a new device" using the dimmer template, and my dimmer was using the default dpids for everything.
Can you send SerialSend5 55aa0001000000 in the console and paste the result here? Will be easier to help troubleshoot if we see what your dpid's are all set at.
In my case I have:
04:37:24 CMD: Group 0, Index 5, Command "SERIALSEND", Data "55aa0001000000"
04:37:24 MQT: stat/kitchenLights/RESULT = {"SerialSend":"Done"}
04:37:24 {"TuyaReceived":{"Data":"55AA0301002A7B2270223A2272336667317974796434736436376761222C2276223A22342E312E32222C226D223A307DA2","Cmnd":1,"CmndData":"7B2270223A2272336667317974796434736436376761222C2276223A22342E312E32222C226D223A307D"}}
04:37:24 TYA: MCU Product ID: {"p":"r3fg1ytyd4sd67ga","v":"4.1.2","m":0}
04:37:24 TYA: Send "55aa0002000001"
04:37:24 {"TuyaReceived":{"Data":"55AA0302000004","Cmnd":2}}
04:37:24 TYA: RX MCU configuration Mode=0
04:37:24 TYA: Read MCU state
04:37:24 TYA: Send "55aa0008000007"
04:37:24 {"TuyaReceived":{"Data":"55AA03070005010100010112","Cmnd":7,"CmndData":"0101000101","1":{"DpId":1,"DpIdType":1,"DpIdData":"01"}}}
04:37:24 TYA: fnId=11 is set for dpId=1
04:37:24 TYA: RX Relay-1 --> MCU State: On Current State:On
04:37:24 {"TuyaReceived":{"Data":"55AA030700080202000400000096AF","Cmnd":7,"CmndData":"0202000400000096","2":{"DpId":2,"DpIdType":2,"DpIdData":"00000096"}}}
04:37:24 TYA: fnId=21 is set for dpId=2
04:37:24 TYA: RX Dim State=150
04:37:24 {"TuyaReceived":{"Data":"55AA030700080302000400000094AE","Cmnd":7,"CmndData":"0302000400000094","3":{"DpId":3,"DpIdType":2,"DpIdData":"00000094"}}}
04:37:24 TYA: fnId=0 is set for dpId=3
04:37:24 {"TuyaReceived":{"Data":"55AA03070005040400010017","Cmnd":7,"CmndData":"0404000100","4":{"DpId":4,"DpIdType":4,"DpIdData":"00"}}}
04:37:24 TYA: fnId=0 is set for dpId=4
04:37:30 WIF: Checking connection...
04:37:30 WIF: Connected
The lower limit (for me) is stored in dpid 3 and is shown by:
04:37:24 {"TuyaReceived":{"Data":"55AA030700080302000400000094AE","Cmnd":7,"CmndData":"0302000400000094","3":{"DpId":3,"DpIdType":2,"DpIdData":"00000094"}}}
to be 00000094 (hex) = 148 (dec) = 14.8%
And my bulb mode is shown in {"DpId":4,"DpIdType":4,"DpIdData":"00"}}} to be 00 which corresponds to LED.
These two settings affect how low the brightness can go (and how much noise the bulbs makes when its dim).
Thanks for your quick response, I got a totally different output: š§
11:47:23 TYA: Heartbeat
11:47:34 TYA: Send "55aa00000000ff"
11:47:34 {"TuyaReceived":{"Data":"55AA000000010101","Cmnd":0,"CmndData":"01"}}
11:47:34 TYA: Heartbeat
11:47:36 WIF: Checking connection...
11:47:41 CMD: SerialSend5 55aa0001000000
11:47:41 SRC: WebConsole from 192.168.73.108
11:47:41 CMD: Group 0, Index 5, Command "SERIALSEND", Data "55aa0001000000"
11:47:41 RSL: stat/tasmota_60B20C/RESULT = {"SerialSend":"Done"}
11:47:41 {"TuyaReceived":{"Data":"55AA000100156253585353464172564B746334447943312E302E305A","Cmnd":1,"CmndData":"6253585353464172564B746334447943312E302E30"}}
11:47:41 TYA: MCU Product ID: bSXSSFArVKtc4DyC1.0.0
11:47:41 TYA: Send "55aa0002000001"
11:47:41 {"TuyaReceived":{"Data":"55AA000200020E0011","Cmnd":2,"CmndData":"0E00"}}
11:47:41 TYA: RX MCU configuration Mode=2
11:47:41 TYA: Read MCU state
11:47:41 TYA: Send "55aa0008000007"
11:47:41 {"TuyaReceived":{"Data":"55AA0007000501010001010F","Cmnd":7,"CmndData":"0101000101","DpType1Id1":1,"1":{"DpId":1,"DpIdType":1,"DpIdData":"01"}}}
11:47:41 TYA: fnId=11 is set for dpId=1
11:47:41 TYA: RX Relay-1 --> MCU State: On Current State:On
11:47:41 {"TuyaReceived":{"Data":"55AA00070008020200040000000016","Cmnd":7,"CmndData":"0202000400000000","DpType2Id2":0,"2":{"DpId":2,"DpIdType":2,"DpIdData":"00000000"}}}
11:47:41 TYA: fnId=21 is set for dpId=2
11:47:41 TYA: RX Dim State=0
11:47:45 TYA: Send "55aa00000000ff"
11:47:45 {"TuyaReceived":{"Data":"55AA000000010101","Cmnd":0,"CmndData":"01"}}
11:47:45 TYA: Heartbeat
Not really sure where to look here. any ideas? otherwise it is as it is.
Hmmm... it appears as though only dpid 1 and 2 are enabled in your MCU firmware. Just to be sure though, try a few things:
Ensure you set weblog 4 and try SerialSend5 55aa0001000000 again. See if the result is the same (I think Tasmota may not display unmapped dpids in other weblog modes).
Also, in your original firmware (if you used it at all), did you have any options for different bulb types or the lower limit?
You COULD try setting dpid 3 to maybe 100 (10%) by running TuyaSend2 3,100 and see if it sets and changes anything. There is some (small) risk here that dpid does something different in your case, and we currently donāt know whether it exists or what it is set to, so we couldnāt just āset it backā if there is an issue.
PS be sure to use code blocks for long logs š https://docs.github.com/en/github/writing-on-github/creating-and-highlighting-code-blocks
Thanks, thought i did the code block thing.
Weblog 4 was enabled, and the output is the same. I did not run the original firmware, flashed it straight out of the box.
I won't risk it, so will leave it as it is for now.
Thank you for the quick reply's
Darn. In that case I think your MCU just doesnāt use those features. You may consider trying a different bulb, some have different dimming responses.
Been a while, but I had some time today to play with it again. I will settle with the minimum dim range, however, something else I noticed; The mcu always seems to fade in/out when turning on/off... When on max dim range, turning the light off seems to take forever, as it fade's it out. Do you know if this is an mcu thing or tasmota? I have turned Fade OFF and used LedTable 0 as well, still the light fades in and out? I am running 8.5.1 on the unit (8.4.0 had the same behaviour)
One difference; when removing power from the device, the first time On will not do the Fade thing. Any on/off's after the first ones will..
Most helpful comment
I was able to fix the lower limit issue!
In my case the TuyaMCU defined:
dpid 3 = Dimmer low limit, (int range 0-1000)and
dpid 4 = dimmer mode, (enum LED, incandescent, halogen)This is consistent with the default tuya āgeneric dimmerā template, so I suspect most will be similar.
Once I found them Iām able to set the dimmer lower limit to āxā in MCU scale with:
TuyaSend2 3,xYou will have to do some digging to ensure your dpids are the same. A good start is to send this:
SerialSend5 55aa0001000000Which will request the status of all dpids. You should see one of data type āintā with the value of the low limit you see (150 in my case)
On increasing by 6% each time, can you test this after setting:
Dimmerrange 0,255I think it may be a scaling issue.
Also ensure that
Fade OFFAs I was having strange issues with fade on mine.Hope this helps!!