twhittock / eo_mini

EO Mini integration for Home Assistant
MIT License
12 stars 6 forks source link

Current consumption #7

Open ninoz opened 8 months ago

ninoz commented 8 months ago

I previously had an EO Mini which was linked to the Enel X (JuiceNet) Platform. The integration exposed an "Car Charger Power" entity which gave an estimate of the point in time power the car was drawing. This allowed me to add that to the Power Flow Car Plus card as secondary information so i could see live what was being pulled but also minus the car usage from the home usage.

Looking at the EO Smart Home app it also has a "EV Charge Rate" value displayed within the app. I've put the app through a proxy to intercept the requests and observed the following:

GET //api/session/ HTTP/1.1

And the response:

HTTP/1.1 200 OK
Content-Length: 228
<headers>
X-AspNet-Version: 4.0.30319
X-Powered-By: ASP.NET

{"USID":13533350,"CPID":20356,"PiTime":1702464297,"ESTime":0,"ESCost":0,"**ESKWH":422360**,"ChargingTime":60,"PayR1":0,"PayR2":0,"PayR3":0,"PayR4":0,"ULoc":"","Location":"EO Mini","Voltage":230,"IsPaused":false,"IsOverridden":false}

I think the ESKWH value matches to the estimated power being pulled by the charger at that point in time.

I'm not sure if its possible to expose this value as an entity?

Thanks :)

twhittock commented 5 months ago

ESKWH is the value stored in the "consumption" sensor. it's stored in a total state class to give details on total charge used.

An estimate for current charge could be done as with #9 i think...

It's unclear to me how to get any better result than that. The ESKWH doesn't go to zero after the charge is complete, IIRC.