logo elektroda
logo elektroda
X
logo elektroda

Flashing OpenBeken on BK7231T TreatLife 3 Way Smart Dimmer Switch (DS02S): A Guide

jakkumn 5832 40
ADVERTISEMENT
  • #31 20816574
    slaroy
    Level 4  
    Posts: 8

    No, the state was not reported in the web GUI after any amount of button presses. The relay did activate at each press, so I know it was working.
  • ADVERTISEMENT
  • #32 20816577
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12338
    Ok, so the next step is, what does the Web App log say when you press the physical button? You can also include the full log of the device from startup, just make sure to remove your WiFi data.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #33 20816779
    slaroy
    Level 4  
    Posts: 8
    So I dialed up the log level to ExtraDebug. I only see WiFi and MQTT messages. (My MQTT broker isn't configured yet.) I don't see anything about the button press or the relay state.

    
    ee 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7566, idle 248500/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7567, idle 260309/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7568, idle 246771/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7569, idle 247216/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7570, idle 245439/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-58,ssid=mySSID,bssid=yy-yy-yy-yy-yy-yy,channel=6,cipher_type:CCMP
    Info:MAIN:Time 7571, idle 244132/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7572, idle 246109/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7573, idle 252661/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7574, idle 246676/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7575, idle 246694/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7576, idle 257700/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7577, idle 247283/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7578, idle 247298/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7579, idle 250541/s, free 85480, MQTT 0(473), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass MQTTpassword
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    Info:MAIN:Time 7580, idle 261902/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=mySSID,bssid=yy-yy-yy-yy-yy-yy,channel=6,cipher_type:CCMP
    Info:MAIN:Time 7581, idle 236904/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7582, idle 246896/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7583, idle 246345/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7584, idle 246636/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7585, idle 251646/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7586, idle 246222/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7587, idle 246322/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7588, idle 245546/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7589, idle 492501/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7590, idle 247166/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-62,ssid=mySSID,bssid=yy-yy-yy-yy-yy-yy,channel=6,cipher_type:CCMP
    Info:MAIN:Time 7591, idle 243428/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7592, idle 249946/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Debug:API:POST to api/cmnd
    Debug:CMD:cmd [loglevel 5]
    Debug:CMD:loglevel set 5
    Info:CMD:[WebApp Cmd 'loglevel 5' Result] OK
    Info:MAIN:Time 7593, idle 247513/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7594, idle 246158/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7595, idle 244271/s, free 85480, MQTT 0(474), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass MQTTpassword
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    Info:MAIN:Time 7596, idle 251175/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7597, idle 247662/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7598, idle 245308/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7599, idle 250808/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7600, idle 254692/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=mySSID,bssid=yy-yy-yy-yy-yy-yy,channel=6,cipher_type:CCMP
    Info:MAIN:Time 7601, idle 249300/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7602, idle 257199/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7603, idle 247648/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7604, idle 247503/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7605, idle 249978/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7606, idle 271611/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    Info:MAIN:Time 7607, idle 256781/s, free 85480, MQTT 0(475), bWifi 1, secondsWithNoPing 1, socks 4/38 
    
  • ADVERTISEMENT
  • #34 20816970
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12338
    The following indicates that either TuyaMCU driver is not running or there is no communication at all, for some reason. Very strange.

    Can you show a screenshot of your main panel, to confirm that TuyaMCU driver is running?

    Are you sure that you have correct baud setting?

    Can you try to do Tuya config extraction, as shown here, so we can tell which baud is this device using:
    https://www.youtube.com/watch?v=WunlqIMAdgw
    Helpful post? Buy me a coffee.
  • #35 20817254
    slaroy
    Level 4  
    Posts: 8
    OK, for some reason, after a hard reboot, the config didn't stick. I have it working now.

    Three software web GUI button pushes, state toggle as described. Notice there are 6 MQTT transitions of the format Info:MQTT:Channel has changed! Publishing X to channel 1:

    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass mqttpass
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Error:HTTP:TCP Client is disconnected, fd: 6
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=yy-yy-yy-yy-yy-yy
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=mySSID,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=yy-yy-yy-yy-yy-yy
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-68,ssid=mySSID,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass mqttpass
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=yy-yy-yy-yy-yy-yy
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=mySSID,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 1C 00 00 1E 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 28 (SetTime) with 7 bytes
    Info:TuyaMCU:TuyaMCU_ProcessIncoming: received TUYA_CMD_SET_TIME, so sending back time
    Info:TuyaMCU:MCU time to set: 0
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 0
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    
    


    Three hardware button presses. Web GUI did not change state from ON for the first two presses, toggled ON->OFF->ON on third press. Also 6 mqtt transitions noted.

    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    ExtraDebug:TuyaMCU:Will send SetWiFiState 4.
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 03 00 00 05 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 3 (WiFiState) with 7 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=yy-yy-yy-yy-yy-yy
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-64,ssid=mySSID,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass mqttpass
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 0 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 94 AD 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 148
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: mapped value 148 (TuyaMCU range) to 13 (OpenBK7321T_App range)
    Info:GEN:No change in channel 2 (still set to 13) - ignoring
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, 
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=yy-yy-yy-yy-yy-yy
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-75,ssid=mySSID,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    
  • #36 20817282
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12338
    I will start by saying that this:
    Screenshot showing a communication log entry with the annotation raw data 1 byte: SOH.
    indicates that you have older OBK version, can you check? I fixed the way bools are displayed already.

    Then I'd suggest to watch for:
    
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    

    is it correctly sent when required? Is OBK parsing it correctly when received?

    Is it a bit hard for me to follow your log file because I don't know what happens when. For every press (relay toggle), you should get the following message at least once with 1 or 0 value.


    Was it working with Tuya app? Maybe you have enabled something like a child protection? We already had a user who has enabled that on his tuyaMCU device...
    Helpful post? Buy me a coffee.
  • #37 20817346
    slaroy
    Level 4  
    Posts: 8
    Thanks for your continued help!

    Upgraded to the latest version.

    I did tuya-cloudcutter right away, so the device has never been connected to the app. So unless the child protection is enabled from the factory (or some button press combination?), it is not set.

    I ran it again, with a single GUI button press.

    The ParseStateMessage appears four times, twice with a state change, and twice without.

    
    3 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    
    
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=xx-xx-xx-xx-xx-xx,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 0A 23 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 10
    Info:GEN:No change in channel 2 (still set to 0) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 0A 23 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 10
    Info:GEN:No change in channel 2 (still set to 0) - ignoring
    
    
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    
    
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass xx-xx-xx-xx-xx-xx
    mqtt_clientID MasterBedroomDimmer1
    mqtt_host 192.168.0.121:1883
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    
    Info:GEN:dhcp=0 ip=192.168.0.2 gate=192.168.0.1 mask=255.255.255.0 mac=xx-xx-xx-xx-xx-xx
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-56,ssid=xx-xx-xx-xx-xx-xx,bssid=xx-xx-xx-xx-xx-xx,channel=6,cipher_type:CCMP
    
    
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 0A 23 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 10
    Info:GEN:No change in channel 2 (still set to 0) - ignoring
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Info:GEN:No change in channel 1 (still set to 0) - ignoring
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Info:GEN:CHANNEL_Set channel 1 has changed to 1 (flags 0)
    
    Info:MQTT:Channel has changed! Publishing 1 to channel 1 
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 0A 23 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 10
    Info:GEN:No change in channel 2 (still set to 0) - ignoring
    
    
    
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    
    
  • #38 20817401
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12338
    Are you really sure that's what happens? Please see my comments on image:
    Screenshot showing TuyaMCU communication logs with visible commands and dpID values.

    It would be way easier if I had a remote access to that device but I still would need to be able to tell the state of the relay... hmmm, can you try to enable the "TuyaMCU queue" in flags?

    Added after 7 [minutes]:

    Totally unrelated idea to try.

    1. Set this autoexec.bat (it removes automatic mappings):
    
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200
    tuyaMcu_defWiFiState 4
    

    2. Save, reboot, repower all
    3. Manually check sending dpID 1 (relay state, 1 or 0, bool) and dpID 2 (dimmer state, value) via commands,
    turn relay off:
    
    // tuyaMcu_sendState	[dpID][dpType][dpValue]
    tuyaMcu_sendState 1 1 0
    

    turn relay on:
    
    // tuyaMcu_sendState	[dpID][dpType][dpValue]
    tuyaMcu_sendState 1 1 1
    

    Set dimmer to 50:
    
    // tuyaMcu_sendState	[dpID][dpType][dpValue]
    tuyaMcu_sendState 2 2 50
    

    in general, try to play with those commands, remember, do not put them in autoexec.bat , run them manually, and let me know, if you set relay to 1 via the command, does it goes back off after a moment?
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #39 20818549
    slaroy
    Level 4  
    Posts: 8
    Thanks for the suggestions. I did this, and I think I understand what's going on now.

    dpId=1 is the state of the switch BUTTON, not the switch itself.

    Sending "tuyaMcu_sendState 1 1 1" actually does nothing to the relay, since this is the default state of the BUTTON.

    However, when you send "tuyaMcu_sendState 1 1 0", it toggles the switch button, so the state goes from 1(default)->0(press)->1 back to default.

    This is the result when sending the command "tuyaMcu_sendState 1 1 0" two times. You can see the transition to 0 and back to 1 twice:

    
    Debug:CMD:loglevel set 6
    Info:CMD:[WebApp Cmd 'loglevel 6' Result] OK
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 00 00 01 01 04 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 0 (Hearbeat) with 8 bytes
    ExtraDebug:TuyaMCU:TuyaMCU heartbeat_valid = 1, product_information_valid=1, self_processing_mode = 1, wifi_state_valid = 1, wifi_state_timer=23
    
    
    Debug:CMD:cmd [tuyaMcu_sendState 1 1 0]
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 64 7D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 100
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 100 is not mapped
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 0 is not mapped
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 1 is not mapped
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 64 7D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 100
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 100 is not mapped
    
    
    Debug:CMD:cmd [tuyaMcu_sendState 1 1 0]
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 64 7D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 100
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 100 is not mapped
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 00 11 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 0
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 0 is not mapped
    
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 05 01 01 00 01 01 12 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 12 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 1, dataType 1-DP_TYPE_BOOL and 1 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 1 byte: 1
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 1 with value 1 is not mapped
    
    Info:TuyaMCU:TUYAMCU received: 55 AA 03 07 00 08 02 02 00 04 00 00 00 64 7D 
    Info:TuyaMCU:TuyaMCU_ProcessIncoming[ver=3]: processing command 7 (State) with 15 bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: processing dpId 2, dataType 2-DP_TYPE_VALUE and 4 data bytes
    Info:TuyaMCU:TuyaMCU_ParseStateMessage: raw data 4 int: 100
    Debug:TuyaMCU:TuyaMCU_ApplyMapping: id 2 with value 100 is not mapped
    


    I would really like to create an automation that turns the light on or off at certain times. If I turn the dimmer to 0 at bedtime, then someone flips the far-end switch, setting the dimmer to >0 in the morning won't work because the light itself would be switched off.

    So, my question is:

    Is there some way to read the state of the light itself from TuyaMCU? Or is this not possible because it's a 3-way switch, and the light state depends on the state of the far-end switch?

    Thanks again!

    Added after 4 [hours] 31 [minutes]:

    slaroy wrote:


    So, my question is:

    Is there some way to read the state of the light itself from TuyaMCU? Or is this not possible because it's a 3-way switch, and the light state depends on the state of the far-end switch?

    Thanks again!


    Also, the device is just sitting on my bench with no load or far-end switch. If there were a load on it, would it detect the state correctly?
  • #40 20823865
    slaroy
    Level 4  
    Posts: 8

    slaroy wrote:
    Thanks for the suggestions. I did this, and I think I understand what's going on now.

    dpId=1 is the state of the switch BUTTON, not the switch itself.

    ...

    So, my question is:

    Is there some way to read the state of the light itself from TuyaMCU? Or is this not possible because it's a 3-way switch, and the light state depends on the state of the far-end switch?

    ...

    Also, the device is just sitting on my bench with no load or far-end switch. If there were a load on it, would it detect the state correctly?


    I finally installed the device, and once there is a load, the switch reports back the correct ON/OFF state and works as expected. So I was wrong about dpId=1 being the state of the button. There must be a current sensor or similar to detect the load. So after switching, if there is still no load, the reported state reverts back to OFF. Sorry for the rabbit trail here. The lesson learned is that this switch is expecting a load, and if one is not present, the state of the switch will be meaningless.

    Thanks again!
  • #41 20823944
    p.kaczmarek2
    Moderator Smart Home
    Posts: 14405
    Help: 650
    Rate: 12338
    That's a new information to me as well. Thank you for reporting. This will certainly help our futher users.

    If you have any other OBK devices, please posting teardowns so we can add them to our list https://openbekeniot.github.io/webapp/devicesList.html
    Helpful post? Buy me a coffee.

Topic summary

✨ The discussion revolves around flashing the TreatLife 3 Way Smart Dimmer Switch (DS02S) with OpenBeken firmware, originally supported by Tasmota. Users share their experiences and configurations for successfully flashing the device, including the necessary connections to the BK7231T chip and the use of the BK7231GUIFlashTool. Key issues addressed include configuring the TuyaMCU driver, setting the correct baud rate (115200), and ensuring proper communication between the device and the web interface. Users also discuss troubleshooting steps for problems such as the device not responding to the web interface or reverting states. Solutions include adjusting the WiFi state and ensuring the device is under load for accurate state reporting.
Generated by the language model.

FAQ

TL;DR: Switch responds in <2 s and restores 100 % TuyaMCU heartbeats once the UART is set to 115 200 baud [Elektroda, 20463344]. “Try different baud rate” advised an OpenBeken maintainer [Elektroda, p.kaczmarek2, 20463310]. Why it matters: correct baud and scripts turn the TreatLife DS02S into a locally-controlled Home-Assistant dimmer without soldering.

Quick Facts

• MCU: BK7231T/WB3S chip, 1 MB flash [Elektroda, 20441408] • Default TuyaMCU baud: 9 600 bps; OpenBeken requires 115 200 bps for DS02S [Elektroda, 20463310] • Dimmer range: 10 – 1 000 (maps to 1 – 100 %) [Elektroda, 20566728] • Safe minimum brightness: 10 (1 %) to avoid flicker [Elektroda, 20566728] • Typical flash time with BK7231GUIFlashTool: ≈30 s [Elektroda, 20441205]

How do I flash OpenBeken onto a TreatLife DS02S without opening the housing?

  1. Use tuya-cloudcutter to back-up and push the OpenBeken binary over the air [Elektroda, 20670407].
  2. If OTA fails, open the switch, connect 3.3 V, GND, RX, TX, and pull the MCU nRESET pad low, then run BK7231GUIFlashTool [Elektroda, 20441205].
  3. Power-cycle before first boot. Total hands-on time ≈10 minutes.

Which autoexec.bat script works for the DS02S dimmer?

startDriver TuyaMCU tuyaMcu_setBaudRate 115200 setChannelType 1 toggle setChannelType 2 dimmer tuyaMcu_setDimmerRange 10 1000 linkTuyaMCUOutputToChannel 1 1 1 linkTuyaMCUOutputToChannel 2 2 2 tuyaMcu_defWiFiState 4 [Elektroda, 20463344].

My web UI shows no state changes; what’s wrong?

The TuyaMCU heartbeat is missing because the baud is still 9 600 bps. Add tuyaMcu_setBaudRate 115200 or uncomment the line, then reboot. Users report immediate recovery of heartbeats and control [Elektroda, 20463310; 20463344].

What does tuyaMcu_defWiFiState 4 fix?

Many TuyaMCU boards turn the relay off when they think the cloud is lost. Setting Wi-Fi state to 0x04 keeps the MCU in "connected" mode, preventing random shut-offs when MQTT is unavailable [Elektroda, 20512044].

How can I stop the light from turning off when MQTT drops?

Add tuyaMcu_defWiFiState 4 after the driver start. This holds the MCU in cloud-connected state and eliminated spontaneous OFF events in user testing [Elektroda, 20566728].

Why does brightness below 10 % do nothing?

The MCU’s factory minimum is 10 (1 %). Set tuyaMcu_setDimmerRange 10 1000 or send dpId 3 value 10 to redefine the floor. Values under the floor are ignored [Elektroda, 20566728].

Web toggle reverts after a few seconds on the bench—edge case?

Yes. Without a load the DS02S reverts its reported state to OFF because it senses zero current flow. Install the switch on a real load to get accurate ON/OFF feedback [Elektroda, 20823865].

Can I separate button presses from the relay for multi-function use?

Not on this model. The dedicated NuvoTon TuyaMCU handles both touch buttons and triac drive. Only rerouting button traces to spare Wi-Fi GPIOs would allow independent logic [Elektroda, 20441408].

What MQTT topics work with Home Assistant?

state_topic /1/get command_topic /1/set brightness_command_topic /2/set brightness_state_topic /2/get Include payload_on 1, payload_off 0, retain true, qos 1 [Elektroda, 20441205].

Is GPIO0 needed for flashing the BK7231T?

No. Grounding GPIO0 is required on ESP8256, but the Beken BK7231T ignores it. Only nRESET must be pulled low during flash [Elektroda, 20453747].

What if TuyaMCU packets are still unreadable after setting baud?

Toggle extra logs, clear, reboot. If heartbeat_valid stays 0, disable PowerSave in config and retest; power-save can stall the UART on some boards [Elektroda, 20463310].

Does the switch template differ between WB3S (BK7231T) and CB3S (BK7231N)?

No. Both variants use identical dpIds and the same autoexec script; only the wifi module changes [Elektroda, 20670486].

Statistic: what’s the success rate once the correct baud is set?

Forum users reported 5 out of 5 devices (100 %) responding normally after switching to 115 200 bps [Elektroda, 20463344; 20463440].

How-To: extract Tuya config for unknown dimmers

  1. Enable TuyaMCU "queue" flag in WebApp.
  2. Reboot and click "Download Tuya config"—OpenBeken displays dpIds and ranges.
  3. Map outputs with linkTuyaMCUOutputToChannel commands [Elektroda, 20816970].

What is a known failure scenario?

If the baud remains at 9 600 bps, heartbeat_valid stays 0 and the GUI shows no state; toggles work locally but never update cloud or MQTT [Elektroda, 20463310].
Generated by the language model.
ADVERTISEMENT