nordicopen / easee_hass

Custom component for Easee EV charger integration with Home Assistant
209 stars 34 forks source link

Add sensor for voltage from charger #97

Closed esnil closed 3 years ago

esnil commented 3 years ago

The charger can report voltage during charging wich can be useful in understanding the health of the installation. More specifically, I had problem with the car refusing to charge properly and it seems as the low voltage ( 190V and below at some specific conditions) might have been the cause. Beeing able to monitor the phase voltages at the charging point would be valueable.

In the Easee API the voltages seems to be reported in /api/chargers/{id}/state with the following response

{ "smartCharging": true, "cableLocked": true, "chargerOpMode": 1, "totalPower": 0, "sessionEnergy": 0, "energyPerHour": 0, "wiFiRSSI": 0, "cellRSSI": 0, "localRSSI": 0, "outputPhase": 0, "dynamicCircuitCurrentP1": 0, "dynamicCircuitCurrentP2": 0, "dynamicCircuitCurrentP3": 0, "latestPulse": "2021-02-09T09:44:41.971Z", "chargerFirmware": 0, "latestFirmware": 0, "voltage": 0, "chargerRAT": 0, "lockCablePermanently": true, "inCurrentT2": 0, "inCurrentT3": 0, "inCurrentT4": 0, "inCurrentT5": 0, "outputCurrent": 0, "isOnline": true, "inVoltageT1T2": 0, "inVoltageT1T3": 0, "inVoltageT1T4": 0, "inVoltageT1T5": 0, "inVoltageT2T3": 0, "inVoltageT2T4": 0, "inVoltageT2T5": 0, "inVoltageT3T4": 0, "inVoltageT3T5": 0, "inVoltageT4T5": 0, "ledMode": 0, "cableRating": 0, "dynamicChargerCurrent": 0, "circuitTotalAllocatedPhaseConductorCurrentL1": 0, "circuitTotalAllocatedPhaseConductorCurrentL2": 0, "circuitTotalAllocatedPhaseConductorCurrentL3": 0, "circuitTotalPhaseConductorCurrentL1": 0, "circuitTotalPhaseConductorCurrentL2": 0, "circuitTotalPhaseConductorCurrentL3": 0, "reasonForNoCurrent": 0, "wiFiAPEnabled": true, "lifetimeEnergy": 0, "offlineMaxCircuitCurrentP1": 0, "offlineMaxCircuitCurrentP2": 0, "offlineMaxCircuitCurrentP3": 0 }

Suggestion is to either implement support for the inVoltageTxTy or to implement all parameters above.

esnil commented 3 years ago

I'd be happy to act as tester in this if someone is willing to do the coding part!

tmjo commented 3 years ago

Hi! Maybe I'm missing something, but isn't the voltage sensor what you're asking for?

image

esnil commented 3 years ago

Sorry, I did miss that! Case closed, this is exactly what I was looking for. Thanks a lot for the good work!

esnil commented 3 years ago

Just to clearify for future readers of this post. It seem that the paramters state_inVoltageT2T3,state_inVoltageT2T4 and state_inVoltageT2T5 corresponds to the reading for L1, L2 and L3 in the easee cloud app. It is not clear to me what the other readings is actually meassuring.

tmjo commented 3 years ago

To my understanding T in Easee nomencalture here is Terminal. The Easee box has five terminals and each voltage is then between terminals as specified by the number in its name. What is what will depend on your network system (IT, TT, TN) and if it is one-phase or three-phase. Terminal 1 is always ground (PE).

image

image

See Easee manual here for more info. In my case I have IT 1-phase, so you see T1T2 and T1T3 are phase voltages (i.e. phase-to-ground) of approx 230V / sqrt(3) ~ 133V while T2T3 is my line voltage (i.e. phase-to-phase) of approx 230V. In a 400V TN 3-phase system which is more common you'll see approx 400V between T3T4, T3T5 and T4T5 while you will see approx 400V / sqrt(3) ~ 230V on T2T3, T2T4 and T2T5.