This is a custom component to allow control of Alfen Wallboxes in HomeAssistant.
The component is a fork of the Garo Wallbox custom integration and egnerfl custom integration
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
https://github.com/leeyuentuen/alfen_wallbox/wiki/API-paramID
If you do not have HACS installed yet visit https://hacs.xyz for installation instructions.
To add the this repository to HACS in your Home Assistant instance, use this My button:
After installation, please reboot and add Alfen Wallbox device to your Home Assistant instance, use this My button:
Manual configuration steps
- In HACS, go to the Integrations section and add the custom repository via the 3 dot menu on the top right. Enter
https://github.com/>> leeyuentuen/alfen_wallbox
in the Repository field, choose theIntegration
category, then click add. Hit the big + at the bottom right and search for Alfen Wallbox. Click it, then click the download button.- 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.
The wallbox can be configured using the Integrations settings menu:
Categories can be configured to refresh at each specified update interval. Categories that are not selected will only load when the integration starts. The exception to this rule is the transactions
category, which will load only if explicitly selected.
To locate a category, start by selecting all categories. Allow the integration to load, then find the desired entity. The category will be displayed in the entity's attributes.
Reducing the number of selected categories will enhance the integration's update speed.
The Alfen charger allows only one active login session at a time. This means the Alfen MyEve or Eve Connect app cannot be used concurrently with the Home Assistant integration.
To manage this, the integration includes two buttons: HTTPS API Login and HTTPS API Logout.
- To switch to the Alfen app: Click the Logout button in the Home Assistant integration, then use your preferred Alfen app.
- To return to the integration: Click the Login button to reconnect the Home Assistant integration.
The HTTPS API Login Status binary sensor shows the current state of the login session.
Example of running in Services: Note; The name of the configured charging point is "wallbox" in these examples.
service: alfen_wallbox.set_green_share
data:
entity_id: number.wallbox_solar_green_share
value: 80
service: alfen_wallbox.set_comfort_power
data:
entity_id: number.wallbox_solar_comfort_level
value: 1400
service: alfen_wallbox.enable_phase_switching
data:
entity_id: switch.wallbox_enable_phase_switching
service: alfen_wallbox.disable_phase_switching
data:
entity_id: switch.wallbox_enable_phase_switching
service: alfen_wallbox.enable_rfid_authorization_mode
data:
entity_id: select.wallbox_authorization_mode
service: alfen_wallbox.disable_rfid_authorization_mode
data:
entity_id: select.wallbox_authorization_mode
service: alfen_wallbox.reboot_wallbox
data:
entity_id: alfen_wallbox.garage