logo elektroda
logo elektroda
X
logo elektroda

OpenBeken - strange behaviour during OTA flashing, BL602 and BK7231N: CBLC9, CBLC9S, BL937 and CB2S

mgoblp 234 2
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 21631703
    mgoblp
    Level 11  
    I have noticed two recurring scenarios when flashing OTA OpenBeken:
    BL602:
    Flags (Current value=1207960576)
    NTP driver loaded.
    After successful OTA flashing, a strange chip temperature reading appears: the temperature changes every second between about -40°C and +40°C.
    After a reboot the reading returns to normal.
    After changing flag 2 without a reboot - also returns to normal.
    The problem has been recurrent after every OTA flashing for a long time.

    BK7231N, Tuya WiFi sockets with current measurement (BL937, CB2S), NTP driver loaded:
    During flashing the chip crashes (flashing addresses stop not far before the end).
    After unplugging the chip starts with the previous OTA version.
    After enabling flag 36 and rebooting the OTA can be updated.
    I have replaced the chip in one of the slots with a WB2S (swapped P6 with P8 in the configuration), but have not yet checked how the OTA behaves without flag 36.
    I noticed that the problem occurs with large autoexec.bat files also on CBLC9 and CBLC9S - circuits without current measurement. I have replaced the capacitor on the power supply, but I don't think that's it.
  • ADVERTISEMENT
  • #2 21631910
    p.kaczmarek2
    Moderator Smart Home
    mgoblp wrote:
    .
    After enabling flag 36 and rebooting the OTA device can be updated.
    .
    And if you do a "stopDriver *" while the device is running, i.e. stop the drivers, the OTA works too?

    It sounds like the operation of the driver - which driver? - spoils the OTA

    Does the problem occur without NTP?
    Helpful post? Buy me a coffee.
  • #3 21632645
    mgoblp
    Level 11  
    Flag 36 does not disable NTP - because NTP is in autoexec.bat, it disables BL937 instead. It looks like there is a lack of resources when flashing. It's even worse with SetupEnergyStats enabled.
    StopDriver I didn't do, I'll check with new firmware.
    Generally, clearing autoexec.bat removes the hang on flashing.
    I will check the behaviour of BL602 without NTP with new firmware.
    I have the chips: CBU and CB3S, which do not hang on flashing despite the large autoexec.bat and the current NTP.

    Edit:

    BL602:
    stopDriver ntp; I clean autoexec.bat to zero,
    OTA start...
    Moments before reboot negative temperatures appear, after reboot is fine.
    I upload the contents of autoexec.bat - temperature starts to go crazy after reboot
    StopDriver NTP - negative temperatures continue.
    Restart all - NTP module starts and temperature is OK.
    In the OTA 160 version the problem is back.

    autoexec.bat:
    
    startDriver ntp
    //ntp_timeZoneOfs 1
    ntp_setLatlong 53.xxxxxx 22.xxxxxx
    
    powerSave 1
    
    //Warsaw time zone
    alias winter_time ntp_timeZoneOfs 1
    alias summer_time ntp_timeZoneOfs 2
    
    winter_time
    
    alias check1 if $month>3 then summer_time
    alias check2 if $month==3&&$mday-$day>=25&&$day>0 then summer_time
    alias check3 if $month==3&&$mday-$day>=25&&$day==0&&$hour>=2 then summer_time
    
    alias check4 if $month>10 then winter_time
    alias check5 if $month==10&&$mday-$day>=25&&$day>0 then winter_time
    alias check6 if $month==10&&$mday-$day>=25&&$day==0&&$hour>=3 then winter_time
    
    alias set_time backlog check1;check2;check3;check4;check5;check6
    waitfor NTPState 1
    set_time
    addClockEvent 03:00:01 0x01 1 set_time
    
    .
    Flash to version 154 with NTP enabled - this time OK, temperatures are correct.

    CBLC9S:
    I did a stopDriver NTP ... OK
    OTA start (version 153) ...
    Addresses saved to the end, then automatic restart, started up for a while and stood at something like this:
    
    NTP: Syncing with 217.147.223.78....
    1 drivers active (NTP), total: 31
    Channel 1 = 0.00, Channel 2 = 0.00, Channel 3 = 1200.00, 2 event handlers, 1 script threads
    Cfg size: 3584, change counter: 56, ota counter: 20, incomplete boots: 1
    Chip temperature: 53.2°C
    Wifi RSSI: Weak (-72dBm)
    Reboot reason: 1 - Rbt
    MQTT State: disconnected RES: 0(ERR_OK)
    MQTT ErrMsg:
    MQTT Stats: CONN: 0 PUB: 0 RECV: 0 ERR: 0 
    
    .
    then no access to the web page.

    Here autoexec.bat is a bit different:
    
    startDriver ntp
    //ntp_timeZoneOfs 1
    ntp_setLatlong 53.xxxxxx 22.xxxxxx
    
    setChannelLabel 1 "Light"
    setChannelLabel 2 "Fan"
    setStartValue 0 -1
    setStartValue 1 -1
    setStartValue 2 -1
    setStartValue 3 -1
    setChannelType 3 TextField
    setChannelLabel 3 "FanDelay seconds"
    
    if $CH3==0 then setChannel 3 900
    
    alias fan_on backlog SetChannel 2 1; addRepeatingEventID $CH3 1 45 SetChannel 2 0
    alias fan_off backlog SetChannel 2 0; cancelRepeatingEvent 45
    addChangeHandler Channel1 == 0 fan_on
    addChangeHandler Channel1 == 1 fan_off
    
    if $CH2==1 then backlog  cancelRepeatingEvent 45; addRepeatingEventID $CH3 1 45 SetChannel 2 0
    
    powerSave 1
    
    //Warsaw time zone
    alias winter_time ntp_timeZoneOfs 1
    alias summer_time ntp_timeZoneOfs 2
    
    winter_time
    
    alias check1 if $month>3 then summer_time
    alias check2 if $month==3&&$mday-$day>=25&&$day>0 then summer_time
    alias check3 if $month==3&&$mday-$day>=25&&$day==0&&$hour>=2 then summer_time
    
    alias check4 if $month>10 then winter_time
    alias check5 if $month==10&&$mday-$day>=25&&$day>0 then winter_time
    alias check6 if $month==10&&$mday-$day>=25&&$day==0&&$hour>=3 then winter_time
    
    alias set_time backlog check1;check2;check3;check4;check5;check6
    waitfor NTPState 1
    set_time
    addClockEvent 03:00:01 0x01 1 set_time
    
    .

    Log:
    
    Info:CMD:[WebApp Cmd 'stopdriver ntp' Result] OK
    Info:MQTT:Publishing val (317 bytes) to tele/swiatlo_wentylator_pralnia/STATE retain=0
    Info:MAIN:Time 264958, idle 80700/s, free 54944, MQTT 1(15), bWifi 1, secondsWithNoPing 264887, socks 2/38 POWERSAVE
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/swiatlo_wentylator_pralnia/STATE
    Info:MQTT:Publishing val (317 bytes) to stat/swiatlo_wentylator_pralnia/RESULT retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic stat/swiatlo_wentylator_pralnia/RESULT
    Info:MAIN:Time 264959, idle 68468/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264888, socks 2/38 POWERSAVE
    Info:MAIN:Time 264960, idle 74472/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264889, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MAIN:Time 264961, idle 69554/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264890, socks 2/38 POWERSAVE
    Info:MAIN:Time 264962, idle 73548/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264891, socks 2/38 POWERSAVE
    Info:MAIN:Time 264963, idle 76481/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264892, socks 2/38 POWERSAVE
    Info:MAIN:Time 264964, idle 72581/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264893, socks 2/38 POWERSAVE
    Info:MAIN:Time 264965, idle 74830/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264894, socks 2/38 POWERSAVE
    Info:MAIN:Time 264966, idle 74070/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264895, socks 3/38 POWERSAVE
    Info:MAIN:Time 264967, idle 73266/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264896, socks 2/38 POWERSAVE
    Info:MAIN:Time 264968, idle 72716/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264897, socks 2/38 POWERSAVE
    Info:MAIN:Time 264969, idle 88588/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264898, socks 2/38 POWERSAVE
    Info:MAIN:Time 264970, idle 74223/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264899, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-64,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MAIN:Time 264971, idle 69130/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264900, socks 2/38 POWERSAVE
    Info:MAIN:Time 264972, idle 73823/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264901, socks 2/38 POWERSAVE
    Info:MAIN:Time 264973, idle 75918/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264902, socks 2/38 POWERSAVE
    Info:MAIN:Time 264974, idle 73952/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264903, socks 2/38 POWERSAVE
    Info:MAIN:Time 264975, idle 74249/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264904, socks 3/38 POWERSAVE
    Info:MAIN:Time 264976, idle 71374/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264905, socks 2/38 POWERSAVE
    Info:MAIN:Time 264977, idle 68822/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264906, socks 2/38 POWERSAVE
    Info:MAIN:Time 264978, idle 86825/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264907, socks 2/38 POWERSAVE
    Info:MAIN:Time 264979, idle 68297/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264908, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val obk_05CA00053 to swiatlo_wentylator_pralnia/host retain=0
    Info:MAIN:Time 264980, idle 69793/s, free 55256, MQTT 1(15), bWifi 1, secondsWithNoPing 264909, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-65,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MQTT:Publishing val OpenBK7231N 1.18.152 Aug 10 2025 15:11:59 to swiatlo_wentylator_pralnia/build retain=0
    Info:MAIN:Time 264981, idle 69757/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264910, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 38:a5:c9:bd:04:a8 to swiatlo_wentylator_pralnia/mac retain=0
    Info:MAIN:Time 264982, idle 70461/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264911, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 54.11 to swiatlo_wentylator_pralnia/temp retain=0
    Info:MAIN:Time 264983, idle 69980/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264912, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val ZK25 to swiatlo_wentylator_pralnia/ssid retain=0
    Info:MAIN:Time 264984, idle 71494/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264913, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 2 to swiatlo_wentylator_pralnia/sockets retain=0
    Info:MAIN:Time 264985, idle 77169/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264914, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val -72 to swiatlo_wentylator_pralnia/rssi retain=0
    Info:MAIN:Time 264986, idle 70707/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264915, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 264986 to swiatlo_wentylator_pralnia/uptime retain=0
    Info:MAIN:Time 264987, idle 79875/s, free 55208, MQTT 1(15), bWifi 1, secondsWithNoPing 264916, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 55512 to swiatlo_wentylator_pralnia/freeheap retain=0
    Info:MAIN:Time 264988, idle 69235/s, free 55264, MQTT 1(15), bWifi 1, secondsWithNoPing 264917, socks 2/38 POWERSAVE
    Info:MQTT:Publishing val 10.0.0.37 to swiatlo_wentylator_pralnia/ip retain=0
    Info:MAIN:Time 264989, idle 71628/s, free 55264, MQTT 1(15), bWifi 1, secondsWithNoPing 264918, socks 2/38 POWERSAVE
    Info:MQTT:Channel has changed! Publishing 0 to channel 1 
    Info:MQTT:Publishing val (317 bytes) to tele/swiatlo_wentylator_pralnia/STATE retain=0
    Info:MQTT:Publishing val 0 to swiatlo_wentylator_pralnia/1/get retain=1
    Info:MAIN:Time 264990, idle 72801/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264919, socks 2/38 POWERSAVE
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/swiatlo_wentylator_pralnia/STATE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-71,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MQTT:Publishing val (317 bytes) to stat/swiatlo_wentylator_pralnia/RESULT retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic swiatlo_wentylator_pralnia/1/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic stat/swiatlo_wentylator_pralnia/RESULT
    Info:MQTT:Channel has changed! Publishing 0 to channel 2 
    Info:MQTT:Publishing val (317 bytes) to tele/swiatlo_wentylator_pralnia/STATE retain=0
    Info:MQTT:Publishing val 0 to swiatlo_wentylator_pralnia/2/get retain=1
    Info:MAIN:Time 264991, idle 65325/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264920, socks 2/38 POWERSAVE
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/swiatlo_wentylator_pralnia/STATE
    Info:MQTT:Publishing val (317 bytes) to stat/swiatlo_wentylator_pralnia/RESULT retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic swiatlo_wentylator_pralnia/2/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic stat/swiatlo_wentylator_pralnia/RESULT
    Info:MQTT:Channel has changed! Publishing 1200 to channel 3 
    Info:MQTT:Publishing val (317 bytes) to tele/swiatlo_wentylator_pralnia/STATE retain=0
    Info:MQTT:Publishing val 1200 to swiatlo_wentylator_pralnia/3/get retain=0
    Info:MAIN:Time 264992, idle 62572/s, free 54992, MQTT 1(15), bWifi 1, secondsWithNoPing 264921, socks 3/38 POWERSAVE
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic tele/swiatlo_wentylator_pralnia/STATE
    Info:MQTT:Publishing val (317 bytes) to stat/swiatlo_wentylator_pralnia/RESULT retain=0
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic swiatlo_wentylator_pralnia/3/get
    Info:MQTT:MQTT client in mqtt_incoming_publish_cb topic stat/swiatlo_wentylator_pralnia/RESULT
    Info:MAIN:Time 264993, idle 68237/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264922, socks 2/38 POWERSAVE
    Info:MAIN:Time 264994, idle 73110/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264923, socks 3/38 POWERSAVE
    Info:MAIN:Time 264995, idle 74756/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264924, socks 2/38 POWERSAVE
    Info:MAIN:Time 264996, idle 86749/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264925, socks 2/38 POWERSAVE
    Info:MAIN:Time 264997, idle 68879/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264926, socks 2/38 POWERSAVE
    Info:MAIN:Time 264998, idle 72741/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264927, socks 2/38 POWERSAVE
    Info:MAIN:Time 264999, idle 76194/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264928, socks 2/38 POWERSAVE
    Info:MAIN:Time 265000, idle 71542/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264929, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MAIN:Time 265001, idle 71038/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264930, socks 2/38 POWERSAVE
    Info:MAIN:Time 265002, idle 76093/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264931, socks 2/38 POWERSAVE
    Info:MAIN:Time 265003, idle 77770/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264932, socks 2/38 POWERSAVE
    Info:MAIN:Time 265004, idle 68852/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264933, socks 2/38 POWERSAVE
    Info:MAIN:Time 265005, idle 75940/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264934, socks 2/38 POWERSAVE
    Info:MAIN:Time 265006, idle 77012/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264935, socks 3/38 POWERSAVE
    Info:MAIN:Time 265007, idle 72394/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264936, socks 2/38 POWERSAVE
    Info:MAIN:Time 265008, idle 77503/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264937, socks 2/38 POWERSAVE
    Info:MAIN:Time 265009, idle 70886/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264938, socks 2/38 POWERSAVE
    Info:MAIN:Time 265010, idle 72561/s, free 46904, MQTT 1(15), bWifi 1, secondsWithNoPing 264939, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-72,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MAIN:Time 265011, idle 72190/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264940, socks 2/38 POWERSAVE
    Info:MAIN:Time 265012, idle 77077/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264941, socks 2/38 POWERSAVE
    Info:MAIN:Time 265013, idle 69079/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264942, socks 2/38 POWERSAVE
    Info:MAIN:Time 265014, idle 76430/s, free 46904, MQTT 1(15), bWifi 1, secondsWithNoPing 264943, socks 3/38 POWERSAVE
    Info:MAIN:Time 265015, idle 80943/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264944, socks 2/38 POWERSAVE
    Info:MAIN:Time 265016, idle 75681/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264945, socks 2/38 POWERSAVE
    Info:MAIN:Time 265017, idle 74144/s, free 55296, MQTT 1(15), bWifi 1, secondsWithNoPing 264946, socks 3/38 POWERSAVE
    Info:MAIN:Time 265018, idle 93202/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264947, socks 2/38 POWERSAVE
    Info:MAIN:Time 265019, idle 70193/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264948, socks 2/38 POWERSAVE
    Info:MAIN:Time 265020, idle 66887/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264949, socks 2/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-66,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:MAIN:Time 265021, idle 71264/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264950, socks 2/38 POWERSAVE
    Info:MAIN:Time 265022, idle 68594/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264951, socks 2/38 POWERSAVE
    Info:MAIN:Time 265023, idle 77951/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264952, socks 2/38 POWERSAVE
    Info:MAIN:Time 265024, idle 71884/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264953, socks 2/38 POWERSAVE
    Info:MAIN:Time 265025, idle 74098/s, free 55512, MQTT 1(15), bWifi 1, secondsWithNoPing 264954, socks 2/38 POWERSAVE
    Info:OTA:init OTA, startaddr 0x12a000
    Info:MAIN:Time 265026, idle 73227/s, free 35616, MQTT 1(15), bWifi 1, secondsWithNoPing 264955, socks 3/38 POWERSAVE
    Info:OTA:12a000
    Info:OTA:12b000
    Info:OTA:12c000
    Info:OTA:12d000
    Info:OTA:12e000
    Info:OTA:12f000
    Info:OTA:130000
    Info:OTA:131000
    Info:OTA:132000
    Info:OTA:133000
    Info:OTA:134000
    Info:OTA:135000
    Info:OTA:136000
    Info:OTA:137000
    Info:OTA:138000
    Info:OTA:139000
    Info:OTA:13a000
    Info:OTA:13b000
    Info:OTA:13c000
    Info:OTA:13d000
    Info:OTA:13e000
    Info:MQTT:OTA started MQTT will be closed
    Info:MAIN:Time 265027, idle 27136/s, free 35704, MQTT 1(15), bWifi 1, secondsWithNoPing 264956, socks 3/38 POWERSAVE
    Info:OTA:13f000
    Info:OTA:140000
    Info:OTA:141000
    Info:OTA:142000
    Info:OTA:143000
    Info:OTA:144000
    Info:OTA:145000
    Info:OTA:146000
    Info:OTA:147000
    Info:OTA:148000
    Info:OTA:149000
    Info:OTA:14a000
    Info:OTA:14b000
    Info:OTA:14c000
    Info:OTA:14d000
    Info:OTA:14e000
    Info:OTA:14f000
    Info:OTA:150000
    Info:OTA:151000
    Info:OTA:152000
    Info:OTA:153000
    Info:MAIN:Time 265028, idle 35837/s, free 35688, MQTT 0(15), bWifi 1, secondsWithNoPing 264957, socks 3/38 POWERSAVE
    Info:OTA:154000
    Info:OTA:155000
    Info:OTA:156000
    Info:OTA:157000
    Info:OTA:158000
    Info:OTA:159000
    Info:OTA:15a000
    Info:OTA:15b000
    Info:OTA:15c000
    Info:OTA:15d000
    Info:OTA:15e000
    Info:OTA:15f000
    Info:OTA:160000
    Info:OTA:161000
    Info:OTA:162000
    Info:OTA:163000
    Info:OTA:164000
    Info:OTA:165000
    Info:OTA:166000
    Info:OTA:167000
    Info:MAIN:Time 265029, idle 28211/s, free 35688, MQTT 0(15), bWifi 1, secondsWithNoPing 264958, socks 3/38 POWERSAVE
    Info:OTA:168000
    Info:OTA:169000
    Info:OTA:16a000
    Info:OTA:16b000
    Info:OTA:16c000
    Info:OTA:16d000
    Info:OTA:16e000
    Info:OTA:16f000
    Info:OTA:170000
    Info:OTA:171000
    Info:OTA:172000
    Info:OTA:173000
    Info:OTA:174000
    Info:OTA:175000
    Info:OTA:176000
    Info:OTA:177000
    Info:OTA:178000
    Info:OTA:179000
    Info:OTA:17a000
    Info:OTA:17b000
    Info:OTA:17c000
    Info:OTA:17d000
    Info:MAIN:Time 265030, idle 29869/s, free 35688, MQTT 0(15), bWifi 1, secondsWithNoPing 264959, socks 3/38 POWERSAVE
    Info:GEN:dhcp=0 ip=10.0.0.37 gate=10.0.0.2 mask=255.255.255.0 mac=38:a5:c9:bd:04:a8
    Info:GEN:sta: 1, softap: 0, b/g/n
    Info:GEN:sta:rssi=-65,ssid=ZK25,bssid=f4:ec:38:9f:b6:aa,channel=4,cipher_type:CCMP
    Info:OTA:17e000
    Info:OTA:17f000
    Info:OTA:180000
    Info:OTA:181000
    Info:OTA:182000
    Info:OTA:183000
    Info:OTA:184000
    Info:OTA:185000
    Info:OTA:186000
    Info:OTA:187000
    Info:OTA:188000
    Info:OTA:189000
    Info:OTA:18a000
    Info:OTA:18b000
    Info:OTA:18c000
    Info:OTA:18d000
    Info:OTA:18e000
    Info:OTA:18f000
    Info:OTA:190000
    Info:OTA:191000
    Info:MAIN:Time 265031, idle 30917/s, free 27384, MQTT 0(15), bWifi 1, secondsWithNoPing 264960, socks 3/38 POWERSAVE
    Info:OTA:192000
    Info:OTA:193000
    Info:OTA:194000
    Info:OTA:195000
    Info:OTA:196000
    Info:OTA:197000
    Info:OTA:198000
    Info:OTA:199000
    Info:OTA:19a000
    Info:OTA:19b000
    Info:OTA:19c000
    Info:OTA:19d000
    Info:OTA:19e000
    Info:OTA:19f000
    Info:OTA:1a0000
    Info:OTA:1a1000
    Info:OTA:1a2000
    Info:OTA:1a3000
    Info:OTA:1a4000
    Info:OTA:
    Info:OTA:close OTA, additional 0xfe0 FF added 
    Info:OTA:1a5000
    Info:OTA:close OTA, addr 0x1a5400
    Info:MAIN:Time 265032, idle 38177/s, free 44136, MQTT 0(15), bWifi 1, secondsWithNoPing 264961, socks 3/38 POWERSAVE
    Info:MAIN:Time 265033, idle 83396/s, free 55584, MQTT 0(15), bWifi 1, secondsWithNoPing 264962, socks 2/38 POWERSAVE
    Info:MAIN:Module reboot in 2...
    
    .

    At this point the controller responds correctly to buttons and scripts from autoexec.bat, no web page.
    After powering off and on everything is OK, no errors in the log, the OTA is in a newer version.
    Could it be that the NTP driver is spoiling WWW access?
    
    NTP (217.147.223.78): Local Time: 2025-08-13 20:14:44
    1 drivers active (NTP), total: 31
    Channel 1 = 0.00, Channel 2 = 1.00, Channel 3 = 1200.00, 1 repeating events, 2 event handlers
    Cfg size: 3584, change counter: 56, ota counter: 20, incomplete boots: 1
    Chip temperature: 68.2°C
    Wifi RSSI: Fair (-67dBm)
    Reboot reason: 0 - Pwr
    MQTT State: connected RES: 0(ERR_OK)
    MQTT ErrMsg:
    MQTT Stats: CONN: 1 PUB: 253 RECV: 125 ERR: 0 
    
    .

    I tried flashing to version 154 with NTP enabled - OK this time. Here I think the problem is solved.


    Now a single-channel driver with a chip on the motherboard:
    autoexec.bat slightly smaller:
    
    startDriver ntp
    //ntp_timeZoneOfs 1
    ntp_setLatlong 53.xxxxxx 22.xxxxxx
    
    setChannelLabel 1 "Light"
    
    powerSave 1
    
    //Warsaw time zone
    alias winter_time ntp_timeZoneOfs 1
    alias summer_time ntp_timeZoneOfs 2
    
    winter_time
    
    alias check1 if $month>3 then summer_time
    alias check2 if $month==3&&$mday-$day>=25&&$day>0 then summer_time
    alias check3 if $month==3&&$mday-$day>=25&&$day==0&&$hour>=2 then summer_time
    
    alias check4 if $month>10 then winter_time
    alias check5 if $month==10&&$mday-$day>=25&&$day>0 then winter_time
    alias check6 if $month==10&&$mday-$day>=25&&$day==0&&$hour>=3 then winter_time
    
    alias set_time backlog check1;check2;check3;check4;check5;check6
    waitfor NTPState 1
    set_time
    addClockEvent 03:00:01 0x01 1 set_time
    
    .
    Normal state:
    
    NTP (217.147.223.78): Local Time: 2025-08-13 21:37:54
    1 drivers active (NTP), total: 31
    Channel 1 = 0.00
    Cfg size: 3584, change counter: 18, ota counter: 10, incomplete boots: 1
    Chip temperature: 66.4°C
    Wifi RSSI: Weak (-84dBm)
    Reboot reason: 1 - Rbt
    MQTT State: not configured
    Built on Aug 10 2025 15:11:46 version 1.18.152
    Online for 3 days, 4 hours, 7 minutes and 35 seconds
    Device MAC: ======================
    Short name: obk_33CF00063, Chipset BK7231N
    

    stopDriver NTP ... OK
    Flash OTA ...
    
    0 drivers active, total: 31
    Channel 1 = 0.00
    Cfg size: 3584, change counter: 18, ota counter: 11, incomplete boots: 1
    Chip temperature: 70.1°C
    Wifi RSSI: Weak (-84dBm)
    Reboot reason: 1 - Rbt
    MQTT State: not configured
    OTA In Progress. Downloaded: 0 B Flashed: 07BFFFh
    
    .
    Automatic reboot and did not hang!
    
    NTP (217.147.223.78): Local Time: 2025-08-13 21:42:05
    1 drivers active (NTP), total: 31
    Channel 1 = 0.00
    Cfg size: 3584, change counter: 19, ota counter: 11, incomplete boots: 1
    Chip temperature: 65.9°C
    Wifi RSSI: Weak (-80dBm)
    Reboot reason: 1 - Rbt
    MQTT State: not configured
    Built on Aug 12 2025 08:52:31 version 1.18.153
    Online for 3 minutes and 20 seconds
    Device MAC: ======================
    Short name: obk_33CF00063, Chipset BK7231N
    


    I checked the flash to version 154 (file size changed? Flashed: 07AFFFh). It works with NTP enabled.

    It remained to check the slots with NTP and BL0937 drivers:
    CB2S with drivers enabled and SetupEnergyStats disabled from version 152 to 154 with no problems, although it briefly stopped at address 000FFFh.
    WB2S (BK7231T chipset) with drivers enabled and SetupEnergyStats from version 152 to 154 disabled stopped at address 075FFFh (as if the WWW stopped working, rebooting in the background), but then the driver already reported with the new version and is working.

    It remains to check SetupEnergyStats with the next version:
    WB2S (BK7231T) flash to versions 155, 156 and 158 works without problems.
    CB2S (BK7231N) flash to version 155 failed, but web access returns automatically with old OTA version. Disabling SetupEnergyStats - still no effect.
    Disabling NTP in autoexec.bat - also no effect. Flag 36 - it worked (BL0937 disabled). NTP enabled with flag 36 - worked - flash to version 156 and 158 succeeded.
    Log on failed flash to version 160:
    
    Info:OTA:init OTA, startaddr 0x12a000
    Info:OTA:12a000
    Info:OTA:12b000
    Info:OTA:12c000
    Info:OTA:12d000
    Info:OTA:12e000
    Info:OTA:12f000
    Info:OTA:130000
    Info:OTA:131000
    Info:OTA:132000
    Info:OTA:133000
    Info:OTA:134000
    Info:OTA:135000
    Info:OTA:136000
    Info:OTA:137000
    Info:OTA:138000
    Info:OTA:139000
    Info:OTA:13a000
    Info:OTA:13b000
    Info:OTA:13c000
    Info:OTA:13d000
    Info:OTA:13e000
    Info:OTA:13f000
    Info:OTA:140000
    Info:OTA:141000
    Info:OTA:142000
    Info:OTA:143000
    Info:OTA:144000
    Info:OTA:145000
    Info:OTA:146000
    Info:OTA:147000
    Info:OTA:148000
    Info:OTA:149000
    Info:OTA:14a000
    Info:OTA:14b000
    Info:OTA:14c000
    Info:OTA:14d000
    Info:OTA:14e000
    Info:OTA:14f000
    Info:OTA:150000
    Info:OTA:151000
    Info:OTA:152000
    Info:OTA:153000
    Info:OTA:154000
    Info:OTA:155000
    Info:OTA:156000
    Info:OTA:157000
    Info:OTA:158000
    Info:OTA:159000
    Info:OTA:15a000
    Info:OTA:15b000
    Info:OTA:15c000
    Info:OTA:15d000
    Info:OTA:15e000
    Info:OTA:15f000
    Info:OTA:160000
    Info:OTA:161000
    Info:OTA:162000
    Info:OTA:163000
    Info:OTA:164000
    Info:OTA:165000
    Info:OTA:166000
    
    .
    Then a break and logs of the booting system.
    One other thing I noticed - the 40 flag is on in both sockets, and still the result is in Wh, not kWh.

    Another issue - temperature. The CB3S chip, previously flashing OpenBeken, lost the firmware after the spill, but the settings remain. For now I have 1 unit for testing.
    Flash over UART (openshwprojects/BK7231GUIFlashTool), firmware version - 155
    
    NTP (217.147.223.78): Local Time: 2025-08-18 08:03:15
    1 drivers active (NTP), total: 31
    Channel 0 = 0.00, Channel 1 = 0.00, Channel 2 = 0.00, Channel 3 = 0.00, Channel 4 = 0.00
    Cfg size: 3584, change counter: 2, ota counter: 0, incomplete boots: 1
    Chip temperature: -45.5°C
    Wifi RSSI: Fair (-66dBm)
    Reboot reason: 0 - Pwr
    MQTT State: not configured
    
    .
    Now disabling NTP and rebooting does nothing, constant temperature all the time. Broken sensor?
    Flash to version 156 - no change. Maybe not exactly: for a few minutes after a hard reboot (disconnection of power supply) the temperature oscillated around 39°C, then jumped to -45.5°C and did not change anymore.

    I obtained another CB3S, first sflashing via UART, then several OTA versions (lowest 129, highest 158) and still the same:
    
    0 drivers active, total: 31
    Cfg size: 3584, change counter: 6, ota counter: 4, incomplete boots: 1
    Chip temperature: -45.5°C
    Wifi RSSI: Weak (-82dBm)
    Reboot reason: 1 - Rbt
    MQTT State: not configured
    
    .
    Pure flash with no scripts and no GPIO configuration.
ADVERTISEMENT