SAIC-iSmart-API / saic-python-mqtt-gateway

A service that queries the data from an MG iSMART account and publishes the data over MQTT and to other sources
MIT License
71 stars 21 forks source link

Gateway charging refresh period - First Value is too high #170

Closed Tonno87 closed 7 months ago

Tonno87 commented 8 months ago

Hi,

please take a look at this:

Screenshot 2024-02-18 10 58 49

The first value of the refresh period is too high:

The first charge starts @ 06:00:25 with 36,7% soc @ 06:00:28, next soc value @ 06:17:01. The gateway calculates a refresh of 975s, next value is 185s.

The second charge starts @ 08:24.45 with 56,5% soc @ 08:24:48, next soc value @ 08:48:53. The gateway calculates a refresh of 1428, next value is 187s.

image

nanomad commented 7 months ago

Uhm, I think we should probably let the "charging" power stabilise then. Can you post the drivetrain power chart as well?

Tonno87 commented 7 months ago

Another day with the power values: Screenshot 2024-03-03 21 51 19 Screenshot 2024-03-03 21 51 35 Screenshot 2024-03-03 21 51 50

nanomad commented 7 months ago

Actually, @Tonno87 i think it's easier if you export the CSV data of the following (HA has the export finally)

Tonno87 commented 7 months ago

HomeAssistant.csv

Hope this helps. My MG5 SR Luxury can't use the TargetSoc function, so it's always on 100%. I'm using EVCC instead.

nanomad commented 7 months ago

Thanks, I'll look at those tonight

nanomad commented 7 months ago

@Tonno87 Feel free to try the new RC, I've reworked the refresh interval computation to avoid using values close to 0 for the power consumption

Tonno87 commented 7 months ago

Thanks, i will test it tomorrow.

Tonno87 commented 7 months ago

Seems to work now:

Screenshot 2024-03-10 11 07 06

Good work!