diff --git a/src/evse_monitor.cpp b/src/evse_monitor.cpp index 9c23c53d..76a00e7b 100644 --- a/src/evse_monitor.cpp +++ b/src/evse_monitor.cpp @@ -253,6 +253,12 @@ void EvseMonitor::evseBoot(const char *firmware) _openevse.heartbeatEnable(EVSE_HEATBEAT_INTERVAL, EVSE_HEARTBEAT_CURRENT, [this](int ret, int interval, int current, int triggered) { _heartbeat = RAPI_RESPONSE_OK == ret; }); + + // unlock openevse fw compiled with BOOTLOCK + if (isBootLocked()) { + unlock(); + DBUGLN("Unlocked BOOTLOCK"); + } } void EvseMonitor::updateEvseState(uint8_t evse_state, uint8_t pilot_state, uint32_t vflags) diff --git a/src/main.cpp b/src/main.cpp index be1562e0..f2a5fd3f 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -200,12 +200,6 @@ loop() { import_timers(&scheduler); } - // unlock openevse fw compiled with BOOTLOCK - if (evse.isBootLocked()) { - evse.unlock(); - DBUGLN("Unlocked BOOTLOCK"); - } - // ------------------------------------------------------------------- // Do these things once every 2s // -------------------------------------------------------------------