MG Motor Mg5 Electric Car Integration

I just bougth an electric car, a MG5 LR from MG Motors, it has an android app called MG iSmart thar conects with the car and gets all forms of informations including SOC of battery and it woul be nice to have that information on my HA dashboard.

2 Likes

Would be very interested into that too after I own an MG5 since 6 days as well.

MG ZS EV here with the same tech onboard. Charging from level 1 charger at the moment controlled by a zigbee switch but will be installing a Fronius WattPilot soon and keen to see what other information could be pulled into HA.

The all new MG 4 uses the ismart App also.

Some Work ist done by openhab user Markus Heberling

And the Reverse engeneering:

maybe there is a programmer able to port this. unfortunately I can’t.

3 Likes

I have one MG ZS EV, and one MG 4.
If there is a way to connect them (the data) to Home Assistant, I would support the effort! Buy a beer, or more to be clear…!

So far I have found this promising attempt:

I haven’t been successful yet in retrieving values from my Marvel R though. Please let me know if this early phase add-on works for any of you.

Edit: The add-on works only if you login with email. Currently it doesn’t work with mobile number as username.

for us core users who dont have addons, will this come as a HACS installation? i´d love to show this on my HA

1 Like

The project has moved to: SAIC-iSmart-API

@kexan82: First step: addons, next step: HACS . But there’s no timeline at the moment.

1 Like

Is this a side project of or a replacement for the saic api gateway? I switched to hassio to run these so

The project was splitted up into subprojects as mentioned here:https://github.com/ReverseEngineeringDE/SAIC-API-Documentation

But at the moment there are only the two mqtt gateways, python and java.

1 Like

I can read out all the data I need of my MG4 using the python mqtt gateway in homeassistant including the gps coordinates but according to the documentation this data is only updated once a day when the car is off/idle because of the 12V battery. Has anyone attempted to increase the frequency without causing issues with the battery ? What is the sweet spot ?

Also, is it in the plans to add the feature to start/stop charging? Is it even doable? This would come handy for energy management with solar panels.

Those are configurable: GitHub - SAIC-iSmart-API/saic-python-mqtt-gateway

The threshold at which it causes a problem will depend on your car’s use schedule. I managed to drain down my LEAF whilst developing the leaf2mqtt original project, and it needed jump-starting from another vehicle — neither car charges the 12V battery from the traction battery whilst off, for safety reasons.

That’d be better asked on the GitHub project. I charge my MG4 using the charger API rather than the car — I suspect that’d be more reliable.

EDIT:

So with some heavy duty googling i found most of the info i needed myself, or rather, thanks to tonnos post on the MG forums here:

I leave this here for others who struggle, if you get the MQTT and gateway working ( i used python) you need to manually configure sensors using the below example (For SOC).
You will find the topic structure here, so just schange the path to correspond with your info.

mqtt:
  sensor:
    - name: mg5_soc
      unique_id: uniqueid__mg5_soc
      state_topic: "saic/[email protected]/vehicles/LSJEYOURVINHERE/drivetrain/soc"
      value_template: "{{ value }}"
      unit_of_measurement: "%"

EDIT 2:
Found the refresh, you will need these two sensors. the first one is a setting for how to refresh the data , the second will give you an option in seconds for refreshing. setting it to MAX will ping once a day ( i think?) both are added to the mqtt: in config yaml.

Additionally you will need the following topic to refresh your soc:

select:
  - name: "MQTT Gateway Refresh Mode"
    unique_id: uniqueid__saic_mqtt_gateway_refresh_mode
    state_topic: "saic/[[email protected]] 
    (mailto:[email protected])/vehicles/LSJE2XXXXXXXXXX/refresh/mode/set"
    command_topic: "saic/[[email protected]] 
    (mailto:[email protected])/vehicles/LSJE2XXXXXXXXXX/refresh/mode/set"
    options:
      - "periodic"
      - "off"
      - "force"

Note: You have to send “force” to the command topic to refresh your soc, automatic mode only works while driving! If you only need it for charging you should set it to off and use the force command to refresh.

number:
  - name: mqtt_gateway_active_refresh
    unique_id: uniqueid__mqtt_gateway_active_refresh  
    state_topic: "saic/saic/[[email protected]] 
    (mailto:[email protected])/vehicles/LSJE2XXXXXXXXXX/refresh/period/active"
    command_topic: "saic/saic/[[email protected]] 
    (mailto:[email protected])/vehicles/LSJE2XXXXXXXXXX/refresh/period/active/set"
    mode: "box"
    max: "86400"

Note: You can change the value of the automatic refresh time. Default is 30s.
At the moment all these settings are not persistent!

EDIT 3: found the force update command as well. all good.

1 Like

Anyone in Aus/NZ successfully using this ?

Yes it works perfectly with my AUS MG ZS EV. Just make sure you set the saic_uri to https://tap-au.soimt.com

1 Like

Anyone from India who is using it successfully?

1 Like

Is this still read only or can we manipulate the car? I am having trouble with the car not charging but it is the car that is not rather than the charger so I want to send the start charging command

Perhaps I am too blond, or I don’t have the experiance yet… but I don’t manage to setup de MG integration.
Does anybody explain it step by step?

1 Like

I get the message my password is wrong and it counts down from 4 tries and you’re out.
Email and password are correct though.
SaicApiException (login_response_message.body.error_message,
saic_ismart_client.exceptions.SaicApiException: return code: 15031, message: Incorrect password. You may have last 1 attempt of the day,please try again.

Any thoughts what’s going wrong here?

anyone made a nice car card/dashboard yet?