logo elektroda
logo elektroda
X
logo elektroda

OBK OTA Update Fails on BK7231N Smart Plugs: Stuck on Version 1.18.145

blacksun2 309 7
ADVERTISEMENT
  • #1 21630557
    blacksun2
    Level 8  
    Hello,

    all my smart Plugs with Chipset BK7231N are on OBK V 1.18.145
    After 1.18.146 and 1.18.147 were released, I wanted to update via OTA (config -> OTA and WebApp-> OTA) but this doesn't work.
    After pressing start button for OTA, the device reboots but the version of OBK keeps 1.18.145.

    I have rbl file for 1.18.146, 1.18.147, 1.18.144, 1.18.140. Nothing worked.

    What can I solve this without opening and make a serial flashing?

    Thanks.
  • ADVERTISEMENT
  • #2 21630710
    divadiow
    Level 36  
    I have successfully OTAd from .145 to .149 on a blank test device. What are your pin assignments and autoexec if you have one configured? I can mimic and try OTA again
  • ADVERTISEMENT
  • #3 21630826
    blacksun2
    Level 8  
    divadiow wrote:
    ...blank test device. What are your pin assignments and autoexec ...


    I suppose it has to do with my flags-config:
    Flags 134743044

    Because more and more devices use TuyaMCU, I am configuring all my devices via autoexec.bat, also the PIN-only-devices like smart plugs:
    //clearIO
    PowerSave 1
    Flags 134743044
    startDriver BL937
    SetupEnergyStats 1 60 1440 1
    startDriver NTP
    ntp_setServer fritz.box
    ntp_timeZoneOfs 2
    waitFor NTPState 1
    //startDriver TuyaMCU
    //startDriver tmSensor
    mqtt_broadcastInterval 30
    mqtt_broadcastItemsPerSec 30
    waitFor MQTTState 1
    //tuyaMcu_defWiFiState 4
    //tuyaMcu_sendQueryState
    
    delay_s 5
    setPinRole 6 BL0937CF
    setPinChannel 6 0
    setPinRole 7 BL0937CF1
    setPinChannel 7 0
    setPinRole 8 Rel
    setPinChannel 8 1
    setPinRole 23 WifiLED_n
    setPinChannel 23 0
    setPinRole 24 Btn
    setPinChannel 24 1
    setPinRole 26 BL0937SEL
    setPinChannel 26 0
    setStartValue 0 1
    setStartValue 1 1
    
    delay_s 5
    DeviceName "OpenBKsteckdoseTVwohn"
    DeviceShortName "OpenBKsteckdoseTVwohn"
    MqttHost ha.fritz.box
    MqttPort 1883
    MqttUser MQTT
    //MqttPassword 
    MqttClient OpenBKsteckdoseTVwohn
    MqttGroup bekens_n
    WiFiSsid MySSID
    //WiFiPass WlanPasswort
    
    delay_s 5
    setChannelLabel 1 SchalterOBKtvWohn
    delay_s 5
    scheduleHADiscovery
    


    by this, you have the whole config at one place and make a backup of config much easily.

    with a blank device config with this autoexec.bat, I could make an update of OBK:
    
    clearIO
    Flags 0
    
  • #4 21631890
    blacksun2
    Level 8  
    >>21630826

    After new versions of OBK were released, I investigated the problem further.
    Starting with my autoexec.bat, I found the line causing the problem:

    SetupEnergyStats 1 60 1440 1


    The problem appears as follows in the web interface:
    OTA interface with uploaded file and missing Reboot button after update starts

    The reboot is triggered too early. The "Reboot" entry in the web interface does not appear.
  • ADVERTISEMENT
  • #5 21631911
    p.kaczmarek2
    Moderator Smart Home
    Probably this is related to this:
    https://www.elektroda.com/rtvforum/topic4133787.html
    It looks like we need to stop all drivers when OTA is running. I was kinda sure we already do it? I need to check.
    Helpful post? Buy me a coffee.
  • ADVERTISEMENT
  • #6 21632060
    blacksun2
    Level 8  
    p.kaczmarek2 wrote:
    I was kinda sure we already do it? I need to check.


    I also think that stopping the drivers was already installed in OBK.
    Before version 1.18.143, the said line made no trouble.
  • #7 21632081
    p.kaczmarek2
    Moderator Smart Home
    I can see there are some ota_progress guards in some places, but DRV_RunQuickTick is still called without it.
    Helpful post? Buy me a coffee.
  • #8 21638691
    blacksun2
    Level 8  
    >>21632081
    Just FYI.
    I read in the changelog for version 1.18.155 that there have been some OTA fixes. I just wanted to let you know that OTA isn't working yet with "Flags 134743044" and the mentioned autoexec.bat.

Topic summary

Smart plugs based on the BK7231N chipset running OBK firmware version 1.18.145 fail to update via OTA to versions 1.18.146 and 1.18.147. Attempts to initiate OTA updates through both device configuration and WebApp cause the device to reboot but retain the original firmware version. Multiple rbl firmware files including 1.18.140, 1.18.144, 1.18.146, and 1.18.147 have been tested without success. A successful OTA update from 1.18.145 to 1.18.149 was reported on a blank test device, suggesting the issue may relate to specific device configurations. The device uses a flags configuration value of 134743044 and an autoexec.bat script that configures power saving, drivers (BL937, NTP), MQTT settings, and pin roles for BL0937CF energy monitoring and relay control. The problem may be linked to these custom flags or autoexec settings, as the user seeks a solution avoiding serial flashing.
Summary generated by the language model.
ADVERTISEMENT