logo elektroda
logo elektroda
X
logo elektroda

[BK7231N ] Teardown of TH08 LCD Calendar/clock/temperature/humidity, 3xAAA battery, backlight

morgan_flint 29787 225
ADVERTISEMENT
  • #151 21002238
    p.kaczmarek2
    Moderator Smart Home
    First thing to check is the Web App Log. This will tell you whether any communication occurs. Keep in mind that you need to check this when TuyaMCU decided to power up WiFi module and not by artificially powering it.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #152 21002511
    bogovik
    Level 5  
    Why is there no record of data exchange with TuyaMCU in my log?

    My LOG:
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 63 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 63 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 [Pandora]
    Info:MAIN:Using Pass [oxajfi12]
    Info:MQTT:MQTT_RegisterCallback called for bT obkTH08B/ subT obkTH08B/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT TH08B/ subT TH08B/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obkTH08B/ subT cmnd/obkTH08B/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/TH08B/ subT cmnd/TH08B/+
    Info:MQTT:MQTT_RegisterCallback called for bT obkTH08B/ subT obkTH08B/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:MAIN:Time 1, idle 267682/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 2, idle 189145/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 189464/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 189460/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 189155/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:ssid:Pandora key:#######
    Info:MAIN:Time 6, idle 190557/s, free 73040, 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 182770/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 82748/s, free 73192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 73192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 73192, 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=c8:47:8c:00:00:00
    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:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 11, idle 93625/s, free 73448, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 12, idle 188009/s, free 73208, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:Seconds since Jan 1 1900 = 3919318114
    Info:NTP:Unix time  : 1710340114
    Info:NTP:Local Time : 2024/03/13 14:28:34
    Info:MAIN:Time 13, idle 185562/s, free 73400, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 14, idle 197120/s, free 73400, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 187190/s, free 73424, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 16, idle 188647/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 191322/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 18, idle 201176/s, free 64768, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 19, idle 186662/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 20, idle 188613/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-33,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 21, idle 188097/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 22, idle 189483/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 23, idle 191107/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 24, idle 191274/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 25, idle 190417/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 26, idle 191533/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 190010/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 28, idle 190606/s, free 73384, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 29, idle 191917/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 190709/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-33,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 31, idle 188271/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 32, idle 190187/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 33, idle 191900/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 191917/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 189111/s, free 64768, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 36, idle 192628/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 37, idle 190271/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 189940/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 189214/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 200672/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-34,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 41, idle 188222/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 42, idle 190989/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 187511/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 189768/s, free 73384, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 45, idle 191667/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 193924/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 47, idle 187959/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 190248/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 381095/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 50, idle 188932/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-34,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 51, idle 185990/s, free 64768, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 52, idle 188907/s, free 73384, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 191372/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 189481/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 188529/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 56, idle 191285/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 189013/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 58, idle 192858/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 187314/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 60, idle 193778/s, free 73400, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-36,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 61, idle 186099/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 62, idle 193551/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 63, idle 187095/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 64, idle 190241/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 191354/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 192053/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 187450/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 191469/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 69, idle 188985/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 70, idle 191476/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-34,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 71, idle 183426/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 72, idle 374243/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing 2, socks 2/38 
    Info:MAIN:Time 73, idle 189739/s, free 73208, MQTT 0(4), bWifi 1, secondsWithNoPing 3, socks 3/38 
    Info:NTP:Seconds since Jan 1 1900 = 3919318175
    Info:NTP:Unix time  : 1710340175
    Info:NTP:Local Time : 2024/03/13 14:29:35
    Info:MAIN:Time 74, idle 192862/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing 4, socks 2/38 
    Info:MAIN:Time 75, idle 187500/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing 5, socks 2/38 
    Info:MAIN:Time 76, idle 192820/s, free 73400, MQTT 0(4), bWifi 1, secondsWithNoPing 6, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 77, idle 195126/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 7, socks 2/38 
    Info:MAIN:Time 78, idle 207614/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 8, socks 2/38 
    Info:MAIN:Time 79, idle 189786/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 9, socks 2/38 
    Info:MAIN:Time 80, idle 191716/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 10, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-49,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 81, idle 184588/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 11, socks 2/38 
    Info:MAIN:Time 82, idle 188320/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 12, socks 2/38 
    Info:MAIN:Time 83, idle 187871/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 13, socks 2/38 
    Info:MAIN:Time 84, idle 189231/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 14, socks 2/38 
    Info:MAIN:Time 85, idle 191211/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 15, socks 2/38 
    Info:MAIN:Time 86, idle 192831/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 16, socks 2/38 
    Info:MAIN:Time 87, idle 381320/s, free 72704, MQTT 0(5), bWifi 1, secondsWithNoPing 17, socks 2/38 
    Info:MAIN:Time 88, idle 191371/s, free 73400, MQTT 0(5), bWifi 1, secondsWithNoPing 18, socks 2/38 
     #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 63 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 [Pandora]
    Info:MAIN:Using Pass [oxajfi12]
    Info:MQTT:MQTT_RegisterCallback called for bT obkTH08B/ subT obkTH08B/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT TH08B/ subT TH08B/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obkTH08B/ subT cmnd/obkTH08B/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/TH08B/ subT cmnd/TH08B/+
    Info:MQTT:MQTT_RegisterCallback called for bT obkTH08B/ subT obkTH08B/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:MAIN:Time 1, idle 265744/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 2, idle 188027/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 3, idle 188230/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 4, idle 190686/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 5, idle 188237/s, free 78392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:ssid:Pandora key:#######
    Info:MAIN:Time 6, idle 181368/s, free 73040, 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 184061/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 8, idle 82064/s, free 73192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 9, idle 0/s, free 73192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 10, idle 0/s, free 73192, 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=c8:47:8c:00:00:00
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 11, idle 105531/s, free 71752, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 12, idle 187351/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 13, idle 190128/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 14, idle 187887/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 15, idle 186047/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 16, idle 191461/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 17, idle 187856/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 18, idle 188013/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 19, idle 190411/s, free 73600, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 20, idle 187945/s, free 73600, 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=c8:47:8c:00:00:00
    Info:GEN:sta: 0, softap: 0, b/g/n
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_AUTH_FAILED - 3
    Info:MAIN:Time 21, idle 182123/s, free 72920, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 22, idle 187689/s, free 72296, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Time 23, idle 193737/s, free 71032, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 24, idle 176689/s, free 73136, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:NTP:Seconds since Jan 1 1900 = 3919318253
    Info:NTP:Unix time  : 1710340253
    Info:NTP:Local Time : 2024/03/13 14:30:53
    Info:MAIN:Time 25, idle 191239/s, free 73368, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 26, idle 188631/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 27, idle 185670/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 28, idle 193429/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 29, idle 188206/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 30, idle 189510/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-47,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 31, idle 185908/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 32, idle 189776/s, free 64744, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 33, idle 190178/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 34, idle 189835/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 35, idle 187132/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 36, idle 193501/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 37, idle 190840/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 38, idle 190119/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 39, idle 187269/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 40, idle 194026/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-46,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 41, idle 185987/s, free 73368, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 42, idle 188846/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 43, idle 191110/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 44, idle 190862/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 45, idle 189804/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 46, idle 202709/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 47, idle 187879/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 48, idle 187981/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 49, idle 192201/s, free 73136, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 50, idle 189457/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-47,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 51, idle 185453/s, free 64744, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 52, idle 189330/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 53, idle 188168/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 54, idle 192079/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 55, idle 187597/s, free 73136, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 3/38 
    Info:MAIN:Time 56, idle 189361/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 57, idle 191165/s, free 73368, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 58, idle 192415/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 59, idle 185648/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 60, idle 188581/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-47,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 61, idle 186725/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 62, idle 189695/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 63, idle 187878/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 64, idle 204484/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 65, idle 189145/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 66, idle 191963/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 67, idle 190913/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 68, idle 186634/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 69, idle 189421/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 70, idle 191914/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-46,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 71, idle 183441/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 72, idle 186955/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 73, idle 193565/s, free 73368, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:MAIN:Time 74, idle 190305/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 75, idle 187225/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 76, idle 187706/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 77, idle 188520/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 78, idle 191506/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 79, idle 191794/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 80, idle 184305/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:GEN:dhcp=0 ip=192.168.31.28 gate=192.168.31.1 mask=255.255.255.0 mac=c8:47:8c:00:00:00
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-47,ssid=Pandora,bssid=88:c3:97:51:c0:02,channel=13,cipher_type:CCMP
    Info:MAIN:Time 81, idle 187750/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 82, idle 192015/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 83, idle 190882/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38 
    Info:MAIN:Time 84, idle 187594/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing 1, socks 2/38 
    Info:MAIN:Time 85, idle 192973/s, free 73176, MQTT 0(4), bWifi 1, secondsWithNoPing 2, socks 3/38 
    Info:NTP:Seconds since Jan 1 1900 = 3919318314
    Info:NTP:Unix time  : 1710340314
    Info:NTP:Local Time : 2024/03/13 14:31:54
    Info:MAIN:Time 86, idle 187945/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing 3, socks 2/38 
    Info:MAIN:Time 87, idle 189721/s, free 73368, MQTT 0(4), bWifi 1, secondsWithNoPing 4, socks 2/38
    


    For example, in the log of user dgel27 there is the following entry:
    Post #41 dgel27
    Info:TuyaMCU: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:TuyaMCU_ProcessIncoming[ver=0]: processing command 1 (QueryProductInformation) with 43 bytes

    Info:MAIN:Time 4, idle 190149/s, free 77120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU: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:TuyaMCU_ProcessIncoming[ver=0]: processing command 1 (QueryProductInformation) with 43 bytes
    Info:TuyaMCU:TuyaMCU_ParseQueryProductInformation: received {"p":"lf36y5nwb8jkxwgg","v":"1.0.0"}
    Info:MAIN:Time 5, idle 191246/s, free 77120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:******** key:******** 


    How to enable data exchange with TuyaMCU? Is there a console command that forces sensor reading?

    Added after 30 [minutes]:

    I'm sorry, I found the reason why there was no entry in the log for receiving data from TuyaMCU. I soldered the RX pin poorly to the TuyaMCU chip, there was no contact. I heated the leg of the RX TuyaMCU with a soldering iron and everything worked.

    Close-up of a circuit board with an arrow pointing to the MCU_RX label.

    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:TuyaMCU:Received: 55 AA 00 0B 00 00 0A 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 01 08 02 02 00 04 00 00 00 0B 03 04 00 01 02 46 
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 264
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 11
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    
  • ADVERTISEMENT
  • #153 21002791
    p.kaczmarek2
    Moderator Smart Home
    I am glad to hear that the problem is resolved. I will just add that there is no command to request state from a battery powered device, because it follows a very strict exchange protocol that starts when the MCU itself decided to power on the WiFi module. You will not get communication if you power WiFi module externally.

    Battery Powered TuyaMCU protocol is different from a classic TuyaMCU.
    Helpful post? Buy me a coffee.
  • #154 21003945
    spin55
    Level 17  
    Clarify that I bought this device taking advantage of an offer and for experimental purposes because, as I already mentioned, I think that Zigbee battery devices are much more efficient than standard Wi-Fi devices.

    It is a TH08 model with a plate similar to that of @spupetic with reference TH08-CBU-BL55072A_V3.7 2023-11-06.

    As soon as I opened it and made the standard CBU module to UART connections, I managed to make a backup copy of the original firmware and then flash it with OpenBK7231N_QIO_1.17.501.bin. I was able to connect to the Access Point and configure the Wifi network. And from here it became impossible to establish communication. I connected a modem to the TX2 port of the CBU module and could see that the module kept rebooting before the router could assign it a dynamic IP.

    I tried to flash it again and it was impossible. It started well and always ended before the end.

    Following @bogovik's comment in post #152, I raised the two pins of U3 corresponding to MCU_RX and MCU_TX (pins 9 and 10 of U3). I tried flashing it and it also crashed before finishing.

    Following @morgan_flint's comment in post #128, I was able to verify with a multimeter that the 2.82V voltage at the CEN terminal of the CBU module dropped to ground every so often and initialized the module. I verified that it is connected to pin 8 of U3, so I lifted the pin (with a soldering iron and a pin) and problem solved.

    I believe that interrupting the CEN connection is enough to successfully flash the CBU module, I don't think it is necessary to interrupt MCU_TX and MCU_RX. In my case I already had them lifted from the previous unsuccessful test.

    Close-up of the TH08 circuit board with visible connections and pin labels. Soldering iron with heated tip next to a metal pin on a white background.
  • ADVERTISEMENT
  • #155 21004143
    morgan_flint
    Level 14  
    >>21002026
    I see you solved your problem, but I think something is missing in your autoexex.bat.

    This is my present autoaexec.bat:
    startDriver TuyaMCU
    startDriver tmSensor
    startDriver NTP
    
    ntp_setServer  150.214.94.5
    ntp_timeZoneOfs 1
    
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    
    setChannelType 3 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 3 val 3
    setChannelLabel 3 BatteryLevel

    The differences:
    - ntp_setServer definition is missing in yours... Is time showing correctly on your device?
    - mqtt_broadcastItemsPerSec 20 is missing in mine. I think it's not needed because in this device the Tuya MCU decides when to update the information based on temp/humidity changes to save battery
  • #156 21004623
    bogovik
    Level 5  
    @spin55, Hi!

    In your photo there is a green wire connected to the left side of the CBU. Why is it needed?

    In my CBU, I connected the green wire to the CEN pin and during the firmware I shorted it to the CBU cover (the CBU cover is connected to the ground pin). Marked contact details in the photo
    Close-up of a circuit board with wires connected to a WiFi module.

    When the MCU_RX and MCU_TX contacts are disconnected, the WiFi module (CBU) does not go to sleep, it is convenient to program and configure. In my case, I will use the TH08B sensor to obtain the indoor temperature and transmit the temperature via the SendGet command to the SonOff WiFi relay (Tasmota), which controls the gas boiler. Therefore, I need a lot of time to configure TH08B. If I connect the MCU_RX and MCU_TX contacts, then Tuya will turn off the power to TH08B too quickly and I will not have time to check the settings.

    Added after 20 [minutes]:

    @p.kaczmarek2, Hi!

    Is there a way to wait for the SendGet command to finish executing? The logs indicate that SendGet is an asynchronous command.

    Info:HTTP_CLIENT:HTTPClient_Async_SendGet for http://192.168.31.90/RemoteSensorData?Temperature=$CH1&Humidity=$CH2&BatteryLevel=$CH3, sizeof(httprequest_t) == 160!


    However, I did not find a command that could wait for the SendGet command to complete. For example, there is a command “waitFor WiFiState 4”, which waits for the WiFi state to change (connected). Is it possible to create a "waitFor SendGet" command?

    Beken side:
    SendGet http://192.168.31.90/RemoteSensorData?Temperature=$CH1&Humidity=$CH2&BatteryLevel=$CH3


    Tasmota side:
    # Add HTTP POST and GET handlers
      def web_add_handler()
         webserver.on('/RemoteSensorData', / -> self.on_http_get(), webserver.HTTP_GET)
      end
    
      def on_http_get()
       webserver.content_response("{\"OK\":[]}") 
      end


    In the above example, Tasmota returns the result of processing the SendGet command as the following string ""{\"OK\":[]}"", which informs the caller that the command was processed successfully. How can I get a response from the server and parse it on the side? For example, how to check that the server returned "OK" and not some kind of error?

    Added after 1 [hours] 58 [minutes]:

    @pkaczmarek2, do you think that if i send a buffer such as "g_hello" or "g_request_state" to the Tuya MCU every second, this will prevent the power from the WiFi module from turning off? Or at least delay the power outage? I'm looking for a solution to the problem that the MCU turns off power to the WiFi module too early.
    Examples of buffers taken from the sources - drv_tuyaMCUSensor.c

    //static byte g_hello[] =  { 0x55, 0xAA, 0x00, 0x01, 0x00, 0x00, 0x00 };
    //static byte g_request_state[] =  { 0x55, 0xAA, 0x00, 0x02, 0x00, 0x01, 0x04, 0x06 };
    
    
    TuyaMCU_Send_RawBuffer(g_hello,sizeof(g_hello));
    or
    TuyaMCU_Send_RawBuffer(g_request_state,sizeof(g_request_state));
  • #157 21004765
    spin55
    Level 17  
    bogovik wrote:
    In your photo there is a green wire connected to the left side of the CBU. Why is it needed?


    To flash the CBU module it is not necessary to connect a cable to the TX2 pin, but it is convenient to monitor this pin once flashed to see the boot process and detect the cause of any malfunction. Please note that on battery powered devices with TuyaMCU chip you have no control over the disconnection time and it is so fast that you often do not have access to the OpenBeken web log.

    I also use it to know the IP because, sometimes, it does not appear in the router's DHCP list because the disconnection is so fast. If you do not know the IP you cannot access the website. Without a website you do not have access to the registry. And many times even if you know the IP, there is no time to load the web page. You have all that information and more on that TX2 pin. I connect it to RX of the USB and monitor with the serial monitor of the Arduino IDE, selecting 115200 bps, in this case. Logically you can use any other program for this.

    Normally, battery-powered devices that have a TuyaMCU chip can usually be flashed without having to cut tracks, and that has been the case so far in my case. Even in this case, the first flashing was successful from the original firmware, that's why I wanted to narrate the entire process until I managed to flash it.

    In this specific device, it is the CEN signal that prevents the flashing process from being completed successfully, and the least intrusive way to interrupt the connection has been to lift pin 8 of U3 (TuyaMCU chip) following your example.

    Grettings
  • #158 21005107
    bogovik
    Level 5  
    spin55 wrote:
    To flash the CBU module it is not necessary to connect a cable to the TX2 pin, but it is convenient to monitor this pin once flashed to see the boot process and detect the cause of any malfunction. Please note that on battery powered devices with TuyaMCU chip you have no control over the disconnection time and it is so fast that you often do not have access to the OpenBeken web log.


    Thanks for your reply. This was very helpful for me.

    To preserve battery charge, Tuya MCU turns off the power to the WiFi module. How does the WiFi module turn off technically? Does the MSU stop supplying voltage to the corresponding CBU pins (VDD and ground) or use the DeepSleep command to sleep?

    During my experiments, I specified the command "DeepSleep 60" in Autoexec.bat. As a result, the CBU module was unavailable, the web interface also did not work, and the settings could not be changed. I had to re-flash the module to disable the DeepSleep command in Autoexec.bat.

    Can this be checked by connecting to the TX2 pin? Will I be able to see if the CBU power supply is being turned off or if deep sleep is being used?
  • #159 21005155
    fjcns
    Level 5  
    I'm also starting to understand how this thermometer works

    In this model that runs on batteries, the power to the Wi-Fi module is managed by the MCU. without power there is no wifi.

    You can check with a multimeter on the cbu vdd that the power is cut.

    Deep sleep is not used.

    To make the settings at openBeken web Pages you can power directly the CBU module with a external power supply.

    With the heating on, the temperature inside the house does not rise or fall suddenly, when the mcu detects that there is a difference it will turn on the cbu to update the temperature
  • #160 21005228
    spin55
    Level 17  
    bogovik wrote:
    To preserve battery charge, Tuya MCU turns off the power to the WiFi module. How does the WiFi module turn off technically? Does the MSU stop supplying voltage to the corresponding CBU pins (VDD and ground) or use the DeepSleep command to sleep?


    In devices that have a TuyaMCU chip, DeepSleep is not used, it is the chip itself that controls the 3.3V applied to pin 14 of the CBU module, as well as the sensors. All the logic is implemented in this TuyaMCU chip, the Wi-Fi module (in this case CBU) only uses it to send or receive data remotely. However, in battery-powered devices that only have a Wifi module, all the logic is implemented in the module itself, which is why you have to use the DeepSleep command so that it does not drain the batteries.

    bogovik wrote:
    During my experiments, I specified the command "DeepSleep 60" in Autoexec.bat. As a result, the CBU module was unavailable, the web interface also did not work, and the settings could not be changed. I had to re-flash the module to disable the DeepSleep command in Autoexec.bat.


    Logically, if you put a DeepSleep 60 in autoexec.bat, you send it to sleep as soon as it starts up for 1 minute, but when it wants to wake up it will not be able to because the TuyaMCU chip will have cut off the 3V while it was sleeping and this chip does not replenish the 3V until you press the Backlight Button or there is new information to send. And when it starts it will sleep again because the DeepSleep is in autoexec. Conclusion, it goes into a loop and there is no way to stop it until you can somehow remove that DeepSleep command from autoexec.bat.


    bogovik wrote:
    Can this be checked by connecting to the TX2 pin? Will I be able to see if the CBU power supply is being turned off or if deep sleep is being used?


    I don't know if there would be time to see anything of what happens when the loop occurs, but it is undoubtedly the best place to try to see it.

    https://developer.tuya.com/en/docs/iot/CBU-NL-module-datasheet?id=Kbaeq6j53y0yg
  • ADVERTISEMENT
  • #161 21005273
    bogovik
    Level 5  
    @fjcns, @spin55, thank you very much for your help!

    You were right! I checked the power supply with the device running. Tuya MCU controls the power supply to the CBU through pin 14 (Power supply 3V3). DeepSleep is not used.

    In my case this is very bad.
    While loading the CBU, I need to transfer data to the Tasmota device by calling the SendGet command.
    SendGet http://192.168.31.90/RemoteSensorData?Temperature=$CH1&Humidity=$CH2&BatteryLevel=$CH3

    The SendGet command fails to complete because the Tuya MCU turns off the power to the WiFi module too quickly. Accordingly, Tasmota does not have time to receive this information.

    How can this be resolved?

    1. At first I thought of soldering a capacitor of sufficient capacity to the legs of the WiFi module so that it would not turn off too quickly. But calculations showed that the capacitor would be too large and would not fit into the device body.

    2. Lay a wire route directly from the battery compartment to the power legs of the WiFi module. In this case, the WiFi module will not turn off. Control the WiFi module shutdown time using the DeepSleep command in Autoexec.bat. For example:
    DeepSleep 120


    How else can I increase the time after which the WiFi module will turn off?
  • #162 21005387
    spin55
    Level 17  
    bogovik wrote:
    How else can I increase the time after which the WiFi module will turn off?


    The reason that TuyaMCU reduces the connection time to the maximum is to ensure that the battery life is acceptable. If you plan to use this device on batteries, it won't help you much to send that SendGet command because the batteries will run out very quickly.

    Can you post your Autoexec.bat?

    Can you post the log reading to TX2?
  • #163 21005569
    fjcns
    Level 5  
    bogovik, I want to do the same as you, but I'm sending the data out via mqtt to Homeassistant

    A relay will be controlled by Homeassistant to turn the boiler on or off
  • #164 21005614
    spin55
    Level 17  
    The reading on TX2 should be something like this:

    Spoiler:
    19:25:23.185 -> V:BK7231N_1.0.119:25:23.185 -> REG:cpsr spsr r13 r1419:25:23.185 -> SVC:000000D3 00401C1C 000033AC19:25:23.185 -> IRQ:000000d2 00000010 00401e0c 587210b6 19:25:23.185 -> FIR:000000d1 00000010 00401ffc 02389f01 19:25:23.185 -> SYS:000000df 0040192c 00000158 19:25:23.185 -> ST:0000000019:25:23.185 -> J 0x1000019:25:23.185 -> bk_misc_init_start_type 0 0
    19:25:23.185 -> prvHeapInit-start addr:0x414530, size:113360
    19:25:23.219 -> [Flash]id:0xeb6015
    19:25:23.219 -> sctrl_sta_ps_init
    19:25:23.219 -> cset:0 0 0 0
    19:25:23.219 -> Entering initLog()...
    19:25:23.219 -> Commands registered!
    19:25:23.219 -> initLog() done!
    19:25:23.219 -> Info:MAIN:Main_Init_Before_Delay
    19:25:23.219 -> Info:CFG:####### Boot Count 115 #######
    19:25:23.255 -> Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 17 changes count.
    19:25:23.255 -> Error:CMD:no file early.bat err -2
    19:25:23.255 -> Info:GEN:PIN_SetupPins pins have been set up.
    19:25:23.288 -> Info:MAIN:Main_Init_Before_Delay done
    19:25:23.288 ->
    19:25:23.288 -> Main_Init_Before_Delay done
    19:25:23.288 -> Info:MAIN:Main_Init_Delay
    19:25:23.288 ->
    19:25:23.288 -> Main_Init_Delay
    19:25:23.288 ->
    19:25:23.288 -> delaying start
    19:25:23.288 -> bandgap_calm_in_efuse=0x38
    19:25:23.288 -> [load]bandgap_calm=0x38->0x18,vddig=4->5
    19:25:23.288 -> [FUNC]rwnxl_init
    19:25:23.288 -> [bk]tx_txdesc_flush
    19:25:23.288 -> #Startup delayed 0ms#
    19:25:23.288 -> [FUNC]intc_init
    19:25:23.288 -> [FUNC]calibration_main
    19:25:23.288 -> gpio_level=1,txpwr_state=0
    19:25:23.288 -> user define rfcali mode:1
    19:25:23.323 -> get rfcali_mode:1
    19:25:23.323 -> #Startup delayed 10ms#
    19:25:23.323 -> #Startup delayed 20ms#
    19:25:23.323 -> #Startup delayed 30ms#
    19:25:23.323 -> #Startup delayed 40ms#
    19:25:23.323 -> #Startup delayed 50ms#
    19:25:23.357 -> #Startup delayed 60ms#
    19:25:23.357 -> #Startup delayed 70ms#
    19:25:23.357 -> #Startup delayed 80ms#
    19:25:23.391 -> #Startup delayed 90ms#
    19:25:23.391 -> #Startup delayed 100ms#
    19:25:23.391 -> #Startup delayed 110ms#
    19:25:23.391 -> #Startup delayed 120ms#
    19:25:23.424 -> #Startup delayed 130ms#
    19:25:23.424 -> #Startup delayed 140ms#
    19:25:23.424 -> #Startup delayed 150ms#
    19:25:23.458 -> #Startup delayed 160ms#
    19:25:23.458 -> #Startup delayed 170ms#
    19:25:23.458 -> #Startup delayed 180ms#
    19:25:23.492 -> #Startup delayed 190ms#
    19:25:23.492 -> #Startup delayed 200ms#
    19:25:23.492 -> #Startup delayed 210ms#
    19:25:23.492 -> #Startup delayed 220ms#
    19:25:23.526 -> #Startup delayed 230ms#
    19:25:23.526 -> #Startup delayed 240ms#
    19:25:23.526 -> #Startup delayed 250ms#
    19:25:23.561 -> #Startup delayed 260ms#
    19:25:23.561 -> #Startup delayed 270ms#
    19:25:23.561 -> #Startup delayed 280ms#
    19:25:23.561 -> #Startup delayed 290ms#
    19:25:23.596 -> #Startup delayed 300ms#
    19:25:23.596 -> #Startup delayed 310ms#
    19:25:23.596 -> #Startup delayed 320ms#
    19:25:23.630 -> #Startup delayed 330ms#
    19:25:23.630 -> #Startup delayed 340ms#
    19:25:23.630 -> #Startup delayed 350ms#
    19:25:23.630 -> #Startup delayed 360ms#
    19:25:23.664 -> #Startup delayed 370ms#
    19:25:23.664 -> #Startup delayed 380ms#
    19:25:23.664 -> #Startup delayed 390ms#
    19:25:23.699 -> #Startup delayed 400ms#
    19:25:23.699 -> #Startup delayed 410ms#
    19:25:23.699 -> #Startup delayed 420ms#
    19:25:23.733 -> #Startup delayed 430ms#
    19:25:23.733 -> #Startup delayed 440ms#
    19:25:23.733 -> calibration_main over
    19:25:23.733 -> NO TXPWR_TAB_TAB found in flash
    19:25:23.733 -> Load default txpwr for b:0xb3fe4
    19:25:23.733 -> Load default txpwr for g:0xb3ff2
    19:25:23.733 -> fit n20 table with dist:4
    19:25:23.733 -> Load default txpwr for n40:0xb4000
    19:25:23.733 -> Load default txpwr for b#Startup delayed 450ms#
    19:25:23.767 -> ltemp in flash is:350
    19:25:23.767 -> xtal in flash is:12
    19:25:23.767 -> xtal_cali:12
    19:25:23.767 -> --init_xtal = 12
    19:25:23.767 -> [FUNC]ps_init
    19:25:23.767 -> [FUNC]func_init_extended#Startup delayed 460ms#
    19:25:23.767 -> start_type:0
    19:25:23.767 -> Version:
    19:25:23.767 -> Initializing TCP/IP stack
    19:25:23.767 -> app_init finished
    19:25:23.767 -> #Startup delayed 470ms#
    19:25:23.767 -> #Startup delayed 480ms#
    19:25:23.767 -> #Startup delayed 490ms#
    19:25:23.801 -> #Startup delayed 500ms#
    19:25:23.801 -> #Startup delayed 510ms#
    19:25:23.801 -> #Startup delayed 520ms#
    19:25:23.836 -> #Startup delayed 530ms#
    19:25:23.836 -> #Startup delayed 540ms#
    19:25:23.836 -> #Startup delayed 550ms#
    19:25:23.836 -> #Startup delayed 560ms#
    19:25:23.870 -> #Startup delayed 570ms#
    19:25:23.870 -> #Startup delayed 580ms#
    19:25:23.870 -> #Startup delayed 590ms#
    19:25:23.903 -> #Startup delayed 600ms#
    19:25:23.903 -> #Startup delayed 610ms#
    19:25:23.903 -> #Startup delayed 620ms#
    19:25:23.937 -> #Startup delayed 630ms#
    19:25:23.937 -> #Startup delayed 640ms#
    19:25:23.937 -> #Startup delayed 650ms#
    19:25:23.937 -> #Startup delayed 660ms#
    19:25:23.970 -> #Startup delayed 670ms#
    19:25:23.970 -> #Startup delayed 680ms#
    19:25:23.970 -> #Startup delayed 690ms#
    19:25:24.004 -> #Startup delayed 700ms#
    19:25:24.004 -> #Startup delayed 710ms#
    19:25:24.004 -> #Startup delayed 720ms#
    19:25:24.004 -> #Startup delayed 730ms#
    19:25:24.038 -> #Startup delayed 740ms#
    19:25:24.038 ->
    19:25:24.038 -> starting....
    19:25:24.038 -> Info:MAIN:Main_Init_Delay done
    19:25:24.038 ->
    19:25:24.038 -> Main_Init_Delay done
    19:25:24.038 -> Info:MAIN:Main_Init_After_Delay
    19:25:24.038 -> Info:MAIN:Using SSID [*****]
    19:25:24.038 -> Info:MAIN:Using Pass [*****]
    19:25:24.038 -> Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/set
    19:25:24.071 -> Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    19:25:24.071 -> Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obkB9F79399-TH08/ subT cmnd/obkB9F79399-TH08/+
    19:25:24.071 -> Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    19:25:24.071 -> Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/get
    19:25:24.071 -> Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    19:25:24.105 -> Info:MAIN:Main_Init_After_Delay done
    19:25:24.105 -> Info:MAIN:Started TuyaMCU.
    19:25:24.105 -> Info:MAIN:Started tmSensor.
    19:25:24.105 -> Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    19:25:24.105 -> Info:MAIN:Started NTP.
    19:25:24.105 -> Info:NTP:NTP offset set
    19:25:24.105 -> Info:GEN:Channel 1 type changed to temperature_div10
    19:25:24.105 -> Info:GEN:Channel 2 type changed to Humidity
    19:25:24.105 -> Info:GEN:Channel 3 type changed to ReadOnly
    19:25:24.753 -> temperature_type=2
    19:25:24.753 -> temp_code:22 - adc_code:357 - adc_trend:[13]:350->[12]:360
    19:25:25.096 -> Info:MAIN:Time 1, idle 264002/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:25.166 -> Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    19:25:25.166 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    19:25:25.200 -> Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    19:25:26.091 -> Info:MAIN:Time 2, idle 187695/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:27.081 -> Info:MAIN:Time 3, idle 190559/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:28.070 -> Info:MAIN:Time 4, idle 189383/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:29.096 -> supplicant_main_exiting
    19:25:29.096 -> supplicant_exit_done
    19:25:29.096 -> [sa_sta]MM_RESET_REQ
    19:25:29.096 -> [bk]tx_txdesc_flush
    19:25:29.096 -> [sa_sta]ME_CONFIG_REQ
    19:25:29.096 -> [sa_sta]ME_CHAN_CONFIG_REQ
    19:25:29.096 -> [sa_sta]MM_START_REQ
    19:25:29.096 -> hapd_intf_add_vif,type:2, s:0, id:0
    19:25:29.096 -> wpa_dInit
    19:25:29.096 -> wpa_supplicant_req_scan
    19:25:29.096 -> Setting scan[retry16] request: 0.100000 sec
    19:25:29.130 -> MANUAL_SCAN_REQ
    19:25:29.130 -> enter low level!
    19:25:29.130 -> mac 50:8b:b9:f7:93:99
    19:25:29.130 -> leave low level!
    19:25:29.130 -> net_wlan_add_netif done!, vif_idx:0
    19:25:29.130 -> Info:MAIN:Time 5, idle 190487/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:29.130 -> Info:MAIN:ssid:***** key:*****
    19:25:29.197 -> wpa_supplicant_scan
    19:25:29.197 -> wpa_drv_scan
    19:25:29.197 -> wpa_send_scan_req
    19:25:29.197 -> ht in scan
    19:25:29.197 -> scan_start_req_handler
    19:25:30.121 -> Info:MAIN:Time 6, idle 372649/s, free 72768, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:30.121 -> Info:MAIN:Boot complete time reached (5 seconds)
    19:25:30.121 -> Info:CFG:####### Set Boot Complete #######
    19:25:31.071 -> Info:MAIN:Time 7, idle 181072/s, free 72672, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:31.548 -> wpa_driver_scan_cb
    19:25:31.548 -> wpa_get_scan_rst:1
    19:25:31.548 -> cipher2security 2 2 16 16
    19:25:32.092 -> Info:MAIN:Time 8, idle 82128/s, free 72848, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:33.078 -> Info:MAIN:Time 9, idle 0/s, free 72848, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:34.100 -> Info:MAIN:Time 10, idle 0/s, free 72848, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:25:34.100 -> Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=50:8b:b9:f7:93:99
    19:25:34.100 -> Info:GEN:sta: 0, softap: 0, b/g/n
    19:25:34.510 -> wpa_supplicant_connect
    19:25:34.510 -> Cancelling scan request
    19:25:34.510 -> wpa_driver_associate
    19:25:34.510 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    19:25:34.510 -> ssid:*****, 1
    19:25:34.510 -> found scan rst rssi -66 < -50
    19:25:34.510 -> dis ht_support
    19:25:34.543 -> no ht in scan
    19:25:34.543 -> scan_start_req_handler
    19:25:34.543 -> aready open
    19:25:34.543 -> aready open
    19:25:34.714 -> me_set_ps_disable:840 0 0 1 0 3
    19:25:34.714 -> sm_auth_send:1
    19:25:34.714 -> sm_auth_handler
    19:25:34.714 -> ht NOT in assoc req
    19:25:34.714 -> sm_assoc_rsp_handler
    19:25:34.714 -> rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=0 max_bw=0
    19:25:34.714 -> rc_init: nss_max=0 mcs_max=255 r_idx_min=0 r_idx_max=11 no_samples=10
    19:25:34.714 -> ---------SM_CONNECT_IND_ok
    19:25:34.714 -> wpa_driver_assoc_cb
    19:25:34.714 -> Cancelling scan request
    19:25:34.748 -> __l2_packet_send: ret 0
    19:25:34.748 -> __l2_packet_send: ret 0
    19:25:34.748 -> hapd_intf_add_key CCMP
    19:25:34.748 -> add sta_mgmt_get_sta
    19:25:34.748 -> sta:0, vif:0, key:0
    19:25:34.748 -> sta_mgmt_add_key
    19:25:34.748 -> add hw key idx:24
    19:25:34.748 -> hapd_intf_add_key CCMP
    19:25:34.748 -> add is_broadcast_ether_addr
    19:25:34.748 -> sta:255, vif:0, key:1
    19:25:34.748 -> add hw key idx:1
    19:25:34.748 -> ctrl_port_hdl:1
    19:25:34.748 -> me_set_ps_disable:840 0 0 0 0 3
    19:25:34.748 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    19:25:34.782 -> sta_ip_start
    19:25:34.782 ->
    19:25:34.782 -> configuring interface mlan (with DHCP client)WARN: TCPIP mutex is NOT locked (1) caller 53D07
    19:25:34.782 ->
    WARN: TCPIP mutex is NOT locked (1) caller 53D07
    19:25:34.782 -> 19:25:34.782 -> new ie: 0 : 4f 4e 4f 5f 4d 41 43
    19:25:34.782 -> new ie: 1 : 82 84 8b 96 24 30 48 6c
    19:25:34.782 -> new ie: 3 : 6
    19:25:34.782 -> new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0
    19:25:34.782 -> new ie: 2d : ac 8 1f ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    19:25:34.816 ->
    19:25:35.088 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:25:35.088 -> Info:MAIN:Time 11, idle 91317/s, free 73128, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:35.121 -> Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
    19:25:35.121 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    19:25:35.121 -> Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    19:25:35.532 -> temp_code:24 - adc_code:352 - adc_trend:[12]:360->[13]:350
    19:25:35.974 -> ip_addr: 7f01a8c0
    19:25:36.008 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    19:25:36.077 -> Info:MAIN:Time 12, idle 187643/s, free 72976, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:25:37.100 -> Info:MQTT:mqtt_userName *****
    19:25:37.100 -> mqtt_pass *****
    19:25:37.100 -> mqtt_clientID obkB9F79399-TH08
    19:25:37.100 -> mqtt_host 192.168.1.45:1883
    19:25:37.100 -> Info:NTP:Seconds since Jan 1 1900 = 3919515933
    19:25:37.100 -> Info:NTP:Unix time : 1710530733
    19:25:37.100 -> Info:NTP:Local Time : 2024/03/15 19:25:33
    19:25:37.134 -> Info:MAIN:Time 13, idle 186878/s, free 73072, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:38.091 -> Info:MQTT:mqtt_connection_cb: Successfully connected
    19:25:38.091 -> Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/set
    19:25:38.091 -> Info:MQTT:mqtt_subscribed to bekens_n/+/set
    19:25:38.091 -> Info:MQTT:mqtt_subscribed to cmnd/obkB9F79399-TH08/+
    19:25:38.091 -> Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    19:25:38.091 -> Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/get
    19:25:38.091 -> Info:MQTT:Publishing val obkB9F79399 to obkB9F79399-TH08/host retain=0
    19:25:38.126 -> Info:MAIN:Time 14, idle 181670/s, free 73072, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:38.160 -> Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
    19:25:38.160 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    19:25:38.160 -> Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    19:25:38.296 -> Info:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    19:25:38.329 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    19:25:38.364 -> Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    19:25:38.364 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    19:25:38.364 -> Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    19:25:38.399 -> Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    19:25:38.399 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    19:25:38.433 -> Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    19:25:38.433 -> Info:TuyaMCU:MCU time to set: 1710530734
    19:25:38.433 -> Info:TuyaMCU:ptime ->gmtime => tm_hour: 19
    19:25:38.433 -> Info:TuyaMCU:ptime ->gmtime => tm_min: 25
    19:25:38.468 -> Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    19:25:38.502 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    19:25:38.502 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    19:25:38.502 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    19:25:38.502 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    19:25:38.536 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    19:25:38.536 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    19:25:38.536 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    19:25:39.082 -> Info:MQTT:Publishing val OpenBK7231N 1.17.501 Mar 9 2024 23:14:03 to obkB9F79399-TH08/build retain=0
    19:25:39.082 -> Info:MAIN:Time 15, idle 170376/s, free 72800, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:39.149 -> Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 00 ED 02 02 00 04 00 00 00 32 03 04 00 01 02 51
    19:25:39.183 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    19:25:39.183 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    19:25:39.183 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 237
    19:25:39.183 -> Info:GEN:CHANNEL_Set channel 1 has changed to 237 (flags 0)
    19:25:39.183 ->
    19:25:39.183 -> Info:MQTT:Channel has changed! Publishing 237 to channel 1
    19:25:39.218 -> Info:MQTT:Publishing val 237 to obkB9F79399-TH08/1/get retain=0
    19:25:39.218 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    19:25:39.218 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 50
    19:25:39.218 -> Info:GEN:CHANNEL_Set channel 2 has changed to 50 (flags 0)
    19:25:39.218 ->
    19:25:39.218 -> Info:MQTT:Channel has changed! Publishing 50 to channel 2
    19:25:39.218 -> Info:MQTT:Publishing val 50 to obkB9F79399-TH08/2/get retain=0
    19:25:39.252 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    19:25:39.252 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    19:25:39.252 -> Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)
    19:25:39.252 ->
    19:25:39.252 -> Info:MQTT:Channel has changed! Publishing 2 to channel 3
    19:25:39.252 -> Info:MQTT:Publishing val 2 to obkB9F79399-TH08/3/get retain=0
    19:25:39.321 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/1/get
    19:25:39.356 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/2/get
    19:25:39.356 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/3/get
    19:25:40.074 -> Info:MQTT:Publishing val 50:8b:b9:f7:93:99 to obkB9F79399-TH08/mac retain=0
    19:25:40.074 -> Info:MAIN:Time 16, idle 167517/s, free 72824, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:41.094 -> Info:MQTT:Publishing val ***** to obkB9F79399-TH08/ssid retain=0
    19:25:41.094 -> Info:MAIN:Time 17, idle 188207/s, free 73072, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:25:42.082 -> Info:MQTT:Publishing val 1710530737 to obkB9F79399-TH08/datetime retain=0
    19:25:42.082 -> Info:MAIN:Time 18, idle 188701/s, free 73072, MQTT 1(1), bWif0


    As you can see, in my case TuyaMCU takes 18 seconds to disconnect the 3V from the CBU module.

    Added after 12 [minutes]:

    However, when the MQTT connection fails, it keeps trying and keeps the CBU module powered on longer as you can see in the Log below. Perhaps you could take advantage of this circumstance to send the SendGet command, since you are not going to use HTTP instead of MQTT. No doubt @p.kaczmarek2 will have a better opinion on this topic.

    Spoiler:
    19:00:46.651 -> V:BK7231N_1.0.119:00:46.651 -> REG:cpsr spsr r13 r1419:00:46.651 -> SVC:000000D3 00401C1C 000033AC19:00:46.651 -> IRQ:000000d2 00000010 00401e0c c87210b6 19:00:46.684 -> FIR:000000d1 00000010 00401ffc 02189d11 19:00:46.684 -> SYS:000000df 0040192c 00000158 19:00:46.684 -> ST:0000000019:00:46.684 -> J 0x1000019:00:46.684 -> bk_misc_init_start_type 0 0
    19:00:46.684 -> prvHeapInit-start addr:0x414530, size:113360
    19:00:46.684 -> [Flash]id:0xeb6015
    19:00:46.684 -> sctrl_sta_ps_init
    19:00:46.684 -> cset:0 0 0 0
    19:00:46.684 -> Entering initLog()...
    19:00:46.684 -> Commands registered!
    19:00:46.684 -> initLog() done!
    19:00:46.718 -> Info:MAIN:Main_Init_Before_Delay
    19:00:46.718 -> Info:CFG:####### Boot Count 114 #######
    19:00:46.751 -> Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 17 changes count.
    19:00:46.751 -> Error:CMD:no file early.bat err -2
    19:00:46.751 -> Info:GEN:PIN_SetupPins pins have been set up.
    19:00:46.751 -> Info:MAIN:Main_Init_Before_Delay done
    19:00:46.786 ->
    19:00:46.786 -> Main_Init_Before_Delay done
    19:00:46.786 -> Info:MAIN:Main_Init_Delay
    19:00:46.786 ->
    19:00:46.786 -> Main_Init_Delay
    19:00:46.786 ->
    19:00:46.786 -> delaying start
    19:00:46.786 -> bandgap_calm_in_efuse=0x38
    19:00:46.786 -> [load]bandgap_calm=0x38->0x18,vddig=4->5
    19:00:46.786 -> [FUNC]rwnxl_init
    19:00:46.786 -> [bk]tx_txdesc_fl#Startup delayed 0ms#
    19:00:46.786 -> u0ms#
    19:00:46.786 -> [FUNC]intc_init
    19:00:46.786 -> [FUNC]calibration_main
    19:00:46.786 -> gpio_level=1,txpwr_state=0
    19:00:46.786 -> user define rfcali mode:1
    19:00:46.786 -> get rfcali_m#Startup delayed 10ms#
    19:00:46.786 -> oyed 10ms#
    19:00:46.786 -> #Startup delayed 20ms#
    19:00:46.820 -> #Startup delayed 30ms#
    19:00:46.820 -> #Startup delayed 40ms#
    19:00:46.820 -> #Startup delayed 50ms#
    19:00:46.853 -> #Startup delayed 60ms#
    19:00:46.853 -> #Startup delayed 70ms#
    19:00:46.853 -> #Startup delayed 80ms#
    19:00:46.853 -> #Startup delayed 90ms#
    19:00:46.888 -> #Startup delayed 100ms#
    19:00:46.888 -> #Startup delayed 110ms#
    19:00:46.888 -> #Startup delayed 120ms#
    19:00:46.922 -> #Startup delayed 130ms#
    19:00:46.922 -> #Startup delayed 140ms#
    19:00:46.922 -> #Startup delayed 150ms#
    19:00:46.922 -> #Startup delayed 160ms#
    19:00:46.956 -> #Startup delayed 170ms#
    19:00:46.956 -> #Startup delayed 180ms#
    19:00:46.956 -> #Startup delayed 190ms#
    19:00:46.991 -> #Startup delayed 200ms#
    19:00:46.991 -> #Startup delayed 210ms#
    19:00:46.991 -> #Startup delayed 220ms#
    19:00:47.024 -> #Startup delayed 230ms#
    19:00:47.024 -> #Startup delayed 240ms#
    19:00:47.024 -> #Startup delayed 250ms#
    19:00:47.024 -> #Startup delayed 260ms#
    19:00:47.057 -> #Startup delayed 270ms#
    19:00:47.057 -> #Startup delayed 280ms#
    19:00:47.057 -> #Startup delayed 290ms#
    19:00:47.092 -> #Startup delayed 300ms#
    19:00:47.092 -> #Startup delayed 310ms#
    19:00:47.092 -> #Startup delayed 320ms#
    19:00:47.092 -> #Startup delayed 330ms#
    19:00:47.125 -> #Startup delayed 340ms#
    19:00:47.125 -> #Startup delayed 350ms#
    19:00:47.125 -> #Startup delayed 360ms#
    19:00:47.160 -> #Startup delayed 370ms#
    19:00:47.160 -> #Startup delayed 380ms#
    19:00:47.160 -> #Startup delayed 390ms#
    19:00:47.194 -> #Startup delayed 400ms#
    19:00:47.194 -> #Startup delayed 410ms#
    19:00:47.194 -> #Startup delayed 420ms#
    19:00:47.194 -> #Startup delayed 430ms#
    19:00:47.229 -> #Startup delayed 440ms#
    19:00:47.229 -> calibration_main over
    19:00:47.229 -> NO TXPWR_TAB_TAB found in flash
    19:00:47.229 -> Load default txpwr for b:0xb3fe4
    19:00:47.229 -> Load default txpwr for g:0xb3ff2
    19:00:47.229 -> fit n20 table with dist:4
    19:00:47.229 -> Load default txpwr for n40:0xb#Startup delayed 450ms#
    19:00:47.229 -> 4000
    19:00:47.229 -> Load default txpwr for ble:0xb4e79
    19:00:47.264 -> temp in flash is:350
    19:00:47.264 -> xtal in flash is:12
    19:00:47.264 -> xtal_cali:12
    19:00:47.264 -> --init_xtal = 1#Startup delayed 460ms#
    19:00:47.264 -> 2 460ms#
    19:00:47.264 -> [FUNC]ps_init
    19:00:47.264 -> [FUNC]func_init_extended OVER!!!
    19:00:47.264 ->
    19:00:47.264 -> start_type:0
    19:00:47.264 -> Version:
    19:00:47.264 -> Initializing TCP/IP stack
    19:00:47.264 -> #Startup delayed 470ms#
    19:00:47.264 -> app_init finished
    19:00:47.264 -> #Startup delayed 480ms#
    19:00:47.264 -> #Startup delayed 490ms#
    19:00:47.299 -> #Startup delayed 500ms#
    19:00:47.299 -> #Startup delayed 510ms#
    19:00:47.299 -> #Startup delayed 520ms#
    19:00:47.299 -> #Startup delayed 530ms#
    19:00:47.334 -> #Startup delayed 540ms#
    19:00:47.334 -> #Startup delayed 550ms#
    19:00:47.334 -> #Startup delayed 560ms#
    19:00:47.368 -> #Startup delayed 570ms#
    19:00:47.368 -> #Startup delayed 580ms#
    19:00:47.368 -> #Startup delayed 590ms#
    19:00:47.368 -> #Startup delayed 600ms#
    19:00:47.401 -> #Startup delayed 610ms#
    19:00:47.401 -> #Startup delayed 620ms#
    19:00:47.401 -> #Startup delayed 630ms#
    19:00:47.436 -> #Startup delayed 640ms#
    19:00:47.436 -> #Startup delayed 650ms#
    19:00:47.436 -> #Startup delayed 660ms#
    19:00:47.470 -> #Startup delayed 670ms#
    19:00:47.470 -> #Startup delayed 680ms#
    19:00:47.470 -> #Startup delayed 690ms#
    19:00:47.470 -> #Startup delayed 700ms#
    19:00:47.506 -> #Startup delayed 710ms#
    19:00:47.506 -> #Startup delayed 720ms#
    19:00:47.506 -> #Startup delayed 730ms#
    19:00:47.539 -> #Startup delayed 740ms#
    19:00:47.539 ->
    19:00:47.539 -> starting....
    19:00:47.539 -> Info:MAIN:Main_Init_Delay done
    19:00:47.539 ->
    19:00:47.539 -> Main_Init_Delay done
    19:00:47.539 -> Info:MAIN:Main_Init_After_Delay
    19:00:47.539 -> Info:MAIN:Using SSID [*******]
    19:00:47.539 -> Info:MAIN:Using Pass [*******]
    19:00:47.539 -> Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/set
    19:00:47.539 -> Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    19:00:47.575 -> Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obkB9F79399-TH08/ subT cmnd/obkB9F79399-TH08/+
    19:00:47.575 -> Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    19:00:47.575 -> Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/get
    19:00:47.575 -> Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    19:00:47.575 -> Info:MAIN:Main_Init_After_Delay done
    19:00:47.575 -> Info:MAIN:Started TuyaMCU.
    19:00:47.609 -> Info:MAIN:Started tmSensor.
    19:00:47.609 -> Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    19:00:47.609 -> Info:MAIN:Started NTP.
    19:00:47.609 -> Info:NTP:NTP offset set
    19:00:47.609 -> Info:GEN:Channel 1 type changed to temperature_div10
    19:00:47.609 -> Info:GEN:Channel 2 type changed to Humidity
    19:00:47.609 -> Info:GEN:Channel 3 type changed to ReadOnly
    19:00:48.598 -> Info:MAIN:Time 1, idle 264906/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:48.700 -> Info:TuyaMCU:Received: 55 AA 00 01 00 24 7B 22 70 22 3A 22 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    19:00:48.700 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    19:00:48.700 -> Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    19:00:49.625 -> Info:MAIN:Time 2, idle 187352/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:50.616 -> Info:MAIN:Time 3, idle 191610/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:51.607 -> Info:MAIN:Time 4, idle 190526/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:52.600 -> supplicant_main_exiting
    19:00:52.600 -> supplicant_exit_done
    19:00:52.634 -> [sa_sta]MM_RESET_REQ
    19:00:52.634 -> [bk]tx_txdesc_flush
    19:00:52.634 -> [sa_sta]ME_CONFIG_REQ
    19:00:52.634 -> [sa_sta]ME_CHAN_CONFIG_REQ
    19:00:52.634 -> [sa_sta]MM_START_REQ
    19:00:52.634 -> hapd_intf_add_vif,type:2, s:0, id:0
    19:00:52.634 -> wpa_dInit
    19:00:52.634 -> wpa_supplicant_req_scan
    19:00:52.634 -> Setting scan[retry16] request: 0.100000 sec
    19:00:52.634 -> MANUAL_SCAN_REQ
    19:00:52.634 -> enter low level!
    19:00:52.634 -> mac 50:8b:b9:f7:93:99
    19:00:52.634 -> leave low level!
    19:00:52.634 -> net_wlan_add_netif done!, vif_idx:0
    19:00:52.634 -> Info:MAIN:Time 5, idle 190281/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:52.667 -> Info:MAIN:ssid:***** key:******
    19:00:52.737 -> wpa_supplicant_scan
    19:00:52.737 -> wpa_drv_scan
    19:00:52.737 -> wpa_send_scan_req
    19:00:52.737 -> ht in scan
    19:00:52.737 -> scan_start_req_handler
    19:00:53.626 -> Info:MAIN:Time 6, idle 190653/s, free 72768, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:53.626 -> Info:MAIN:Boot complete time reached (5 seconds)
    19:00:53.660 -> Info:CFG:####### Set Boot Complete #######
    19:00:54.618 -> Info:MAIN:Time 7, idle 181596/s, free 72768, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:55.066 -> wpa_driver_scan_cb
    19:00:55.066 -> wpa_get_scan_rst:1
    19:00:55.066 -> cipher2security 2 2 16 16
    19:00:55.626 -> Info:MAIN:Time 8, idle 84303/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:56.615 -> Info:MAIN:Time 9, idle 0/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:57.606 -> Info:MAIN:Time 10, idle 0/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:57.606 -> Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=50:8b:b9:f7:93:99
    19:00:57.641 -> Info:GEN:sta: 0, softap: 0, b/g/n
    19:00:58.051 -> wpa_supplicant_connect
    19:00:58.051 -> Cancelling scan request
    19:00:58.051 -> wpa_driver_associate
    19:00:58.051 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    19:00:58.051 -> ssid:*****, 1
    19:00:58.051 -> found scan rst rssi -69 < -50
    19:00:58.051 -> dis ht_support
    19:00:58.051 -> no ht in scan
    19:00:58.051 -> scan_start_req_handler
    19:00:58.051 -> aready open
    19:00:58.051 -> aready open
    19:00:58.222 -> me_set_ps_disable:840 0 0 1 0 3
    19:00:58.222 -> sm_auth_send:1
    19:00:58.327 -> sm_auth_handler
    19:00:58.362 -> ht NOT in assoc req
    19:00:58.601 -> Info:MAIN:Time 11, idle 188481/s, free 71592, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    19:00:58.636 -> sm_assoc_rsp_handler
    19:00:58.636 -> rc_init: station_id=0 format_mod=0 pre_type=0 short_gi=0 max_bw=0
    19:00:58.636 -> rc_init: nss_max=0 mcs_max=255 r_idx_min=0 r_idx_max=11 no_samples=10
    19:00:58.636 -> ---------SM_CONNECT_IND_ok
    19:00:58.636 -> wpa_driver_assoc_cb
    19:00:58.669 -> Cancelling scan request
    19:00:58.770 -> __l2_packet_send: ret 0
    19:00:58.805 -> __l2_packet_send: ret 0
    19:00:58.805 -> hapd_intf_add_key CCMP
    19:00:58.805 -> add sta_mgmt_get_sta
    19:00:58.805 -> sta:0, vif:0, key:0
    19:00:58.805 -> sta_mgmt_add_key
    19:00:58.805 -> add hw key idx:24
    19:00:58.805 -> hapd_intf_add_key CCMP
    19:00:58.805 -> add is_broadcast_ether_addr
    19:00:58.805 -> sta:255, vif:0, key:1
    19:00:58.839 -> add hw key idx:1
    19:00:58.839 -> ctrl_port_hdl:1
    19:00:58.839 -> me_set_ps_disable:840 0 0 0 0 3
    19:00:58.839 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    19:00:58.839 -> sta_ip_start
    19:00:58.839 ->
    19:00:58.839 -> configuring interface mlan (with DHCP client)WARN: TCPIP mutex is NOT locked (1) caller 53D07
    19:00:58.839 ->
    WARN: TCPIP mutex is NOT locked (1) caller 53D07
    19:00:58.839 ->
    temperature_type=2
    19:00:59.045 -> temp_code:30 - adc_code:339 - adc_trend:[13]:350->[14]:340
    19:00:59.045 -> gen:400000
    19:00:59.045 -> phy_error count=0
    19:00:59.422 ->
    19:00:59.422 -> new ie: 0 : 4f 4e 4f 5f 4d 41 43
    19:00:59.422 -> new ie: 1 : 82 84 8b 96 24 30 48 6c
    19:00:59.422 -> new ie: 3 : 6
    19:00:59.422 -> new ie: 30 : 1 0 0 f ac 4 1 0 0 f ac 4 1 0 0 f ac 2 c 0
    19:00:59.422 -> new ie: 2d : ac 8 1f ff ff 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
    19:00:59.422 ->
    19:00:59.627 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:00:59.627 -> Info:MAIN:Time 12, idle 177634/s, free 72720, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:00:59.661 -> Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
    19:00:59.661 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    19:00:59.661 -> Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    19:01:00.619 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:00.619 -> Info:MAIN:Time 13, idle 189087/s, free 73264, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:01.606 -> Info:MQTT:mqtt_userName *****
    19:01:01.606 -> mqtt_pass *****
    19:01:01.640 -> mqtt_clientID obkB9F79399-TH08
    19:01:01.640 -> mqtt_host 192.168.1.45:1883
    19:01:01.640 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:01.640 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:01.640 -> Info:MAIN:Time 14, idle 189161/s, free 72760, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:02.597 -> Info:MQTT:mqtt_userName *****
    19:01:02.597 -> mqtt_pass *****
    19:01:02.631 -> mqtt_clientID obkB9F79399-TH08
    19:01:02.631 -> mqtt_host 192.168.1.45:1883
    19:01:02.631 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:02.631 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:02.631 -> Info:MAIN:Time 15, idle 182844/s, free 73264, MQTT 0(2), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:03.038 -> temp_code:26 - adc_code:348 - adc_trend:[14]:340->[13]:350
    19:01:03.620 -> Info:MQTT:mqtt_userName *****
    19:01:03.620 -> mqtt_pass *****
    19:01:03.620 -> mqtt_clientID obkB9F79399-TH08
    19:01:03.620 -> mqtt_host 192.168.1.45:1883
    19:01:03.620 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:03.620 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:03.620 -> Info:MAIN:Time 16, idle 184092/s, free 73264, MQTT 0(3), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:04.612 -> Info:MQTT:mqtt_userName *****
    19:01:04.612 -> mqtt_pass *****
    19:01:04.612 -> mqtt_clientID obkB9F79399-TH08
    19:01:04.612 -> mqtt_host 192.168.1.45:1883
    19:01:04.612 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:04.612 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:04.646 -> Info:MAIN:Time 17, idle 183809/s, free 73264, MQTT 0(4), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:05.055 -> temp_code:30 - adc_code:339 - adc_trend:[13]:350->[14]:340
    19:01:05.603 -> Info:MQTT:mqtt_userName *****
    19:01:05.603 -> mqtt_pass *****
    19:01:05.603 -> mqtt_clientID obkB9F79399-TH08
    19:01:05.603 -> mqtt_host 192.168.1.45:1883
    19:01:05.603 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:05.638 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:05.638 -> Info:MAIN:Time 18, idle 185084/s, free 72760, MQTT 0(5), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:06.596 -> Info:MQTT:mqtt_userName *****
    19:01:06.596 -> mqtt_pass *****
    19:01:06.631 -> mqtt_clientID obkB9F79399-TH08
    19:01:06.631 -> mqtt_host 192.168.1.45:1883
    19:01:06.631 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:06.631 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:06.631 -> Info:MAIN:Time 19, idle 183818/s, free 73264, MQTT 0(6), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:07.037 -> temp_code:26 - adc_code:347 - adc_trend:[14]:340->[13]:350
    19:01:07.614 -> Info:MQTT:mqtt_userName *****
    19:01:07.614 -> mqtt_pass *****
    19:01:07.614 -> mqtt_clientID obkB9F79399-TH08
    19:01:07.614 -> mqtt_host 192.168.1.45:1883
    19:01:07.614 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:07.614 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:07.649 -> Info:MAIN:Time 20, idle 184070/s, free 73264, MQTT 0(7), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:07.649 -> Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=50:8b:b9:f7:93:99
    19:01:07.649 -> Info:GEN:sta: 1, softap: 0, b/g/n
    19:01:07.649 -> Info:GEN:sta:rssi=-68,ssid=*****,bssid=4c:1b:86:3a:89:e6,channel=6,cipher_type:CCMP
    19:01:08.610 -> Info:MQTT:mqtt_userName *****
    19:01:08.610 -> mqtt_pass *****
    19:01:08.610 -> mqtt_clientID obkB9F79399-TH08
    19:01:08.610 -> mqtt_host 192.168.1.45:1883
    19:01:08.610 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:08.644 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:08.644 -> Info:MAIN:Time 21, idle 180373/s, free 73264, MQTT 0(8), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:09.603 -> Info:MQTT:mqtt_userName *****
    19:01:09.603 -> mqtt_pass *****
    19:01:09.603 -> mqtt_clientID obkB9F79399-TH08
    19:01:09.603 -> mqtt_host 192.168.1.45:1883
    19:01:09.636 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:09.636 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:09.636 -> Info:MAIN:Time 22, idle 183981/s, free 73264, MQTT 0(9), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:10.596 -> Info:MQTT:mqtt_userName *****
    19:01:10.596 -> mqtt_pass *****
    19:01:10.630 -> mqtt_clientID obkB9F79399-TH08
    19:01:10.630 -> mqtt_host 192.168.1.45:1883
    19:01:10.630 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:10.630 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:10.630 -> Info:MAIN:Time 23, idle 183784/s, free 73264, MQTT 0(10), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:11.621 -> Info:MQTT:mqtt_userName *****
    19:01:11.621 -> mqtt_pass *****
    19:01:11.621 -> mqtt_clientID obkB9F79399-TH08
    19:01:11.621 -> mqtt_host 192.168.1.45:1883
    19:01:11.621 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:11.621 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:11.621 -> Info:MAIN:Time 24, idle 185572/s, free 73264, MQTT 0(11), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:12.609 -> Info:MQTT:mqtt_userName *****
    19:01:12.609 -> mqtt_pass *****
    19:01:12.609 -> mqtt_clientID obkB9F79399-TH08
    19:01:12.609 -> mqtt_host 192.168.1.45:1883
    19:01:12.609 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:12.643 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:12.643 -> Info:MAIN:Time 25, idle 184051/s, free 73264, MQTT 0(12), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:13.051 -> temp_code:31 - adc_code:337 - adc_trend:[13]:350->[14]:340
    19:01:13.599 -> Info:MQTT:mqtt_userName *****
    19:01:13.599 -> mqtt_pass *****
    19:01:13.633 -> mqtt_clientID obkB9F79399-TH08
    19:01:13.633 -> mqtt_host 192.168.1.45:1883
    19:01:13.633 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:13.633 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:13.633 -> Info:MAIN:Time 26, idle 184927/s, free 72760, MQTT 0(13), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:14.623 -> Info:MQTT:mqtt_userName *****
    19:01:14.623 -> mqtt_pass *****
    19:01:14.623 -> mqtt_clientID obkB9F79399-TH08
    19:01:14.623 -> mqtt_host 192.168.1.45:1883
    19:01:14.623 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:14.623 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:14.623 -> Info:MAIN:Time 27, idle 184758/s, free 73264, MQTT 0(14), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:15.612 -> Info:MQTT:mqtt_userName *****
    19:01:15.612 -> mqtt_pass *****
    19:01:15.612 -> mqtt_clientID obkB9F79399-TH08
    19:01:15.612 -> mqtt_host 192.168.1.45:1883
    19:01:15.612 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:15.612 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:15.645 -> Info:MAIN:Time 28, idle 184561/s, free 73264, MQTT 0(15), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:16.058 -> temp_code:26 - adc_code:347 - adc_trend:[14]:340->[13]:350
    19:01:16.597 -> Info:MQTT:mqtt_userName *****
    19:01:16.597 -> mqtt_pass *****
    19:01:16.632 -> mqtt_clientID obkB9F79399-TH08
    19:01:16.632 -> mqtt_host 192.168.1.45:1883
    19:01:16.632 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:16.632 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:16.632 -> Info:MAIN:Time 29, idle 184082/s, free 73264, MQTT 0(16), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:17.618 -> Info:MQTT:mqtt_userName *****
    19:01:17.618 -> mqtt_pass *****
    19:01:17.618 -> mqtt_clientID obkB9F79399-TH08
    19:01:17.618 -> mqtt_host 192.168.1.45:1883
    19:01:17.618 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:17.618 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:17.618 -> Info:MAIN:Time 30, idle 185702/s, free 73264, MQTT 0(17), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:17.652 -> Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=50:8b:b9:f7:93:99
    19:01:17.652 -> Info:GEN:sta: 1, softap: 0, b/g/n
    19:01:17.652 -> Info:GEN:sta:rssi=-68,ssid=*****,bssid=4c:1b:86:3a:89:e6,channel=6,cipher_type:CCMP
    19:01:18.611 -> Info:MQTT:mqtt_userName *****
    19:01:18.611 -> mqtt_pass *****
    19:01:18.611 -> mqtt_clientID obkB9F79399-TH08
    19:01:18.611 -> mqtt_host 192.168.1.45:1883
    19:01:18.611 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:18.611 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:18.645 -> Info:MAIN:Time 31, idle 179998/s, free 73264, MQTT 0(18), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:19.864 -> Info:MQTT:mqtt_userName *****
    19:01:19.864 -> mqtt_pass *****
    19:01:19.864 -> mqtt_clientID obkB9F79399-TH08
    19:01:19.864 -> mqtt_host 192.168.1.45:1883
    19:01:19.864 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:19.864 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:19.864 -> Info:MAIN:Time 32, idle 184460/s, free 73264, MQTT 0(19), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:20.890 -> Info:MQTT:mqtt_userName *****
    19:01:20.890 -> mqtt_pass *****
    19:01:20.890 -> mqtt_clientID obkB9F79399-TH08
    19:01:20.890 -> mqtt_host 192.168.1.45:1883
    19:01:20.890 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:20.890 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:20.890 -> Info:MAIN:Time 33, idle 198161/s, free 73264, MQTT 0(20), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:21.595 -> Info:MQTT:mqtt_userName *****
    19:01:21.595 -> mqtt_pass *****
    19:01:21.630 -> mqtt_clientID obkB9F79399-TH08
    19:01:21.630 -> mqtt_host 192.168.1.45:1883
    19:01:21.630 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:21.630 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:21.630 -> Info:MAIN:Time 34, idle 196542/s, free 73264, MQTT 0(21), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:22.621 -> Info:MQTT:mqtt_userName *****
    19:01:22.621 -> mqtt_pass *****
    19:01:22.621 -> mqtt_clientID obkB9F79399-TH08
    19:01:22.621 -> mqtt_host 192.168.1.45:1883
    19:01:22.621 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:22.621 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:22.621 -> Info:MAIN:Time 35, idle 184135/s, free 73264, MQTT 0(22), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:23.608 -> Info:MQTT:mqtt_userName *****
    19:01:23.608 -> mqtt_pass *****
    19:01:23.608 -> mqtt_clientID obkB9F79399-TH08
    19:01:23.608 -> mqtt_host 192.168.1.45:1883
    19:01:23.608 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:23.642 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:23.642 -> Info:MAIN:Time 36, idle 186862/s, free 73264, MQTT 0(23), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:24.599 -> Info:MQTT:mqtt_userName *****
    19:01:24.599 -> mqtt_pass *****
    19:01:24.599 -> mqtt_clientID obkB9F79399-TH08
    19:01:24.633 -> mqtt_host 192.168.1.45:1883
    19:01:24.633 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:24.633 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:24.633 -> Info:MAIN:Time 37, idle 184678/s, free 73264, MQTT 0(24), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:25.622 -> Info:MQTT:mqtt_userName *****
    19:01:25.622 -> mqtt_pass *****
    19:01:25.622 -> mqtt_clientID obkB9F79399-TH08
    19:01:25.622 -> mqtt_host 192.168.1.45:1883
    19:01:25.622 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:25.622 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:25.622 -> Info:MAIN:Time 38, idle 183929/s, free 73264, MQTT 0(25), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:26.617 -> Info:MQTT:mqtt_userName *****
    19:01:26.617 -> mqtt_pass *****
    19:01:26.617 -> mqtt_clientID obkB9F79399-TH08
    19:01:26.617 -> mqtt_host 192.168.1.45:1883
    19:01:26.617 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:26.617 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:26.617 -> Info:MAIN:Time 39, idle 182615/s, free 73264, MQTT 0(26), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:27.606 -> Info:MQTT:mqtt_userName *****
    19:01:27.606 -> mqtt_pass *****
    19:01:27.606 -> mqtt_clientID obkB9F79399-TH08
    19:01:27.606 -> mqtt_host 192.168.1.45:1883
    19:01:27.606 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:27.640 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:27.640 -> Info:MAIN:Time 40, idle 184521/s, free 73264, MQTT 0(27), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:27.640 -> Info:GEN:dhcp=0 ip=0.0.0.0 gate=0.0.0.0 mask=0.0.0.0 mac=50:8b:b9:f7:93:99
    19:01:27.640 -> Info:GEN:sta: 1, softap: 0, b/g/n
    19:01:27.640 -> Info:GEN:sta:rssi=-69,ssid=*****,bssid=4c:1b:86:3a:89:e6,channel=6,cipher_type:CCMP
    19:01:28.600 -> Info:MQTT:mqtt_userName *****
    19:01:28.600 -> mqtt_pass *****
    19:01:28.600 -> mqtt_clientID obkB9F79399-TH08
    19:01:28.634 -> mqtt_host 192.168.1.45:1883
    19:01:28.634 -> Info:MQTT:Connect error in mqtt_client_connect - code: -4 (ERR_RTE)
    19:01:28.634 -> Info:NTP:NTP_SendRequest: Unable to send message
    19:01:28.634 -> Info:MAIN:Time 41, idle 365074/s, free 73264, MQTT 0(28), bWifi 1, secondsWithNoPing -1, socks 2/38
    19:01:29.183 -> ip_addr: 7f01a8c0
    19:01:29.183 -> Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    19:01:29.593 -> Info:MQTT:mqtt_userName *****
    19:01:29.628 -> mqtt_pass *****
    19:01:29.628 -> mqtt_clientID obkB9F79399-TH08
    19:01:29.628 -> mqtt_host 192.168.1.45:1883
    19:01:29.628 -> Info:MAIN:Time 42, idle 183264/s, free 72528, MQTT 0(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:30.615 -> Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    19:01:30.615 -> Info:MAIN:Time 43, idle 188792/s, free 72976, MQTT 0(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:31.438 -> Info:MQTT:mqtt_connection_cb: Successfully connected
    19:01:31.438 -> Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/set
    19:01:31.438 -> Info:MQTT:mqtt_subscribed to bekens_n/+/set
    19:01:31.438 -> Info:MQTT:mqtt_subscribed to cmnd/obkB9F79399-TH08/+
    19:01:31.438 -> Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    19:01:31.438 -> Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/get
    19:01:31.610 -> Info:MQTT:Publishing val obkB9F79399 to obkB9F79399-TH08/host retain=0
    19:01:31.610 -> Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    19:01:31.610 -> Info:MAIN:Time 44, idle 188088/s, free 72976, MQTT 1(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:31.645 -> Info:TuyaMCU:Received: 55 AA 00 02 00 00 01
    19:01:31.645 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 2 (MCUconf) len 7
    19:01:31.645 -> Info:TuyaMCU:ProcessIncoming: TUYA_CMD_MCU_CONF, TODO!
    19:01:31.817 -> Info:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    19:01:31.817 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    19:01:31.886 -> Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    19:01:31.886 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    19:01:31.886 -> Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    19:01:31.919 -> Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    19:01:31.919 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    19:01:31.919 -> Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    19:01:31.953 -> Info:TuyaMCU:MCU time to set: 3644
    19:01:31.953 -> Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    19:01:31.953 -> Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    19:01:31.987 -> Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    19:01:32.021 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    19:01:32.021 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    19:01:32.021 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    19:01:32.021 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    19:01:32.021 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    19:01:32.055 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    19:01:32.055 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    19:01:32.601 -> Info:MQTT:Publishing val OpenBK7231N 1.17.501 Mar 9 2024 23:14:03 to obkB9F79399-TH08/build retain=0
    19:01:32.601 -> Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    19:01:32.635 -> Info:MAIN:Time 45, idle 173143/s, free 72704, MQTT 1(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:32.670 -> Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 00 F3 02 02 00 04 00 00 00 31 03 04 00 01 02 56
    19:01:32.670 -> Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    19:01:32.703 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    19:01:32.703 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 243
    19:01:32.703 -> Info:GEN:CHANNEL_Set channel 1 has changed to 243 (flags 0)
    19:01:32.703 ->
    19:01:32.703 -> Info:MQTT:Channel has changed! Publishing 243 to channel 1
    19:01:32.703 -> Info:MQTT:Publishing val 243 to obkB9F79399-TH08/1/get retain=0
    19:01:32.737 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    19:01:32.737 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 49
    19:01:32.737 -> Info:GEN:CHANNEL_Set channel 2 has changed to 49 (flags 0)
    19:01:32.737 ->
    19:01:32.737 -> Info:MQTT:Channel has changed! Publishing 49 to channel 2
    19:01:32.737 -> Info:MQTT:Publishing val 49 to obkB9F79399-TH08/2/get retain=0
    19:01:32.737 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    19:01:32.772 -> Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    19:01:32.772 -> Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)
    19:01:32.772 ->
    19:01:32.772 -> Info:MQTT:Channel has changed! Publishing 2 to channel 3
    19:01:32.772 -> Info:MQTT:Publishing val 2 to obkB9F79399-TH08/3/get retain=0
    19:01:32.842 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/1/get
    19:01:32.876 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/2/get
    19:01:33.114 -> Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/3/get
    19:01:33.596 -> Info:MQTT:Publishing val 50:8b:b9:f7:93:99 to obkB9F79399-TH08/mac retain=0
    19:01:33.596 -> Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    19:01:33.630 -> Info:MAIN:Time 46, idle 164558/s, free 72728, MQTT 1(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:34.623 -> Info:MQTT:Publishing val ***** to obkB9F79399-TH08/ssid retain=0
    19:01:34.623 -> Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    19:01:34.623 -> Info:MAIN:Time 47, idle 189389/s, free 72976, MQTT 1(29), bWifi 1, secondsWithNoPing -1, socks 3/38
    19:01:35.613 -> Info:MQTT:Publishing val 3647 to obkB9F79399-TH08/datetime retain=0
    19:01:35.613 -> Info:NTP:NTP_CheckForReceive: Err??
  • #165 21005976
    bogovik
    Level 5  
    fjcns wrote:
    bogovik, I want to do the same as you, but I'm sending the data out via mqtt to Homeassistant

    A relay will be controlled by Homeassistant to turn the boiler on or off


    Initially I also wanted to use HomeAssistant to control the gas burner. But then I bought a Sonoff TH Elite 16A Temperature and Humidity Monitoring Switch Module (THR316D) relay. The THR316D turned out to be very useful for me and I stopped using HomeAsistant. The THR316D relay and the TH08B temperature sensor will exchange data via WiFi, without using the HomeAssistant server.

    Sonoff THR316D with box.Image showing Sonoff THR316D relay with labeled features.
    This THR316D relay has a connector for connecting a DS18B20 thermal sensor. Several DS18B20s can be connected to this connector at the same time (simply by twisting the corresponding wires together). I connected three DS18B20 temperature sensors (one for the temperature of the water that flows out of the boiler; the second for the temperature of the water that enters the boiler; the third for measuring the temperature outside in order to make weather-dependent automation).

    DS18B20 temperature sensor with cable.
    The THR316D also features dry contact relays that are not connected to any voltage. I use this relay to turn the gas burner on and off. In addition, the Berry programming language is built into the Tasmota firmware. I was interested in learning it and using it to fully control the logic of turning on/off the gas burner, manage settings via the web interface and publish data on the Internet.

    This is the web interface for my relay firmware. The water temperature can be adjusted in different modes.
    Sonoff THR316D relay interface with temperature settings

    spin55, my device has stopped working. I connected RX and TX back to the Tuya MCU and after that the WiFi module stopped responding, the web interface also stopped being accessible. I'll have to flash the device again tomorrow.

    This is my Autoexec.bat
    alias SendHTTPData SendGet http://192.168.31.90/RemoteSensorData?Temperature=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200 
    startDriver tmSensor
    
    startDriver NTP
    ntp_timeZoneOfs +3:00 
    
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    
    setChannelType 3 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 3 enum 3
    setChannelLabel 3 Battery
    
    tuyaMcu_sendQueryState
    
    waitFor WiFiState 4
    delay_s 2
    
    // addRepeatingEvent	[IntervalSeconds][RepeatsOr-1][CommandToRun]
    addRepeatingEvent 4 3 SendHTTPData 


    The first iteration of the SendHTTPData command always fails and no data is sent. The second iteration usually manages to send data. The third iteration almost always fails to complete because the Tuya MCU turns off the power to the WiFi module too quickly. I also tried specifying different time intervals in the addRepeatingEvent command, without much success.

    I haven’t had time to get the log from the RX2 leg yet. I'll try tomorrow.
  • #166 21006048
    fjcns
    Level 5  
    I didn't know about this relay module. looks interesting for my project.
    If you can make your idea work it becomes simpler.

    If it is not possible to make it work as intended, You can also set the relay module to subscribe to the th08 temperature mqtt topic and the module continues to control the entire boiler
  • #167 21006339
    morgan_flint
    Level 14  
    bogovik wrote:
    Lay a wire route directly from the battery compartment to the power legs of the WiFi module

    Don't do that, you'd be feeding the CBU with 5V while it requires 3.3 or less (in both versions it is fed with 2.8V)

    bogovik wrote:
    How else can I increase the time after which the WiFi module will turn off?

    For the first version of TH08, you can see the way the Tuya MCU controls power to the module in the schematic posted at the first post of this thread: There's a MOSFET that connects CBU's GND to main GND, and its gate is controlled from the Tuya MCU (here I explained the possible advantage of cutting GND instead of Vcc). A possible way to extend the period the CBU is on would be to insert a diode between R3 and R23 and a capacitor in parallel with R23, with enough capacity to keep the gate high during the required time before it discharges through R23.

    In your version of TH08, same as spupetic's, the CBU's GND is connected directly to main GND, and the MCU seems to control power by turning on and off the voltage regulator that feeds it. I guessed that from spupetic's photos; I can't check it as I don't have that device, but you can check if there's a connection between the MCU (U3 in your version) and the regulator (seems to be U4, I'm marking them in red in spupetic's photo)
    View of the interior of an electronic device with a PCB and component labels.
    Test point CBU_2.8V is the output of the regulator and should be connected to CBU's Vcc. If you can trace the connection between the MCU and the regulator (either directly or via a resistor), then you could add a series diode- parallel capacitor-resistor in between to extend a bit the time the regulator is on after the MCU tries to shut it down.

    Obviously, a more elegant way of doing this would be to change MCUs firmware, but I'm afraid this is way beyond our possibilities, as we don't even know which MCU it is (and the effort to do so probably wouldn't be worth it).

    EDIT: I've been looking at the photos of the new version, but I can't read the markings in U4 so I couldn't identify it. Probably, the pinout is similar to this one, as the connections of Vin, GND, SW coincide, and Vout (feedback) is connected to the output of the coil with a resistor divider instead of directly, but this is OK to adjust output voltage:
    LTC3406-1.2 step-down converter diagram Top view of a TSOT-23-5 package integrated circuit. If this is true, then pin 1 (RUN) could be the pin that controls the regulator and should be connected to the MCU. Following the traces in the photos is difficult because it goes through several vias, but with a multimeter, it is a matter of seconds to find out. Then, inserting this between MCU and regulator:
    Circuit diagram with diode, capacitor, and resistor between MCU and regulator.
    should give some extra time after the MCU pin goes low (1uF-10Mohm, for example, should give about 5 seconds)

    EDIT 2: Maybe there's a more elegant way to extend the period the CBU is powered on by the MCU. If you read this post, you'll see that, with an older version of OBK, the module was kept on quite longer than with the original firmware (read from "So everything seems to go well, except for one detail" in that post). Read also this post and the end of this one. After those findings, @p.kaczmarek2 implemented a correction form version 302 and, as you can read here, from that version onwards the MCU turned off the CBU just after it received the last packet from the module.

    So, a possibility to have the module on for a longer time would be to undo, at least partially, that correction, introducing a delay before sending the "closing packet", you could compile a modded version of OBK with that as for your specific application as, for general use, it's better that the MCH shuts the CBU down as soon as possible to save battery.
  • #168 21007162
    bogovik
    Level 5  
    @morganflint, Hi!

    Today I flashed the TH08B sensor again. The firmware was successfully installed.

    I tried to use spin55`s idea for the firmware: disconnect only the CEN pin from the MCU (the RX and TX pins remained connected). Unfortunately this didn't work for me. Erasing the chip was successful, but recording failed. I did a few reps. The process always ended in failure.

    After that, I had to disconnect the RX and TX pins from the MCU and the device was successfully flashed. I always have to disconnect the RX and TX pins from the MCU, otherwise the firmware process fails. I don't know why this happens to me.

    I checked the board layout. I drew the electrical connection routes in the following figure.
    Image of a circuit board with marked electrical connections.

    Bat+ (4.2V) -> U8 (2.8V) -> pin 1 MCU (2.8V)
    U8 - step-down voltage converter

    The MCU turns the WiFi module on and off via pin 5 of the MCU. If there is a voltage of +2.8V on this leg, then power is supplied to the WiFi (VCC pin) via U4. If there is no voltage on pin 5 of the MCU, then WiFi turns off. This electrical circuit is marked in orange in the figure.

    I took a detailed photo of the U4.
    Close-up of a circuit board with electronic components.

    I understood your idea with "closing packet". I need to try to implement this.

    There is sad news. My device has stopped communicating with Tuya MCU. There is no record in the log that any packets were received or sent. I don't know the reasons why this happened. I checked, Tuya MCU is working, power is supplied, current consumption is also within 40-50 milliamps, the WiFi module turns on and off. I checked the legs, Rx and Tx MCU are connected to Rx and Tx CBU. However, there is no data exchange with the MCU.

    Spoiler:
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1026 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 7 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:ssid:key:
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_BE1900005/ subT cmnd/BK7231N_BE1900005/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:New alias has been set: SendHTTPData runs SendGet http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 259257/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 186328/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 73487/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (3 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 5, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 6, idle 98857/s, free 72800, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD:addRepeatingEvent: interval 2.000000, repeats 10, command [SendHTTPData]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 7, idle 189521/s, free 72584, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:NTP:Seconds since Jan 1 1900 = 3919615902
    Info:NTP:Unix time : 1710637902
    Info:NTP:Local Time : 2024/03/17 01:11:42
    Info:MAIN:Time 8, idle 187508/s, free 72776, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD: CMD_SendGET received with args http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:HTTP_CLIENT:HTTPClient_Async_SendGet for http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3, sizeof(httprequest_t) == 160!
    Info:HTTP_CLIENT:Parse url http://192.168.31.90/RemoteSensorData?Temperature=0&Humidity=0&BatteryLevel=0
    Info:HTTP_CLIENT:host: '192.168.31.90', port: 80
    Info:HTTP_CLIENT:HAL_TCP_Establish: created socket 2

    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1027 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 7 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:ssid:key:
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_BE1900005/ subT cmnd/BK7231N_BE1900005/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:New alias has been set: SendHTTPData runs SendGet http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 260746/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 190902/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 72834/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (3 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 5, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 6, idle 98833/s, free 72800, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD:addRepeatingEvent: interval 2.000000, repeats 10, command [SendHTTPData]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 7, idle 187772/s, free 72592, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1030 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 7 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:ssid:key:
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_BE1900005/ subT cmnd/BK7231N_BE1900005/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:New alias has been set: SendHTTPData runs SendGet http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 259734/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 185874/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 74126/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (3 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 5, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 6, idle 99451/s, free 72800, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD:addRepeatingEvent: interval 2.000000, repeats 10, command [SendHTTPData]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1032 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 7 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:ssid:key:
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_BE1900005/ subT cmnd/BK7231N_BE1900005/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:New alias has been set: SendHTTPData runs SendGet http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 257820/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 184811/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 255878/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (3 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 5, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 6, idle 99623/s, free 72808, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD:addRepeatingEvent: interval 2.000000, repeats 10, command [SendHTTPData]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1033 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 7 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:ssid:key:
    Info:MAIN:Using SSID []
    Info:MAIN:Using Pass []
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens/ subT bekens/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/BK7231N_BE1900005/ subT cmnd/BK7231N_BE1900005/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens/ subT cmnd/bekens/+
    Info:MQTT:MQTT_RegisterCallback called for bT BK7231N_BE1900005/ subT BK7231N_BE1900005/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:CMD:New alias has been set: SendHTTPData runs SendGet http://192.168.31.90/RemoteSensorData?Tempera...=$CH1&Humidity=$CH2&BatteryLevel=$CH3
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 258784/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 2, idle 192517/s, free 72392, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 73166/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 4, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Boot complete time reached (3 seconds)
    Info:CFG:####### Set Boot Complete #######
    Info:MAIN:Time 5, idle 0/s, free 72544, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTING - 1
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MQTT:mqtt_host empty, not starting mqtt
    Info:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 6, idle 98509/s, free 72800, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:CMD:addRepeatingEvent: interval 2.000000, repeats 10, command [SendHTTPData]
    Info:MAIN:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4


    UPDATE:
    I use "tuyaMcu_setBaudRate 115200" in my Autoexec.bat
    startDriver TuyaMCU
    tuyaMcu_setBaudRate 115200  <== Delete this
    startDriver tmSensor


    As soon as I deleted the command "tuyaMcu_setBaudRate 115200 " from Autoexec.bat, Tuya MCU began communicating with the WiFi module.

    Spoiler:
    Info:MAIN:Time 9, idle 175797/s, free 72776, MQTT 0(1), 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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 1710644421
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 3
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
  • #169 21007459
    morgan_flint
    Level 14  
    Thanks for the photos and the details. I haven't been able to find anything by searching "A01G3" or "AO1G3", but in this page I followed the link to the SOT-25 devices and found this datasheet that may well correspond to U4. The pinout is also the same as the previous device, so the conclusions are the same.

    bogovik wrote:
    As soon as I deleted the command "tuyaMcu_setBaudRate 115200 " from Autoexec.bat, Tuya MCU began communicating with the WiFi module.

    This is completely normal; the FW in the TuyaMCU is programmed for the default 9600 baud rate, so if you force a different one in CBU there will be no communications
  • #170 21007827
    spin55
    Level 17  
    Hi @bogovik,

    I assumed that the TH08 and TH08B models only differed in the way data was presented on the LCD screen and that the motherboards were the same. Well, they are not the same. And one of the differences between the two affects terminal 8 of the TuyaMCU chip, which in the TH08 is connected to the CEN terminal of the CBU module (which could explain why you could not flash by lifting only that pin).

    Interior of an electronic device showing circuit boards and electrical components.

    However, in the TH08B, that terminal 8 is connected to a resistor R3 that appears to be connected to 2.8V and PB5. The area of ​​the chip that manages the LCD also has differences but I don't think they are relevant.
    I took advantage of your photo to complete the MCU connections with the Backlight button and turning on the LEDs through U6.

    PCB of model TH08B with connection markings.

    I updated the link to the CBU module information because this is the CBU-NL model that can operate in the voltage range 2.3V to 3.6V.
    https://developer.tuya.com/en/docs/iot/CBU-NL-module-datasheet?id=Kbaeq6j53y0yg

    If you can't achieve your goal by trying the recommendations of colleagues, what I would do is look for a generic sensor without a TuyaMCU chip, like the one at the link https://www.elektroda.com/rtvforum/topic3945688.html. That way you have a lot of room to get what you want, and if the batteries run out very quickly you have the option of powering it externally.
  • #171 21071366
    kkarmah
    Level 6  
    Hello everybody.

    In my case I had to desolder the CBU to be able to solder.
    After that, I entered the WIFI data and rebooted, but now I can't access the web interface. I have to press the physical button for a few seconds and it connects to the wifi but disconnects very quickly. it won't let me change anything... How can I solve it?

    Thanks
  • #172 21071387
    fjcns
    Level 5  
    If you can directly feed power to cbu you can easily access the web interface.
    It is also possible to access the web interface but it has to be at the correct Timing.
    As you mentioned, when you press the button, the CBU will turn on for a few seconds.
    The idea is to press the module button for the CBU to be activated and only access one page at a time, if you try to access another page the CBU will already be turned off and the browser will lose the information. the next time you press the module button the cbu will turn back on, and with the previously loaded page you can access the next page. You have to give the module some time to go to sleep because if you press it too repeatedly the MCU won't turn on the CBU
  • #173 21071422
    kkarmah
    Level 6  
    Does this alternative of directly feeding the CBU harm anything? Will it connect 3.3v and GND directly to the CBU?

    I'm trying to do it this way, slowly each step.
    I didn't find the pins to configure the module here? In my case, when I flashed the BK7231 Easy, it didn't detect which pins I should use
  • #175 21072200
    spin55
    Level 17  
    kkarmah wrote:
    I have to press the physical button for a few seconds and it connects to the wifi but disconnects very quickly. it won't let me change anything... How can I solve it?


    You can extend the activity time of the CBU module by holding down the top key until the Log begins to appear on the web App. As you will see in the Log that I attach, you have up to 92 seconds to make the modifications you consider appropriate in Autoexec.bat

    Spoiler:
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1139 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 17 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 [xxxx]
    Info:MAIN:Using Pass [xxxx]
    Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/obkB9F79399-TH08/ subT cmnd/obkB9F79399-TH08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT obkB9F79399-TH08/ subT obkB9F79399-TH08/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=217.147.223.78, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnly
    Info:MAIN:Time 1, idle 262783/s, free 78064, 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 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    Info:MAIN:Time 2, idle 186590/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 189491/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU:Received: 55 AA 00 03 00 00 02
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 4, idle 188072/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 5, idle 189381/s, free 78064, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:xxxx key:xxxx
    Info:MAIN:Time 6, idle 193862/s, free 72768, 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 375814/s, free 72768, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 8, idle 83787/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 73040, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 73040, 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=50:8b:b9:f7:93:99
    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:NTP:NTP_SendRequest: Unable to send message
    Info:MAIN:Time 11, idle 88996/s, free 73224, 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:Main_OnWiFiStatusChange - WIFI_STA_CONNECTED - 4
    Info:MAIN:Time 12, idle 186120/s, free 73072, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_userName homeassistant
    mqtt_pass xxxx
    mqtt_clientID obkB9F79399-TH08
    mqtt_host 192.168.1.45:1883
    Info:NTP:Seconds since Jan 1 1900 = 3924002006
    Info:NTP:Unix time : 1715020406
    Info:NTP:Local Time : 2024/05/06 18:33:26
    Info:MAIN:Time 13, idle 196545/s, free 72824, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/obkB9F79399-TH08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to obkB9F79399-TH08/+/get
    Info:MQTT:Publishing val obkB9F79399 to obkB9F79399-TH08/host retain=0
    Info:MAIN:Time 14, idle 179437/s, free 73176, MQTT 1(1), 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:MQTT:Publishing val OpenBK7231N 1.17.501 Mar 9 2024 23:14:03 to obkB9F79399-TH08/build retain=0
    Info:MAIN:Time 15, idle 184373/s, free 72904, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val 50:8b:b9:f7:93:99 to obkB9F79399-TH08/mac retain=0
    Info:MAIN:Time 16, idle 187470/s, free 72928, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val xxxx to obkB9F79399-TH08/ssid retain=0
    Info:MAIN:Time 17, idle 186501/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val 1715020410 to obkB9F79399-TH08/datetime retain=0
    Info:MAIN:Time 18, idle 190683/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val 2 to obkB9F79399-TH08/sockets retain=0
    Info:MAIN:Time 19, idle 188184/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val -70 to obkB9F79399-TH08/rssi retain=0
    Info:MAIN:Time 20, idle 186954/s, free 72944, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-70,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MQTT:Publishing val 20 to obkB9F79399-TH08/uptime retain=0
    Info:MAIN:Time 21, idle 186879/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val 73176 to obkB9F79399-TH08/freeheap retain=0
    Info:MAIN:Time 22, idle 185303/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Publishing val 192.168.1.124 to obkB9F79399-TH08/ip retain=0
    Info:MAIN:Time 23, idle 186324/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:Channel has changed! Publishing 0 to channel 1
    Info:MQTT:Publishing val 0 to obkB9F79399-TH08/1/get retain=0
    Info:MAIN:Time 24, idle 189263/s, free 72944, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/1/get
    Info:MQTT:Channel has changed! Publishing 0 to channel 2
    Info:MQTT:Publishing val 0 to obkB9F79399-TH08/2/get retain=0
    Info:MAIN:Time 25, idle 187274/s, free 72944, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/2/get
    Info:MQTT:Channel has changed! Publishing 0 to channel 3
    Info:MQTT:Publishing val 0 to obkB9F79399-TH08/3/get retain=0
    Info:MAIN:Time 26, idle 186475/s, free 72944, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic obkB9F79399-TH08/3/get
    Info:MAIN:Time 27, idle 187930/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 28, idle 188708/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 29, idle 189537/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 30, idle 197904/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 31, idle 183630/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 32, idle 189909/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 33, idle 190329/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 34, idle 188572/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 35, idle 190832/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 36, idle 191313/s, free 64568, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 37, idle 196488/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 38, idle 386942/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 39, idle 191958/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 40, idle 187994/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-73,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 41, idle 185561/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 42, idle 191969/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 43, idle 190170/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 44, idle 197993/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 45, idle 192298/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 46, idle 195731/s, free 73176, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 47, idle 193413/s, free 72960, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 48, idle 189324/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 49, idle 190760/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 50, idle 191521/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-64,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 51, idle 187588/s, free 72872, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 52, idle 192983/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 53, idle 188865/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 54, idle 192418/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 55, idle 188998/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 56, idle 188823/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 57, idle 378537/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 58, idle 189950/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 59, idle 189204/s, free 64264, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:MAIN:Time 60, idle 189882/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-65,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 61, idle 185002/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 62, idle 188769/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 63, idle 190522/s, free 72872, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 64, idle 187266/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 65, idle 191635/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 66, idle 193320/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 67, idle 381422/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 68, idle 188537/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 69, idle 192412/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 70, idle 193703/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-63,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 71, idle 184100/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 1, socks 3/38
    Info:MAIN:Time 72, idle 189779/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 2, socks 2/38
    Info:MAIN:Time 73, idle 190164/s, free 72896, MQTT 1(1), bWifi 1, secondsWithNoPing 3, socks 3/38
    Info:NTP:Seconds since Jan 1 1900 = 3924002067
    Info:NTP:Unix time : 1715020467
    Info:NTP:Local Time : 2024/05/06 18:34:27
    Info:MAIN:Time 74, idle 189923/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 4, socks 2/38
    Info:MAIN:Time 75, idle 187654/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 5, socks 3/38
    Info:MAIN:Time 76, idle 188828/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 6, socks 2/38
    Info:MAIN:Time 77, idle 188651/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 7, socks 2/38
    Info:MAIN:Time 78, idle 192249/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 8, socks 2/38
    Info:MAIN:Time 79, idle 199330/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 9, socks 3/38
    Info:MAIN:Time 80, idle 190705/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 10, socks 2/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-64,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 81, idle 186592/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 11, socks 3/38
    Info:MAIN:Time 82, idle 188539/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 12, socks 2/38
    Info:MAIN:Time 83, idle 189860/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 13, socks 3/38
    Info:MAIN:Time 84, idle 191127/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 14, socks 2/38
    Info:MAIN:Time 85, idle 190543/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 15, socks 2/38
    Info:MAIN:Time 86, idle 190406/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 16, socks 2/38
    Info:MAIN:Time 87, idle 187951/s, free 72872, MQTT 1(1), bWifi 1, secondsWithNoPing 17, socks 3/38
    Info:MAIN:Time 88, idle 188131/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 18, socks 2/38
    Info:MAIN:Time 89, idle 190251/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 19, socks 2/38
    Info:MAIN:Time 90, idle 192076/s, free 64480, MQTT 1(1), bWifi 1, secondsWithNoPing 20, socks 3/38
    Info:GEN:dhcp=0 ip=192.168.1.124 gate=192.168.1.1 mask=255.255.255.0 mac=50:8b:b9:f7:93:99
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-65,ssid=xxxx,bssid=4c:1b:86:3a:89:e6,channel=1,cipher_type:CCMP
    Info:MAIN:Time 91, idle 201856/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 21, socks 2/38
    Info:MAIN:Time 92, idle 196026/s, free 73088, MQTT 1(1), bWifi 1, secondsWithNoPing 22, socks 2/38
  • #176 21073860
    kkarmah
    Level 6  
    It was only today that I managed to get my TH08 sensor working (except the time and date are wrong). How do I make the display show the correct time and date?
    I leave my log here, along with some photos.

    Thank you very much for the help already given

    startDriver TuyaMCU
    startDriver tmSensor
    startDriver NTP
    
    ntp_setServer  192.168.1.198
    ntp_timeZoneOfs 1
    
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    
    setChannelType 3 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 3 val 3
    setChannelLabel 3 BatteryLevel


    Spoiler:
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 15, idle 149049/s, free 71496, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 01 12 02 02 00 04 00 00 00 2E 03 04 00 01 02 73
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 274
    Info:GEN:CHANNEL_Set channel 1 has changed to 274 (flags 0)

    Info:MQTT:Channel has changed! Publishing 274 to channel 1
    Info:MQTT:Publishing val 274 to th08/1/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 46
    Info:GEN:CHANNEL_Set channel 2 has changed to 46 (flags 0)

    Info:MQTT:Channel has changed! Publishing 46 to channel 2
    Info:MQTT:Publishing val 46 to th08/2/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)

    Info:MQTT:Channel has changed! Publishing 2 to channel 3
    Info:MQTT:Publishing val 2 to th08/3/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 167972/s, free 71496, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 11, idle 90822/s, free 71584, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/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:CMD:CMD_StartScript: started /autoexec.bat at the beginning
    Info:CMD:[WebApp Cmd 'backlog resetSVM; startScript /autoexec.bat' Result] OK
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Drv tmSensor is already loaded.
    Info:MAIN:Drv NTP is already loaded.
    Info:NTP:NTP server set to 192.168.1.198
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MQTT:mqtt_userName user_mqtt
    mqtt_pass pass_mqtt
    mqtt_clientID th08
    mqtt_host 192.168.1.80:1883
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 13, idle 160936/s, free 72192, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:CMD:CMD_StartScript: started /autoexec.bat at the beginning
    Info:CMD:[WebApp Cmd 'backlog resetSVM; startScript /autoexec.bat' Result] OK
    Info:MAIN:Drv TuyaMCU is already loaded.
    Info:MAIN:Drv tmSensor is already loaded.
    Info:MAIN:Drv NTP is already loaded.
    Info:NTP:NTP server set to 192.168.1.198
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    2:d1 to th08/mac retain=0
    Info:MQTT:Publishing val network_WIFI_name to th08/ssid retain=0
    Info:MQTT:Publishing val 3616 to th08/datetime retain=0
    Info:MQTT:Publishing val 3 to th08/sockets retain=0
    Info:MQTT:Publishing val -64 to th08/rssi retain=0
    Info:MQTT:Publishing val 16 to th08/uptime retain=0
    Info:MQTT:Publishing val 72184 to th08/freeheap retain=0
    Info:MQTT:Publishing val 192.168.1.198 to th08/ip retain=0
    Info:MQTT:Channel has changed! Publishing 0 to channel 1
    Info:MQTT:Publishing val 0 to th08/1/get retain=0
    Info:MQTT:Channel has changed! Publishing 0 to channel 2
    Info:MQTT:Publishing val 0 to th08/2/get retain=0
    Info:MQTT:Channel has changed! Publishing 0 to channel 3
    Info:MQTT:Publishing val 0 to th08/3/get retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 182485/s, free 71960, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/3/get
    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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3617
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 18, idle 152888/s, free 72184, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 01 12 02 02 00 04 00 00 00 2E 03 04 00 01 01 72
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 274
    Info:GEN:CHANNEL_Set channel 1 has changed to 274 (flags 0)

    Info:MQTT:Channel has changed! Publishing 274 to channel 1
    Info:MQTT:Publishing val 274 to th08/1/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 46
    Info:GEN:CHANNEL_Set channel 2 has changed to 46 (flags 0)

    Info:MQTT:Channel has changed! Publishing 46 to channel 2
    Info:MQTT:Publishing val 46 to th08/2/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 1
    Info:GEN:CHANNEL_Set channel 3 has changed to 1 (flags 0)

    Info:MQTT:Channel has changed! Publishing 1 to channel 3
    Info:MQTT:Publishing val 1 to th08/3/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/3/get
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1661 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 27 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 [network_WIFI_name]
    Info:MAIN:Using Pass [xxxx]
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/th08/ subT cmnd/th08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=192.168.1.198, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP server set to 192.168.1.198
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 268643/s, free 78048, 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 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    Info:MAIN:Time 2, idle 189486/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 191221/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU:Received: 55 AA 00 03 00 00 02
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 4, idle 192236/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 5, idle 191134/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:network_WIFI_name key:xxxxxxxx
    Info:MAIN:Time 6, idle 183437/s, free 72664, 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 181609/s, free 72192, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 8, idle 85533/s, free 71808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 71808, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 71808, 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=18:de:50:be:02:d1
    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 84733/s, free 63680, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 4/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:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 179775/s, free 72328, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 194188/s, free 72240, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to th08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/th08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to th08/+/get
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 19, idle 166290/s, free 60304, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1662 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 27 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 [network_WIFI_name]
    Info:MAIN:Using Pass [xxxx]
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/th08/ subT cmnd/th08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=192.168.1.198, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP server set to 192.168.1.198
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 264996/s, free 78048, 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 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    Info:MAIN:Time 2, idle 186185/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 188737/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU:Received: 55 AA 00 03 00 00 02
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 4, idle 191239/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 5, idle 189010/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:network_WIFI_name key:xxxx
    Info:MAIN:Time 6, idle 181618/s, free 72592, 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 180547/s, free 72120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 8, idle 84362/s, free 71680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 71680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 71680, 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=18:de:50:be:02:d1
    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:MQTT:MQTT base topic is dirty, will reinit callbacks and reconnect
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/th08/ subT cmnd/th08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/get
    Info:MQTT:MQTT has pending reconnect in 4
    Info:MAIN:Time 11, idle 89907/s, free 72248, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/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:MQTT:MQTT has pending reconnect in 2
    Info:MQTT:mqtt_userName user_mqtt
    mqtt_pass pass_mqtt
    mqtt_clientID th08
    mqtt_host 192.168.1.80:1883
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 13, idle 186515/s, free 60304, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to th08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/th08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to th08/+/get
    Info:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 181105/s, free 72288, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1663 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 27 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 [network_WIFI_name]
    Info:MAIN:Using Pass [xxxx]
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/th08/ subT cmnd/th08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=192.168.1.198, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP server set to 192.168.1.198
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 270167/s, free 78048, 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 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    Info:MAIN:Time 2, idle 188268/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 191333/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU:Received: 55 AA 00 03 00 00 02
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 4, idle 192140/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 5, idle 191142/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:network_WIFI_name key:xxxx
    Info:MAIN:Time 6, idle 184336/s, free 72592, 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 182788/s, free 72120, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 8, idle 85116/s, free 71680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 71680, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 71680, 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=18:de:50:be:02:d1
    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 89363/s, free 72248, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/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:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 190452/s, free 72288, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_userName user_mqtt
    mqtt_pass pass_mqtt
    mqtt_clientID th08
    mqtt_host 192.168.1.80:1883
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 13, idle 193076/s, free 72008, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to th08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/th08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to th08/+/get
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 167236/s, free 65144, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 192819/s, free 72288, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:Publishing val obk50BE02D1 to th08/host retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 14, idle 176642/s, free 71888, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:MQTT:Publishing val OpenBK7231N 1.17.571 May 3 2024 21:03:10 to th08/build retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 15, idle 175728/s, free 71936, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 01 12 02 02 00 04 00 00 00 2E 03 04 00 01 02 73
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 274
    Info:GEN:CHANNEL_Set channel 1 has changed to 274 (flags 0)

    Info:MQTT:Channel has changed! Publishing 274 to channel 1
    Info:MQTT:Publishing val 274 to th08/1/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 46
    Info:GEN:CHANNEL_Set channel 2 has changed to 46 (flags 0)

    Info:MQTT:Channel has changed! Publishing 46 to channel 2
    Info:MQTT:Publishing val 46 to th08/2/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)

    Info:MQTT:Channel has changed! Publishing 2 to channel 3
    Info:MQTT:Publishing val 2 to th08/3/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/3/get
    Info:MQTT:Publishing val network_WIFI_name to th08/ssid retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 191925/s, free 72200, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38


    Screenshot of the configuration panel for the OpenBK7231N device, displaying parameters like temperature, humidity, and network settings.
    User interface of the OpenBK7231N device showing status and sensor information.
    TH08 sensor display showing incorrect date and time.
  • #177 21073861
    p.kaczmarek2
    Moderator Smart Home
    It seems you have a lot of NTP errors in your log. Are you sure that your NTP IP is correct?>
    
    
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    
    Helpful post? Buy me a coffee.
  • #178 21073866
    kkarmah
    Level 6  
    Yes. It's like assigning a static IP to the device, isn't it? I went to confirm now once again, this IP is his...
  • #179 21073922
    spin55
    Level 17  
    Modify this in autoexec:

    startDriver TuyaMCU
    startDriver tmSensor
    startDriver NTP
    
    //ntp_setServer  192.168.1.198
    ntp_timeZoneOfs 1
    
    setChannelType 1 temperature_div10
    linkTuyaMCUOutputToChannel 1 val 1
    
    setChannelType 2 Humidity
    linkTuyaMCUOutputToChannel 2 val 2
    
    setChannelType 3 ReadOnlyLowMidHigh
    linkTuyaMCUOutputToChannel 3 val 3
    setChannelLabel 3 BatteryLevel
  • #180 21074053
    kkarmah
    Level 6  
    I think it's the same...
    When I remove the batteries and it turns on, the date appears 04/18/2022 00:00 but then returns to 01/01/2070 01:00 Hours.
    And from last night to this morning (Times in Portugal), the display only changed from 01:00 to 01:36 hours...

    Screenshot of a user interface displaying system data and configuration buttons.


    Spoiler:
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 185112/s, free 72248, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 163535/s, free 72160, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_userName user_mqtt
    mqtt_pass pass_mqtt
    mqtt_clientID th08
    mqtt_host 192.168.1.80:1883
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 13, idle 186307/s, free 72168, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to th08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/th08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to th08/+/get
    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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 145287/s, free 71952, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:MQTT:Publishing val network_WIFI_name to th08/ssid retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 185839/s, free 72168, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Time 11, idle 91675/s, free 72248, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/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:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 188533/s, free 72288, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:Publishing val obk50BE02D1 to th08/host retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 14, idle 183102/s, free 72200, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/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:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 09 04 00 01 00 17 02 00 04 00 00 00 00 18 02 00 04 00 00 00 00 62
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 9, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 23, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 24, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 0
    Info:MQTT:Publishing val network_WIFI_name to th08/ssid retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 193231/s, free 72200, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MAIN:Main_Init_Before_Delay
    Info:CFG:####### Boot Count 1699 #######
    Warn:CFG:CFG_InitAndLoad: Correct config has been loaded with 29 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 [network_WIFI_name]
    Info:MAIN:Using Pass [xxxx]
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT bekens_n/ subT bekens_n/+/set
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/th08/ subT cmnd/th08/+
    Info:MQTT:MQTT_RegisterCallback called for bT cmnd/bekens_n/ subT cmnd/bekens_n/+
    Info:MQTT:MQTT_RegisterCallback called for bT th08/ subT th08/+/get
    Info:CMD:CMD_StartScript: started autoexec.bat at the beginning
    Info:MAIN:Main_Init_After_Delay done
    Info:MAIN:Started TuyaMCU.
    Info:MAIN:Started tmSensor.
    Info:NTP:NTP driver initialized with server=192.168.1.198, offset=0
    Info:MAIN:Started NTP.
    Info:NTP:NTP offset set
    Info:GEN:Channel 1 type changed to temperature_div10
    Info:GEN:Channel 2 type changed to Humidity
    Info:GEN:Channel 3 type changed to ReadOnlyLowMidHigh
    Info:MAIN:Time 1, idle 266962/s, free 78048, 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 69 64 79 70 6B 62 6F 6B 61 72 64 78 74 38 32 33 22 2C 22 76 22 3A 22 31 2E 30 2E 30 22 7D BC
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 1 (QueryProductInformation) len 43
    Info:TuyaMCU:ParseQueryProductInformation: received {"p":"idypkbokardxt823","v":"1.0.0"}
    Info:MAIN:Time 2, idle 186020/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 3, idle 190203/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:TuyaMCU:Received: 55 AA 00 03 00 00 02
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 3 (WiFiState) len 7
    Info:MAIN:Time 4, idle 189996/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 5, idle 188758/s, free 78048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:ssid:network_WIFI_name key:xxxx
    Info:MAIN:Time 6, idle 183363/s, free 73312, 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 182866/s, free 72304, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 8, idle 83965/s, free 72048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 9, idle 0/s, free 72048, MQTT 0(0), bWifi 0, secondsWithNoPing -1, socks 2/38
    Info:MAIN:Time 10, idle 0/s, free 72048, 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=18:de:50:be:02:d1
    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 90648/s, free 63784, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:CMD:[WebApp Cmd 'logfeature 9 1' Result] OK
    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:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 12, idle 188367/s, free 72432, MQTT 0(0), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_userName user_mqtt
    mqtt_pass pass_mqtt
    mqtt_clientID th08
    mqtt_host 192.168.1.80:1883
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 13, idle 185468/s, free 72344, MQTT 0(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:mqtt_connection_cb: Successfully connected
    Info:MQTT:mqtt_subscribed to th08/+/set
    Info:MQTT:mqtt_subscribed to bekens_n/+/set
    Info:MQTT:mqtt_subscribed to cmnd/th08/+
    Info:MQTT:mqtt_subscribed to cmnd/bekens_n/+
    Info:MQTT:mqtt_subscribed to th08/+/get
    Info:MQTT:Publishing val obk50BE02D1 to th08/host retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 14, idle 183270/s, free 72344, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:MQTT:Publishing val OpenBK7231N 1.17.571 May 3 2024 21:03:10 to th08/build retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 15, idle 172346/s, free 72344, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 00 FB 02 02 00 04 00 00 00 44 03 04 00 01 02 71
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 251
    Info:GEN:CHANNEL_Set channel 1 has changed to 251 (flags 0)

    Info:MQTT:Channel has changed! Publishing 251 to channel 1
    Info:MQTT:Publishing val 251 to th08/1/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 68
    Info:GEN:CHANNEL_Set channel 2 has changed to 68 (flags 0)

    Info:MQTT:Channel has changed! Publishing 68 to channel 2
    Info:MQTT:Publishing val 68 to th08/2/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)

    Info:MQTT:Channel has changed! Publishing 2 to channel 3
    Info:MQTT:Publishing val 2 to th08/3/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/3/get
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 163732/s, free 72344, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:Publishing val network_WIFI_name to th08/ssid retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 17, idle 183935/s, free 72112, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    Info:MQTT:Publishing val obk50BE02D1 to th08/host retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 14, idle 177139/s, free 72200, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/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:TuyaMCU:Received: 55 AA 00 10 00 04 03 09 17 18 4E
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 16 (Unknown) len 11
    Info:TuyaMCU:Received: 55 AA 00 0B 00 00 0A
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 11 (QuerySignalStrngth) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_QUERYSIGNALSTRENGTH, so sending back signal
    Info:TuyaMCU:Received: 55 AA 00 06 00 00 05
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 6 (SetDP) len 7
    Info:TuyaMCU:ProcessIncoming: received TUYA_V0_CMD_OBTAINLOCALTIME, so sending back time
    Info:TuyaMCU:MCU time to set: 3614
    Info:TuyaMCU:ptime ->gmtime => tm_hour: 1
    Info:TuyaMCU:ptime ->gmtime => tm_min: 0
    Info:MQTT:Publishing val OpenBK7231N 1.17.571 May 3 2024 21:03:10 to th08/build retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 15, idle 175193/s, free 60504, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 4/38
    Info:TuyaMCU:Received: 55 AA 00 05 00 15 01 02 00 04 00 00 00 FB 02 02 00 04 00 00 00 44 03 04 00 01 02 71
    Info:TuyaMCU:ProcessIncoming[v=0]: cmd 5 (WiFiSelect) len 28
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 1, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 251
    Info:GEN:CHANNEL_Set channel 1 has changed to 251 (flags 0)

    Info:MQTT:Channel has changed! Publishing 251 to channel 1
    Info:MQTT:Publishing val 251 to th08/1/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 2, dataType 2-val and 4 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: int32 68
    Info:GEN:CHANNEL_Set channel 2 has changed to 68 (flags 0)

    Info:MQTT:Channel has changed! Publishing 68 to channel 2
    Info:MQTT:Publishing val 68 to th08/2/get retain=0
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: processing id 3, dataType 4-enum and 1 data bytes
    Info:TuyaMCU:V0_ParseRealTimeWithRecordStorage: byte 2
    Info:GEN:CHANNEL_Set channel 3 has changed to 2 (flags 0)

    Info:MQTT:Channel has changed! Publishing 2 to channel 3
    Info:MQTT:Publishing val 2 to th08/3/get retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic th08/3/get
    Info:MQTT:Publishing val 18:de:50:be:02:d1 to th08/mac retain=0
    Info:NTP:NTP_CheckForReceive: Error while receiving server's msg
    Info:MAIN:Time 16, idle 168927/s, free 72200, MQTT 1(1), bWifi 1, secondsWithNoPing -1, socks 3/38
    [/code]

Topic summary

The discussion revolves around the TH08 LCD Calendar/Clock/Temperature/Humidity device, focusing on its teardown, firmware flashing, and integration with OpenBK. Users share experiences with the device's functionality, including issues with sensor readings, MQTT communication, and NTP server configuration. Key points include the necessity of desoldering RX and TX pins for successful firmware flashing, the importance of correct NTP server settings for time synchronization, and methods to maintain Wi-Fi connectivity. Users also explore power management strategies for the device, including the implications of using external power sources and the impact on battery life. Solutions for ensuring accurate temperature and humidity readings are discussed, along with troubleshooting steps for connectivity issues.
Summary generated by the language model.
ADVERTISEMENT