egnerfl / alfen_wallbox

Alfen wallbox - Home Assistant Component
MIT License
33 stars 12 forks source link

Add sensors and service to switch 1-phase and 3-phase charging #6

Closed Emacee closed 11 months ago

Emacee commented 1 year ago

Hi,

I'm trying to add some sensor to this custom components to be able to track the status of the charging station.

I would like to see the following sensor that I used to read from the charging station;

I can see the API ID's in the following code: https://gitlab.com/LordGaav/alfen-eve/-/blob/develop/alfeneve/alfen.py

However the formatting is different than the ID's used in this custom component. Any clues on how to determine what the right ID should be so I can try to add these sensor to the code of this component? Is there any API documentation availble? Would be nice to be able to switch between 1-phase and 3-phase charging through this integration as well.

Dominic-070 commented 1 year ago

That would be absolutely great.

lohralfen commented 1 year ago

As for the phase switching: as long as 2185_0 (enable phase switching) is enabled, this could work by setting 2189_0 (max allowed phases) to either 1 (single phase charging) or 3 (triple phase charging). Not sure if you need the 6.3.x firmware version for this, might work with older versions as well.

leeyuentuen commented 1 year ago

enable and disable phase switching is possible on the MR also the following value is included

mahil4711 commented 1 year ago

Have done some manual testing concerning the phase switching on a box with firmware 5.8.1-4123. Allthough 2185_0 (enable phase switching) is 0 (disabled), I was able to set 2189_0 (max allowed phases) to either 1 or 3. But this needs to be set before the charging process starts. Changing this value afterwards has no effect on a running charging process.

lohralfen commented 1 year ago

Have done some manual testing concerning the phase switching on a box with firmware 5.8.1-4123. Allthough 2185_0 (enable phase switching) is 0 (disabled), I was able to set 2189_0 (max allowed phases) to either 1 or 3. But this needs to be set before the charging process starts. Changing this value afterwards has no effect on a running charging process.

You're not using the latest firmware, but regardless of that I'm not sure if latest firmware already supports to change this during charging session. Version 6.5.0 will support this, though this version will take a while longer to be released since currently 6.4.0 is being tested. Currently it's only via OCPP ChargingProfiles that phases can be switched during the session, I think.

mahil4711 commented 1 year ago

@lohralfen: A bit off topic, but do you know of any possiblity to start a charging session over this API? Background: I have 2 different RFID cards, with which I start normally the charging session, after the cable was plugged. Both are billed differently. So is there a way to use the API to do that?

lohralfen commented 1 year ago

@lohralfen: A bit off topic, but do you know of any possiblity to start a charging session over this API? Background: I have 2 different RFID cards, with which I start normally the charging session, after the cable was plugged. Both are billed differently. So is there a way to use to API to do that?

Currently not possible, as it's just supposed to be an interface for maintenance & configuration. It will become possible in the future, but not any of the upcoming releases.

Dominic-070 commented 1 year ago

Check this fork https://github.com/leeyuentuen/alfen_wallbox