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 enable/disable function to wallbox users #327

Open batti opened 7 months ago

batti commented 7 months ago

Add a enable/disable function to be able to disable wallbox users temporarily.

rtrbt commented 7 months ago

A user with an allowed current of 0 A can't charge. However the web interface (not the backend!) currently does not allow setting the current below 6 A.

janknieling commented 4 months ago

I think it will be useful to drop all deleted users after implementing this (or provide a function to restore deleted user with 0A charging or disabled flag). In my opinion it is better to provide a function to disable/enable users via flag instead of setting their allows current to 0A because it is clearer if you have a list of enabled and disabled users. I have deleted a user max.mustermann some time ago because the user shouldn’t have the opportunity to charge. Now I would like to reautorize the user/recreate the user what is impossible because the charger said that there is a user with this name already existent

rtrbt commented 4 months ago

In my opinion it is better to provide a function to disable/enable users via flag instead of setting their allows current to 0A because it is clearer if you have a list of enabled and disabled users.

Good point. We probably should use a toggle switch in the UI (that still maps to 0 A on the API) and show disabled user accounts greyed out or similar.

I have deleted a user max.mustermann some time ago because the user shouldn’t have the opportunity to charge. Now I would like to reautorize the user/recreate the user what is impossible because the charger said that there is a user with this name already existent

This is probably because there are charges tracked for this user. We store the user and display names of deleted users as long as there are still charges to be able to show them in charge logs. Currently there is no way to remove only some tracked charges (implementing this is part of https://github.com/Tinkerforge/esp32-firmware/issues/329 ), so to be able to recreate this user, you would have to remove all tracked charges.