logo elektroda
logo elektroda
X
logo elektroda

[BK7231N] [CB3S] [AHT20] TH01 Generic Temperature and Humidity Sensor Teardown

anthonythomas 39132 162
ADVERTISEMENT
  • #151 21709970
    fjk
    Level 11  
    >>21703018 I've changed autoexec to:

    startDriver tmSensor
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200
    tuyaMcu_defWiFiState 4
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2


    but it won't change anything, maybe these values are on other channels than 1 and 2? How I can find it?
  • ADVERTISEMENT
  • #152 21710040
    divadiow
    Level 36  
    do you have a factory firmware backup (before pairing to Tuya if you ever did) or maybe can you pull the Tuya config and post the 72kb file?

    OpenBK control panel showing Plug, USB1, and USB2 all turned OFF
  • ADVERTISEMENT
  • #153 21710362
    patanronald
    Level 3  
    Hello,
    I have a Tuya TH01 Temp and Humidity sensor. Model is ZY-TH01-CBS3_V1.0 2025-1-07. I have captured the dpID from the device using TuyaMCU analyzer.
    Screenshot of TuyaMCU Explorer displaying UART packet analysis data.
    Screenshot of TuyaMCU Explorer showing UART packet decoding in hex and ASCII

    I tried to use the below code in the Autoexec.bat. The device won't send the things to MQTT and mostly showed zero in the temp and hum field. It will only update the values once and never send the updated values after that. I have the backup of the original firmware if you require this. This is a battery powered device with a MCU chip. Sensor sends the data and goes to sleep to save battery life will be my guess. I am able to flash it and connect to my MQTT server but the temp and humidity doesn't update as you expect when it running the Tuya firmware. I am not sure what I have done wrong. I am bit lost now after I did all the research on this forum to compile the information but not sure what I did wrong.

    startDriver TuyaMCU
    startDriver tmSensor
    // dpID 27 is temperature div 10
    setChannelType 27 temperature_div10
    linkTuyaMCUOutputToChannel 27 val 27
    // dpID 46 is % humidity
    setChannelType 46 Humidity
    linkTuyaMCUOutputToChannel 46 val 46
    // dpID 101 is battery state - low(0), mid(1) and high(2)
    setChannelType 10 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 101 enum 10
    setChannelLabel 10 Battery


    Should the config be like this? I am new to this so bear with me.

    startDriver TuyaMCU
    startDriver tmSensor
    // dpID 27 is temperature div 10
    setChannelType 27 temperature_div10
    linkTuyaMCUOutputToChannel 27 val 2
    // dpID 46 is % humidity
    setChannelType 46 Humidity
    linkTuyaMCUOutputToChannel 46 val 2
    // dpID 101 is battery state - low(0), mid(1) and high(2)
    setChannelType 101 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 101 enum 4
    setChannelLabel 101 Battery


    Thanks for the help.
  • #154 21710365
    p.kaczmarek2
    Moderator Smart Home
    The basic approach here is to compare your traffic with original TuyaMCU traffic and see where it breaks.

    By the way, there is also an improved version of TuyaMCU driver proposed here:
    https://github.com/openshwprojects/OpenBK7231T_App/pull/1795
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #155 21710366
    patanronald
    Level 3  
    >>21710365

    What do you mean by this? How would I implement the new driver? Do you have any guide how to do this?

    How would I go about comparing the traffic with the original tuya traffic? Am I supposed to use the same analyzer software to see what is reported? If yes, I will flash the openbk firmware and test it again.

    Added after 1 [hours] 6 [minutes]:

    >>21710365

    Hello,

    I flashed the openopenbk version 1.18.188 and this is what i get. Looks like the MCU is not updating anymore with the values.

    OpenBK status screen showing sensor data and MQTT connection info

    Screenshot of TuyaMCU Explorer showing UART data decoding and configuration

    I am getting this in the logs

    Info:CMD:LFS_ReadFile: failed to file autoexec.bat
    Info:CMD:CMD_StartScript: failed to get file autoexec.bat

    Info:MAIN:Time 66, idle 194548/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 188237/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 189089/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 69, idle 189937/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 70, idle 188303/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 71, idle 183905/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 72, idle 193001/s, free 58568, MQTT 0(4), bWifi 1, secondsWithNoPing 2, socks 3/38 
    Info:MAIN:Time 73, idle 186396/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing 3, socks 2/38 
    Info:MAIN:Time 74, idle 202498/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing 4, socks 2/38 
    Info:MAIN:Time 75, idle 189384/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing 5, socks 2/38 
    Info:MAIN:Time 76, idle 188268/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing 6, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 77, idle 188571/s, free 69960, MQTT 0(5), bWifi 1, secondsWithNoPing 7, socks 2/38 
    Info:MAIN:Time 78, idle 202891/s, free 58568, MQTT 0(5), bWifi 1, secondsWithNoPing 8, socks 3/38 
    Info:MAIN:Time 79, idle 190130/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 9, socks 2/38 
    Info:MAIN:Time 80, idle 189402/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 10, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 81, idle 187410/s, free 70048, MQTT 0(5), bWifi 1, secondsWithNoPing 11, socks 3/38 
    Info:MAIN:Time 82, idle 187442/s, free 58568, MQTT 0(5), bWifi 1, secondsWithNoPing 12, socks 3/38 
    Info:MAIN:Time 83, idle 185114/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 13, socks 2/38 
    Info:MAIN:Time 84, idle 192162/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 14, socks 2/38 
    Info:MAIN:Time 85, idle 186925/s, free 70048, MQTT 0(5), bWifi 1, secondsWithNoPing 15, socks 3/38 
    Info:MAIN:Time 86, idle 201132/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 16, socks 2/38 
    Info:MAIN:Time 87, idle 191997/s, free 70048, MQTT 0(5), bWifi 1, secondsWithNoPing 17, socks 3/38 
    Info:MAIN:Time 88, idle 188149/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 18, socks 2/38 
    Info:MAIN:Time 89, idle 193159/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 19, socks 2/38 
    Info:MAIN:Time 90, idle 189824/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 20, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 91, idle 186406/s, free 70264, MQTT 0(5), bWifi 1, secondsWithNoPing 21, socks 2/38 
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 81 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 8 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID [IoT]
    Info:MAIN:Using Pass [none]
    Error:HTTP:Created HTTP SV thread with (stack=2048)
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk_CFD9000E3/ subT cmnd/obk_CFD9000E3/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/get
    Info:MQTT:MQTT_RegisterCallback called for bT homeassistant/ subT homeassistant/+
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Drv tmSensor is already loaded.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 214547/s, free 75816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 6C 66 33 36 79 35 6E 77 62 38 6A 6B 78 77 67 67 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D 99 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"lf36y5nwb8jkxwgg","v":"1.0.0"}
    Info:MAIN:Time 2, idle 186148/s, free 75816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 190115/s, free 75816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 187804/s, free 75816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 187614/s, free 75816, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [IoT]
    Info:MAIN:Time 6, idle 187915/s, free 70448, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 177329/s, free 69968, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 84959/s, free 69608, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 69608, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 69608, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 11, idle 89685/s, free 70320, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 02 00 00 01 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    Info:MAIN:Time 12, idle 185956/s, free 58664, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 13, idle 188593/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 14, idle 191465/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 188768/s, free 58576, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 16, idle 191471/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 187841/s, free 58576, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 18, idle 200908/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 19, idle 187547/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 20, idle 187808/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 21, idle 191846/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 22, idle 188418/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 23, idle 189242/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 24, idle 189071/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 25, idle 184950/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 26, idle 189222/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 201760/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 28, idle 187830/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 29, idle 187993/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 186874/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 31, idle 187659/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 32, idle 186539/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 33, idle 190499/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 188438/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 188665/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 36, idle 190442/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 37, idle 190093/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 187248/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 192060/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 198188/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 41, idle 184308/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 42, idle 188046/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 197041/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 187810/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 45, idle 190428/s, free 70064, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 188381/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 47, idle 184983/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 189765/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 185735/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 50, idle 187398/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 51, idle 190260/s, free 58576, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 52, idle 207086/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 187836/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 188893/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 188896/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 56, idle 185287/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 189042/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 185260/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 187313/s, free 58576, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 60, idle 187946/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 61, idle 188176/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 62, idle 185002/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 63, idle 189179/s, free 58576, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 64, idle 188279/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 188543/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 191496/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 189686/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 192970/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 69, idle 189482/s, free 58576, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 70, idle 185578/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 71, idle 188910/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 72, idle 185873/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 2, socks 2/38 
    Info:MAIN:Time 73, idle 185531/s, free 58576, MQTT 0(4), bWifi 1, secondsWithNoPing 3, socks 3/38 
    Info:MAIN:Time 74, idle 185488/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 4, socks 2/38 
    Info:MAIN:Time 75, idle 186952/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 5, socks 2/38 
    Info:MAIN:Time 76, idle 196811/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 6, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 77, idle 187492/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 7, socks 2/38 
    Info:MAIN:Time 78, idle 207389/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 8, socks 2/38 
    Info:MAIN:Time 79, idle 189274/s, free 58576, MQTT 0(5), bWifi 1, secondsWithNoPing 9, socks 3/38 
    Info:MAIN:Time 80, idle 185275/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 10, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 81, idle 187499/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 11, socks 2/38 
    Info:MAIN:Time 82, idle 188423/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 12, socks 2/38 
    Info:MAIN:Time 83, idle 188854/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 13, socks 2/38 
    Info:MAIN:Time 84, idle 188969/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 14, socks 2/38 
    Info:MAIN:Time 85, idle 192199/s, free 58576, MQTT 0(5), bWifi 1, secondsWithNoPing 15, socks 3/38 
    Info:MAIN:Time 86, idle 186170/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 16, socks 2/38 
    Info:MAIN:Time 87, idle 190580/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 17, socks 2/38 
    Info:MAIN:Time 88, idle 190596/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 18, socks 2/38 
    Info:MAIN:Time 89, idle 188188/s, free 58576, MQTT 0(5), bWifi 1, secondsWithNoPing 19, socks 3/38 
    Info:MAIN:Time 90, idle 187663/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 20, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 91, idle 186358/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 21, socks 2/38 
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 82 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 8 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID [IoT]
    Info:MAIN:Using Pass [none]
    Error:HTTP:Created HTTP SV thread with (stack=2048)
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk_CFD9000E3/ subT cmnd/obk_CFD9000E3/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/get
    Info:MQTT:MQTT_RegisterCallback called for bT homeassistant/ subT homeassistant/+
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Drv tmSensor is already loaded.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Time 1, idle 218324/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 6C 66 33 36 79 35 6E 77 62 38 6A 6B 78 77 67 67 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D 99 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"lf36y5nwb8jkxwgg","v":"1.0.0"}
    Info:MAIN:Time 2, idle 189389/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 191214/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 189976/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 191131/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [IoT]
    Info:MAIN:Time 6, idle 183992/s, free 70064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 182524/s, free 69952, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 85103/s, free 69592, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 69592, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 69592, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 11, idle 91824/s, free 70320, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 02 00 00 01 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    Info:MAIN:Time 12, idle 190393/s, free 70360, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 13, idle 194905/s, free 58368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 14, idle 190858/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 191674/s, free 58560, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 16, idle 193651/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 192405/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 18, idle 192210/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 19, idle 197469/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 20, idle 194425/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 21, idle 188736/s, free 58560, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 22, idle 191202/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 23, idle 193383/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 24, idle 194336/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 25, idle 192459/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 26, idle 194235/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 191499/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 28, idle 190842/s, free 70272, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 29, idle 193400/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 191080/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 31, idle 189979/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 32, idle 192341/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 33, idle 192471/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 191316/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 190236/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 36, idle 200107/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 37, idle 191829/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 194117/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 194222/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 191956/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-39,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 41, idle 187373/s, free 58560, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 42, idle 192023/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 193619/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 194523/s, free 70272, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 45, idle 195329/s, free 58560, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 46, idle 189252/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 47, idle 192804/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 191465/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 193134/s, free 58560, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 50, idle 199987/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 51, idle 190251/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 52, idle 188040/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 192539/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 193207/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 194177/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 56, idle 202425/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 190556/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 193348/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 202326/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 60, idle 194751/s, free 70272, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 61, idle 186784/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 62, idle 195522/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 63, idle 190377/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 64, idle 191564/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 191887/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 194484/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 193079/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 187858/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 69, idle 193527/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 70, idle 188969/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 71, idle 188932/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 72, idle 193726/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 2, socks 2/38 
    Info:MAIN:Time 73, idle 190840/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 3, socks 2/38 
    Info:MAIN:Time 74, idle 192224/s, free 58560, MQTT 0(4), bWifi 1, secondsWithNoPing 4, socks 3/38 
    Info:MAIN:Time 75, idle 190446/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 5, socks 2/38 
    Info:MAIN:Time 76, idle 194492/s, free 70272, MQTT 0(4), bWifi 1, secondsWithNoPing 6, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 77, idle 192622/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 7, socks 2/38 
    Info:MAIN:Time 78, idle 191945/s, free 58560, MQTT 0(5), bWifi 1, secondsWithNoPing 8, socks 3/38 
    Info:MAIN:Time 79, idle 189697/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 9, socks 2/38 
    Info:MAIN:Time 80, idle 191847/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 10, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 81, idle 190428/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 11, socks 2/38 
    Info:MAIN:Time 82, idle 192043/s, free 58560, MQTT 0(5), bWifi 1, secondsWithNoPing 12, socks 3/38 
    Info:MAIN:Time 83, idle 189710/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 13, socks 2/38 
    Info:MAIN:Time 84, idle 193422/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 14, socks 2/38 
    Info:MAIN:Time 85, idle 190919/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 15, socks 2/38 
    Info:MAIN:Time 86, idle 194801/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 16, socks 2/38 
    Info:MAIN:Time 87, idle 192796/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 17, socks 2/38 
    Info:MAIN:Time 88, idle 191331/s, free 58560, MQTT 0(5), bWifi 1, secondsWithNoPing 18, socks 3/38 
    Info:MAIN:Time 89, idle 189843/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 19, socks 2/38 
    Info:MAIN:Time 90, idle 194661/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 20, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 91, idle 187665/s, free 70272, MQTT 0(5), bWifi 1, secondsWithNoPing 21, socks 2/38 



    Added after 9 [hours] 19 [minutes]:

    @p.kaczmarek2
  • ADVERTISEMENT
  • #157 21711224
    patanronald
    Level 3  
    @p.kaczmarek2

    How can i check that? I did create autoexec.bat using the application because it wasn't there after the flash.

    Editing autoexec.bat file in Tasmota UI with configuration script visible

    This hasn't helped the situation though. Any other tips?

    I did something and autoexec.bat loaded now but the results hasn't changed. Here is the logs.

    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 86 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 8 changes count.
    Error:CMD:no file early.bat err -2
    Info:GEN:PIN_SetupPins pins have been set up.
    Info:MAIN:Main_Init_Before_Delay done
    Info:MAIN:Main_Init_Delay
    Info:MAIN:Main_Init_Delay done
    Info:MAIN:Main_Init_After_Delay
    Info:MAIN:Using SSID [IoT]
    Info:MAIN:Using Pass [none]
    Error:HTTP:Created HTTP SV thread with (stack=2048)
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obk_CFD9000E3/ subT cmnd/obk_CFD9000E3/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT obk_CFD9000E3/ subT obk_CFD9000E3/+/get
    Info:MQTT:MQTT_RegisterCallback called for bT homeassistant/ subT homeassistant/+
    Info:CMD:CMD_StartScript: started @startup at the beginning
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Drv tmSensor is already loaded.
    Info:GEN:Channel 27 type changed to temperature_div10
    Info:GEN:Channel 46 type changed to Humidity
    Info:GEN:Channel 10 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 217189/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 6C 66 33 36 79 35 6E 77 62 38 6A 6B 78 77 67 67 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D 99 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"lf36y5nwb8jkxwgg","v":"1.0.0"}
    Info:MAIN:Time 2, idle 187857/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 191301/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 190791/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 189923/s, free 75808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Registered for wifi changes
    Info:MAIN:Connecting to SSID [IoT]
    Info:MAIN:Time 6, idle 183594/s, free 70440, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Boot complete time reached (5 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 7, idle 180196/s, free 69960, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 86411/s, free 69600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 69600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 69600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 11, idle 89242/s, free 70312, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:TuyaMCU:Received: 55 AA 00 02 00 00 01 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    Info:MAIN:Time 12, idle 188769/s, free 70352, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 13, idle 193261/s, free 58568, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 14, idle 181921/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 190775/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 16, idle 194353/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 192437/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 18, idle 191140/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 19, idle 190309/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 20, idle 191237/s, free 70040, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-40,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 21, idle 188191/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 22, idle 192102/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 23, idle 196340/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 24, idle 192303/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 25, idle 193103/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 26, idle 191560/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 191204/s, free 70048, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 28, idle 194338/s, free 70264, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 29, idle 188803/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 190458/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-42,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 31, idle 188546/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 32, idle 193740/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 33, idle 192959/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 193280/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 196580/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 36, idle 191670/s, free 70048, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 37, idle 189770/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 191550/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 191954/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 194831/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-43,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 41, idle 189320/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 42, idle 191935/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 193998/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 189596/s, free 70264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 45, idle 193393/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 186487/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 47, idle 194398/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 192791/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 192323/s, free 61656, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 50, idle 191437/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-43,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MAIN:Time 51, idle 184159/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 52, idle 189580/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 185430/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 190941/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 188721/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 56, idle 189014/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 199876/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 192976/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 189833/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 60, idle 194136/s, free 70264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=10.10.50.23 gate=10.10.50.1 mask=255.255.255.0 mac=c0:f8:53:ea:b3:6b
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-43,ssid=IoT,bssid=9c:a2:f4:2f:3c:2c,channel=6,cipher_type:CCMP
    Info:MQTT:mqtt_userName mqttbroker
    mqtt_pass ********
    mqtt_clientID obk_CFD9000E3
    mqtt_host 10.10.40.106:1883
    Info:MAIN:Time 61, idle 186427/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 62, idle 190130/s, free 69680, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 63, idle 191525/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 64, idle 189839/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 190149/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 194037/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 191280/s, free 70264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    
  • #159 21712395
    patanronald
    Level 3  
    @fjk

    Try my autostart.bat config from here. Your bin file has the following dpID's as below. Hope you can get yours going? Any chance you can take a picture of PCB board?

    startDriver TuyaMCU
    startDriver tmSensor
    // dpID 27 is temperature div 10
    setChannelType 27 temperature_div10
    linkTuyaMCUOutputToChannel 27 val 27
    // dpID 46 is % humidity
    setChannelType 46 Humidity
    linkTuyaMCUOutputToChannel 46 val 46
    // dpID 101 is battery state - low(0), mid(1) and high(2)
    setChannelType 10 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 101 enum 10
    setChannelLabel 10 Battery
  • #160 21712870
    fjk
    Level 11  
    >>21710040 >>21712395
    This code finally works for me:
    startDriver TuyaMCU
    startDriver tmSensor
    setChannelType 27 temperature_div10
    linkTuyaMCUOutputToChannel 27 val 27
    setChannelType 46 Humidity
    linkTuyaMCUOutputToChannel 46 val 46
    setChannelType 10 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 101 enum 10
    setChannelLabel 10 Battery

    I'm tried to extract values with TuyaMCU analyzer but it crashes when I choose file to analyze, and BKFlasher shows no info about dpID's
    Here is pic of my board >>21703002
  • #161 21712873
    patanronald
    Level 3  
    @fjk I am glad it works for you. I was able to get all the dpIDs but doesn't work for me. The sensor doesn't wake up and update the temp and humidity for me.

    Looks like your board is different to mine but same dpIDs.
  • #162 21712966
    fjk
    Level 11  
    >>21712873 Maybe try on battery power, I read that sometimes sensors shows zero on main power.
  • #163 21713542
    patanronald
    Level 3  
    @fjk I tried powering it using battery and external power using the battery terminals. No luck. Do you mind sharing what you have done in your setup?

Topic summary

The discussion centers on the teardown, firmware flashing, and configuration of the TH01 generic temperature and humidity sensor, which uses a BK7231N WiFi module and a TuyaMCU microcontroller (MCU) managing sensor data and power. Users report challenges flashing the device due to the MCU controlling power to the WiFi module and UART lines being connected between MCU and WiFi module, requiring either cutting UART traces, desoldering the MCU or WiFi module, or powering the WiFi module externally during flashing. The TuyaMCU driver in OpenBK7231N firmware is essential for communication, with dpIDs 1 and 2 corresponding to temperature (divided by 10) and humidity, and dpID 3 likely representing battery state (low, mid, high). Proper autoexec.bat configuration involves starting TuyaMCU and tmSensor drivers, linking dpIDs to OBK channels, and setting channel types accordingly. MQTT integration is commonly used for data reporting, with some users noting duplicate MQTT messages and template adjustments needed for value formatting. Battery-powered operation requires the MCU to cycle power to the WiFi module to conserve energy, so powering the WiFi module externally can prevent data reporting. Flags such as WiFi quick connect and static IP improve connection stability. Some users successfully flash without desoldering by cutting UART traces and powering the WiFi module directly. The community shares detailed pinout photos, flashing procedures, and configuration scripts. Variations in PCB versions and sensor chips (AHT20, AHT30, CHT8315) affect driver selection and configuration. Deep sleep and wakeup configurations are discussed for battery life optimization. Tools like TuyaMCUAnalyzer assist in decoding UART communication. Issues with MQTT hostname configuration can prevent MQTT startup, and firmware updates have improved battery device support. The thread also covers troubleshooting WiFi connectivity, log inspection via WebUI, and Home Assistant integration challenges.
Summary generated by the language model.
ADVERTISEMENT