SAIC-iSmart-API/saic-home-assistant-addon

Updates in real time MG4

Closed this issue · 5 comments

I've set up the MG4 with Home Assistant and it's going very well. The only issue I have is that it doesn't start updating the information unless I force it using the gateway refresh mode to force. I have the default values for all gateways. Is there a way to have it start updating as soon as the door is opened, for example?

I am starting with the design but I stopped as I found the starting of the update is not in real-time.

Any help?
Captura de pantalla 2024-03-05 a las 16 30 37

In short: No!

The only active message from car to gateway is the engine start message. Opening or other things doesn't work because you need to pull the status first.
The only known way without battery drain is to open the car with mqtt / home assistant, so it sends a force command to get the actual status.

The gateway is not really an API. It emulates the app login to get all data to mqtt.

Realtime data drains your 12V battery over night so you cannot start your car next morning :)

Hi, thanks for your support.

I am using phyton MQTT gateway. Now, I do understand that this is not really an API but just a gateway and the only event capable of starting the update is the engine start message. But I cannot find this value or something similar among the 70 sensors that Home Assistant show me.

I guess I am doing something wrong or I have to use other approach to get the info.

I made the test. I sarted the car, moving and nothing was updated. Then, once I force the refresh mode, it´s working fine.

By the way, as you can imagine, I am not an expertise in phyton, java, and these strange things. ;)

image

Please check your addon logfile for the "check for new messages" job. Every 1 minute the gateway checks the mg servers for an engine-start-message. After a successful check the gateway starts polling every 30s (default), so there is nothing to do for you to start it.

@manulena if the current add-on version doesn't work please try the legacy version (uninstall the new one first) from this same repo. If that version automatically refreshes the car state once you start driving then we may have a regression.

Tonno87, I found it. I had the value in 6000... that´s why the checking was every 1h40m. Now I updated the figure to 60s and it´s working. Now, I have to investigate why I have CommandNumber=4 while you have none. I cannot find where to play with these values.

Captura de pantalla 2024-03-07 a las 8 51 17

Anyway, It´s working and I don´t want to bother you anymore!!!
It´s solved.
Thanks @Tonno87 and @nanomad for your support!!!!