logo elektroda
logo elektroda
X
logo elektroda

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

jakkumn 4104 40
ADVERTISEMENT
  • #31 20816574
    slaroy
    Level 4  

    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
    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.
  • #33 20816779
    slaroy
    Level 4  
    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
    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.
  • ADVERTISEMENT
  • #35 20817254
    slaroy
    Level 4  
    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
    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  
    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
    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  
    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  

    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
    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.
Summary generated by the language model.
ADVERTISEMENT