KipK / openevse-gui-v2

OpenEVSE WiFi Gateway User Interface (V2)
BSD 2-Clause "Simplified" License
5 stars 2 forks source link

Cleanup: Energy Meter precision #32

Closed fhteagle closed 1 year ago

fhteagle commented 1 year ago

Session gives hundredths of a kWh (2 numbers right of decimal point), the rest of the items give only tenths (1 number right of decimal). It would be more legible to have all the same precision. I think tenths of a kWh is plenty of precision....

Screenshot_20230306_072437

KipK commented 1 year ago

We can display it with one digit here but I'd like to keep it 2 digits for the status bar and limits countdown. This gives a better feeling that energy is coming seeing the counter continuously increasing with elapsed counter.

fhteagle commented 1 year ago

More precision on status bar makes sense to me too. Same precision in same "area" of the display is legible. Different precision, especially in columns, is harder to scan quickly.

KipK commented 1 year ago

fixed in master

KipK commented 1 year ago

@fhteagle , I see in the screen capture above, your total is only 1.4kwh. Is it a brand new openevse or have you reset the counter on the OpenEvse firmware ?

Because it should import first time the old counter from OpenEvse. Would like to know if it failed or if its just because you had no data yet on it.

fhteagle commented 1 year ago

@KipK -

Good catch. Lifetime on that unit was about 985kWh at the time that screen shot was taken. Lifetime use reports correctly to my HomeAssistant dashboard still. This line in /status endpoint also seems to be reporting about 4kWh delivered through the unit during lifetime, right?

"total_energy":4.667996599,

No idea if one of the firmware flashes I have been doing to help test cleared something. Odd that it would report differently to HA than to endpoint / GUI..........

KipK commented 1 year ago

@fhteagle total_energy was stored from the OpenEvse module, it can only be reset if you fully erase the Atmega before flashing it ( or perhaps with some RAPI commands but I don't think so ). It is now handled from the wifi fw, so it seems it has failed importing it on your side. Can you give me what $GU rapi command gives ? ( in Developper section )

I don't know where 'Lifetime' comes from on your HA. It's probably an accumulator handled by your HA instance

fhteagle commented 1 year ago

The HomeAssistant integration that pulls data from the OpenEVSE does not keep its own accumulation of hours, only what the OpenEVSE reports AFAIK.

$GU < $OK 7739264 990708^15

Energy meter total now shows 6.8kWh

KipK commented 1 year ago

The only total provided by the fw is total_energy, there's no other value shared.

KipK commented 1 year ago

I've found the import issue, In fact it imported, but divided the kwh / 1000 ( thought it was watt ) .

Here is a new build that fix it: https://drive.google.com/file/d/1FUoUDw5dxt1oNGdZbzbvlINi1uz9pAYp/view?usp=sharing

you can now reset the energyMeter by calling an http DELETE to /emeter with the following JSON in body: {"hard": 1, "import": 1}

it should put everything to 0 then import the old counter

fhteagle commented 1 year ago

Yep, that firmware + method fixed the lifetime display, now showing 1001 kWh, which is a reasonable for this unit. Thanks.

KipK commented 1 year ago

it's not only the display, it's the data stored in the flash that were stored wrong.

That's why I'm surprised it wasn't updated on HA as it published the value without the import. Probably HA missed the socket update