MG / SAIC - Custom Integration

Hey, QQ about the functionality of setting HVAC mode.

Is there a way to send commands to activate multiple HVAC modes at once? Or do you have to send an HVAC ‘on’ command, then an HVAC ‘set target temperature’ command, and then an HVAC ‘turn on heated seats’ command etc. for example?

Sending them one by one with wait periods between commands feels clunky and like I’m doing something wrong.

Also, the heated seats switch only has ‘on/off’, however the iSmart app had the ability to set Passenger or Driver seat, with a low/medium/high option for both, and I can’t seem to figure out how to replicate that via this.

Many thanks in advance!

Hi @Rossaluss

Let me try to break it down.

You can use the climate entity to set the start and the desire temperature, plus fan, all at once.

Heated seats have to be called separately as they are different services.

That’s, for me, the best way to do it.

I don’t have heated seats so my implementation is quite basic because I don’t have a way to test it. The only option, by the moment, is on/off only. Whenever I have some time I may try to digg more on that, but without a way to test it, I cannot ensure it will work at first.

Cheers

Hi @Rossaluss

I have good news for you. I believe I got it sorted. You will have individual control over heated seats on version 0.8.0.

This includes:

  • New Select entities, one for each seat, to select heat level
  • New Heat Level sensors, one for each seat
  • Redefined Services

Hope it works. As I cannot test it, any comment is most welcome.

Hi everyone,

Just release a new 0.8.0 version with quite a few changes and improvements. More info here:

0.8.0

Buy Me A Coffee

New Features

  • Added new update intervals for actions, switches, buttons and every entity. (from #59)
    After each action an immediate update is scheduled to check the action was taken. Long update interval defined to recheck status. After these updates, the integration goes back into the applicable intervals.

  • Vehicle Options now available in Configuration (from #59)
    These options override API response -Has Sunroof, Has Heated Seats, Has Battery Heating- allowing to show/hide sensors or entities related.

  • All Update Intervals can now be customized in Configuration.
    Upon update to current release, these will be set to default intervals.

  • Support for Current Charge Limit (closes #58) (closes #66)
    New select entity and sensor available

  • Improved Update Intervals (closes #60)
    The integration now as a similar approach to the MQTT integration, having new update intervals after any vehicle status change, including an additional grace period after shutdown or changes.

  • Heated Seats Handling
    Heated seats can now be controlled individually, having also control over heat level. The actions have also been revised to adapt to the new options. New sensors and select entities available for each seat.

Fixes

  • Correct Door naming and handling for RHD vehicles (closes #63)
  • Fix deprecation warning on imports on HA 2024.12 (closes #61)

Other Noteworthy Changes

  • Additional New Sensors
    • Last Powered Off
    • Last Powered On
    • Last Vehicle Activity
  • All Services/Actions are now configurable via UI (no need to use YAML code)
  • Updated EN and ES translations

Dev’s Notes

If you have any issues or improvement suggestions, do not hesitate to provide your feedback here: ISSUES

You can also participate with ideas or comments in the Discussions

Full Changelog: Comparing 0.7.2...0.8.0 · ad-ha/mg-saic-ha · GitHub

1 Like

Ah that’s great news RE the heated seats, and I’ve just seen your response after seeing the update come through on HA.

RE the climate entity, I’ve tried some settings to send commands to get the HVAC running in the car, but no matter what I send, every time it turns on, it only ever blows out ice cold AC air.
On the climate entity card, when I select ‘Modes’, it only gives me the choice of Off or Cool, and no target temperature I set changes this, so I suspect it may be to do with not having an auto or heat option available there as well?

Currently, the only way I can get the HVAC to start heating the car is to enable ‘Front Defrost’, however this then just blows hot air, and doesn’t adhere to the climate target temperature set, for example.

Does anyone else in this thread have an MG4 and can maybe share what they do? In case I’m missing something simple with this…?

Hi @Rossaluss

I did not use that a lot, but I tested and it was working fine on my car. Anyhow, I can have a deeper look. The thing with the Cool Mode, is the only way I found to mean AC on, rather than heating, as the car do not have a Heating Mode per se.

That’s pretty much the function that I use almost everyday and has been working fine so far, did not go with AC modes.

Let me have a look and see if I may find a different approach.

Cheers

1 Like

I can confirm that HVAC only blows cold air on a MG4. It did work in the MQTT integration.

Your integration is much faster! Me like :slight_smile:
Super thanks

1 Like

I will try to have a better look into it.

That’s the first time I hear that :+1: I always have had the feeling that the MQTT was getting data “real-time” from some comments, since I did not use that integration and am not aware how it works in daily usage.

Appreciate the comment.

Not sure if it’s common knowledge yet but there is an update to the iSamrt App to allow secondary accounts to login. So it may be possible to run this without logging out the app.

Trying to set this up using a secondary account as per the update to the app. The problem is it needs a second account already setup which would usually be via a second instance of the app on the wife’s phone. Is there a way to setup an account without using the app? i.e. a web portal I can login on and set up a new user that I can use in HA?

That is straight out of the oven. It took them almost 6 months to get it off… although MG told be by then that it would be a couple of weeks.

Need to have a look on how it works.

Cheers

1 Like

I don’t think so. You will need to get it done on the phone.

1 Like

That’s the problem. In the app I can’t see any way to create another account. You can only add already existing account details in the secondary account section.

You need to logout of your account and on the login screen press on Register.

From there you may create a new account and, once that is done, login again with your main account and add the new account as a secondary to your vehicle.

Hope this helps.

1 Like

@Rossaluss and @babar

I’ve been looking into the HVAC modes and trying to work this out, but by using the API ac_on true or false, I always get the same response from the car.

I tried sending several HVAC modes and changes from the integration to the car and after check on the MG App. If I change the temperature or fan speed, it shows correctly on the app and on the car as well.

On the next release you will get a new FAN Mode, which activates the climate but not the AC (although, after starting it the integration shows COOL mode once the data is reloaded) and from what I’ve tested it blows hot air.

With HVAC Mode Cool and 24ºC temperature it also sends hot air as well. Once I release the new version give it a test and let’s see if I can figure out something else.

For everyone else, the next version will bring:

  • Minor icon changes (battery heating switch and sensor, doors lock entity)
  • New instant power sensor
  • New speed sensor
  • Start Climate service renamed (replaces previous Start AC with Settings)
  • Additional Generic Response Check (interiorTemperature == -40)
  • New extra attributes on Device Tracker entity:
    • HDOP
    • Satellites
    • Elevation (Altitude)
    • Heading (Cardinal points)
    • Heading Degree
  • Minor backend code reorganization

Stay tuned :slight_smile:

3 Likes

I can confirm that the secondary account seems to work fine.
I used a friends mobile to install the iSmart app and set up an account using my mobile instead of email. Setup the integration with these details and it found the account and downloaded the car data pretty quickly. I then deleted the app from my friends mobile.
I can now see th3e data on my mobile and in HA.
Next job to see if I can add the wife an account as well. Or is that a step too far :wink:

The integration is showing distances in km. My app is in Miles.
Is there a way to change it in the integration or should I have done it before deleting the app on my friends mobile?

Hi @cliver

In HA, you can change the units on each sensor and adjust it to the units of your like. HA will automatically cover those (e.g. km to miles, km/h to m/h, ºC to ºF or any other…) as they are all adjusted for that.

See below:

image

1 Like

I did not test, but seems to me that you may add as many accounts as you wish.

1 Like

Had an issue today. Practically all entities had become unavailable. Deleted the Integration, reinstalled and setup but same result. Discovered in the iSmart app that the digital key had expired (despite having set it to permanent).
Long story short, I reset the key to permanent and the entities all seem to have updated again. I’ll see if it still updating tomorrow.
One entity that doesn’t seem to be correct is the back left window is showing as open. I panicked and rushed to close it as it’s raining at the moment but it is definitely closed. Not desperately important and I understand the API is far from perfect but thought it worth a mention.