From f692464fbf23294c57f41c8a6ec87e92fd566668 Mon Sep 17 00:00:00 2001 From: KipK Date: Mon, 20 Feb 2023 16:13:46 +0100 Subject: [PATCH 1/3] Unlock openEvse at evseBoot() if compiled with BOOTLOCK --- openevse-gui-v2 | 1 + src/evse_monitor.cpp | 15 ++++++++++++++- 2 files changed, 15 insertions(+), 1 deletion(-) create mode 160000 openevse-gui-v2 diff --git a/openevse-gui-v2 b/openevse-gui-v2 new file mode 160000 index 00000000..606377e6 --- /dev/null +++ b/openevse-gui-v2 @@ -0,0 +1 @@ +Subproject commit 606377e6f6e2bd36de7a3efd3005601ded791a8e diff --git a/src/evse_monitor.cpp b/src/evse_monitor.cpp index 11e07a28..bc32185a 100644 --- a/src/evse_monitor.cpp +++ b/src/evse_monitor.cpp @@ -273,6 +273,19 @@ 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 if compiled with BOOTLOCK + _openevse.clearBootLock([this](int ret) + { + if(RAPI_RESPONSE_OK == ret) + { + DBUGF("Unlocked OpenEVSE"); + } + else { + DBUGF("Unlock OpenEVSE failed") + } + + }); } void EvseMonitor::updateEvseState(uint8_t evse_state, uint8_t pilot_state, uint32_t vflags) @@ -312,7 +325,7 @@ void EvseMonitor::updateEvseState(uint8_t evse_state, uint8_t pilot_state, uint3 } void EvseMonitor::verifyPilot() { - // After some state changes the OpenEVSE module compiled with PP_AUTO_AMPACITY will reset to the maximum pilot level, so reset to what we expect + // OpenEVSE module compiled with PP_AUTO_AMPACITY will reset to the maximum pilot level, so reset to what we expect _openevse.getCurrentCapacity([this](int ret, long min_current, long max_hardware_current, long pilot, long max_configured_current) { if(RAPI_RESPONSE_OK == ret && pilot > getPilot()) From 830f21a6ebe6bfbd907b232146b9bcb21295f22b Mon Sep 17 00:00:00 2001 From: KipK Date: Mon, 20 Feb 2023 21:19:30 +0100 Subject: [PATCH 2/3] upgrade openevse lib version --- platformio.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/platformio.ini b/platformio.ini index 80149c01..5478efac 100644 --- a/platformio.ini +++ b/platformio.ini @@ -35,7 +35,7 @@ lib_deps = jeremypoulter/ArduinoMongoose@0.0.18 jeremypoulter/Micro Debug@0.0.5 jeremypoulter/ConfigJson@0.0.5 - jeremypoulter/OpenEVSE@0.0.11 + jeremypoulter/OpenEVSE@0.0.12 jeremypoulter/ESPAL@0.0.3 jeremypoulter/StreamSpy@0.0.1 jeremypoulter/MicroTasks@0.0.2 From b6e871b5029e1299e4ec4d77cf4c7d0801bc5a25 Mon Sep 17 00:00:00 2001 From: KipK Date: Wed, 22 Feb 2023 07:56:52 +0100 Subject: [PATCH 3/3] remove gui v2 --- openevse-gui-v2 | 1 - 1 file changed, 1 deletion(-) delete mode 160000 openevse-gui-v2 diff --git a/openevse-gui-v2 b/openevse-gui-v2 deleted file mode 160000 index 606377e6..00000000 --- a/openevse-gui-v2 +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 606377e6f6e2bd36de7a3efd3005601ded791a8e