OpenEVSE / openevse_esp32_firmware

OpenEVSE V4 WiFi gateway using ESP32
153 stars 107 forks source link

Feature request: Password-protected current limit #866

Open swansontec opened 1 week ago

swansontec commented 1 week ago

According to the NEC, an EVSE installer needs to size the breaker & wires according to the nameplate rating, or they can use a smaller breaker & wires if the current setting is either:

See 625.42 of NEC 2023.

Since the OpenEVSE firmware has no password protection on the current-limit setting, forces us to use the nameplate rating of 48A. Anything else would be a code violation. This makes it illegal to use the NEMA 14-50 plug included in the kit, since that requires a 40A current limit (40A x 125% = 50A).

The simplest way to solve this would be to add a "commissioning password" that only applies to the settings on the "EVSE" page. These settings, such as the current limit, 3-phase vs 2-phase, level 1 vs. level 2 charging, etc., all depend on the installed hardware, and generally shouldn't be changed once the unit is physically assembled. It makes sense to configure these are part of the "commissioning" step, and then lock them from future changes. Other settings would remain user-configurable, such as the WiFi password, charging schedule, or API integrations.

Another option would be to install a physical jumper on one of the boards. Setting this jumper would lock the EVSE settings, preventing modification in software. To change the setting, one would have to physically unscrew the cover to remove the jumper. This option requires hardware changes, though, so that wouldn't work for existing owners.

Dicion commented 1 week ago

It meets NEC out of the box by requiring a password to initially connect to the device in AP mode to make any and all settings. It can be left and operate in this mode indefinitely, or even with a custom password. This will meet NEC Requirements for access.

However, a password protected current change on the page isn't a bad idea. Maybe make it default to the last 4 of the mac address of the wifi controller or something that's different per unit, but easy to find/get.

You might want to post it over on the actual web ui repo as well:

https://github.com/OpenEVSE/openevse-gui-v2/

jeremypoulter commented 1 week ago

The OpenEVSE module has a write once current setting for this sort of thing, however we don't currently use this in the UI.

Dicion commented 1 week ago

The OpenEVSE module has a write once current setting for this sort of thing, however we don't currently use this in the UI.

That requires a full reflash to change again once set IIRC, correct?. This request is more, repeatedly settable, but with a restricted password/access ability. But yes, that certainly meets the 'tool access' requirement as well, as it requires opening the case to reflash the module every time you want to change it, and no one but a 'qualified person' will know how to reflash.

swansontec commented 1 week ago

Thanks! I did not know about the write-once current setting. Is there documentation somewhere for that? I'm guessing that it involves editing the code and then flashing the customized firmware. This would solve the immediate problem with my electrical inspection.

I still think the UI should separate "stuff only an installer should access" from "stuff my family can access". I guess this could be done with "soft security" on the UI side, where the EVSE firmware remains unchanged, but the front-end prevents editing the fields.