Tinkerforge / esp32-firmware

Firmwares for ESP32 Brick and ESP32 Ethernet Brick (including firmwares for WARP/WARP2 Charger, WARP Energy Manager)
https://www.tinkerforge.com/en/doc/Hardware/Bricks/ESP32_Ethernet_Brick.html
26 stars 20 forks source link

Add charge slot to enforce meter availability. #226

Closed rtrbt closed 1 year ago

rtrbt commented 1 year ago

Add a new charge slot that only unblocks in CHARGE_STATE_WAITING_FOR_RELEASE if the meter is available. (We have to couple this somehow with the tracking of the charge start). If this slot is active, we make sure that every tracked charge has a known start value. Missing end values can be recovered once #213 is implemented.

Also add a configuration to the users sub-page to enable/disable this slot.

Edit: Also add more sanity checks to the meter values. I.e. only allow charging if the meter value currently is >= the last end value. If we add this, we have to make sure replacing the energy meter is still possible.

rtrbt commented 1 year ago

Fixed with 40d211f4