This is a custom component to allow control of Alfen Wallboxes in HomeAssistant.
The component is a fork of the Garo Wallbox custom integration.
Example of running in Services: Note; the name of the configured charging point is "wallbox" in these examples.
Changing Green Share %
service: alfen_wallbox.set_green_share
data:
entity_id: sensor.wallbox
value: 95
Changing Comfort Charging Power in Watt
service: alfen_wallbox.set_comfort_power
data:
entity_id: sensor.wallbox
value: 1450
Enable phase switching
service: alfen_wallbox.enable_phase_switching
data:
entity_id: sensor.wallbox
Disable phase switching
service: alfen_wallbox.disable_phase_switching
data:
entity_id: sensor.wallbox
After reverse engineering the API myself I found out that there is already a python libary wrapping the Alfen API. https://gitlab.com/LordGaav/alfen-eve/-/tree/develop/alfeneve
If you do not have HACS installed yet visit https://hacs.xyz for installation instructions. In HACS go to the Integrations section hit the big + at the bottom right and search for Alfen Wallbox.
Clone or copy this repository and copy the folder 'custom_components/alfen_wallbox' into '/custom_components/alfen_wallbox'
Once installed the Alfen Wallbox integration can be configured via the Home Assistant integration interface where you can enter the IP address of the device.
The wallbox can be added to the Home Assistant Energy Dashboard using the _meter_reading
sensor.