Aside the occasional blip in the cabin temperature reading, which sometimes displays as 83°C (or something like that), I note my Range entity is now showing 2,046 km. Which would be nice but clearly that’s an error.
Restarting the add on makes no difference, while the range in the iSmart app shows 301 km.
saic-python-mqtt-gateway
And then since I am in AU, used the specific 0.4.6 version of
Add in envrionment variables to point at the NAS
MQTT_URI : tcp://[NASIP]:1883
Then realising the the 0.4.6 version has a different evironment variable name than the latest version of add-on has (this is what took me a while to work out)
SAIC_URI : https://tap-au.soimt.com/
MQTT
Back in HA, add in MQTT integration, point it at your NAS IP. Then slowly get data. Neat.
Have not tried like unlocking doors or anything yet, as im not near the car.
Actually just tried it then, seems to work, will reconfirm later.
Here’s the code for the phone dashboard. I hope it helps.
Note: In the code below I have replaced my unique vehicle’s code with a generic identifier carID, so you would need to replace those sensors with your own created by the add-on.
The phone dashboard is set up as Panel (one card) type rather than the usual Masonry dashboard. It looks weird on a computer browser but suits our iPhone screens.
I also use some Mushroom cards, so you would need to install those in order to replicate this. These are a HACS front end, refer the link above.
I’m wondering whether a Mushroom card for indicating SOC would be nicer than the gauge I set up.
I have two sensors above which are not generated natively by the add on.
They are counter.ev_days_since_100_soc and sensor.ev_mileage_monthly.
For sensor.ev_mileage_monthly I just created a Utility Meter helper based on the mileage sensor sensor.carID_mileage. I have one for daily and monthly.
For counter.ev_days_since_100_soc I set up a counter helper which is controlled by two automations (although I probably could combine the automations into one).
The first automation increments the counter each day at midnight:
alias: EV - Increment Counter Days Since EV 100% SOC
description: Increment the days since EV 100% SOC cycle counter each day
trigger:
- platform: time
at: "00:00:00"
condition: []
action:
- service: counter.increment
data: {}
target:
entity_id:
- counter.ev_days_since_100_soc
mode: single
The second resets the counter whenever SOC ever reaches 100%:
alias: EV - Reset Days Since 100% SOC
description: Reset Counter for number of days since the car was fully charged.
trigger:
- platform: numeric_state
entity_id:
- sensor.carID_soc
above: 99
condition: []
action:
- service: counter.reset
target:
entity_id: counter.ev_days_since_100_soc
data: {}
mode: single
While functional, it’s still a fairly naive dashboard IMO.
I’m sure there are others who could make a much nicer looking dashboard, using animated images of the car for instance to highlight various things, a bit like what some clever cookies have done in this thread (way above my pay grade):
If it was ever done for the MG4 it would be super cool.
As a thank you for your assistance in getting this up and running I am sharing my picture elements card with you. It displays the tyre pressures in the correct locations on the car:
Someone on the MG forums suggested changing the picture to monochrome with a picture editor, which I had a little trouble doing to get a dark enough grey from the original orange but they posted one they created, so I flipped that to portrait and have this so far:
I think portrait mode gives a bit more room to place info icons on the phone screen. I might add a couple of extra things, e.g. the range estimate, odometer.
I’m trying to run the mqtt gateway via docker. My MQTT container is in the same stack.
Everything can connect to the mqtt container such as zigbee2mqtt and other docker containers but I can’t get this gateway to connect even if I run under host mode.
I’m mqtt is anonymous. Logs just suggest connection refused.
The car (MG4) refuses to charge after the EVSE (Wallbox Pulsar Plus) has been on ‘Pause’ for a while.
I run an automation on the EVSE to start charging when the Solar inverter (SMA) voltage rises too high. This to prevent the solar system from shutting down. With my Polestar connected this works great, during a two week vacation it prevented dozens of solar system shutdowns.
However with the MG4 it does not (always) work. When the EVSE has been on ‘Pause’ for a wile, then when the automation kicks in and wants to car to charge, the car does not accept a charge, the EVSE status goes into ‘Waiting for car demand’.
What is causing this behavior, what could a work around be?
charging from 12:10 to 12:18 (based on solar inverter voltage)
paused from 12:18 to 16:03, at 16:03 charge initiated, but not starting
waiting for demand from 16:03 on, charging not accepted by the car
PS
This behavior also makes that the scheduled charge automation does not always work.
The only way to start charging again that I could find is to physically disconnect the car and reconnect it again (hard to do from 1000 miles away). Also forcing a refresh does not re-enable charging.
I would agree. Not the MG integration, not the EVSE integration, not the HA automation. It seems to be the reaction of the car to the EVSE switching on and off (more precisely in and out of ‘paused’).
I can’t figure out what causes this. Sometimes it works fine a whole day, sometimes it fails after the the first switch. Just wondering if anybody else has seen this work or fail and if there is a fix.
There is a power sensor and a sensor for plugged-in.
You should be able to feed the power sensor to a utility meter when ever the plugged-in sensor is ‘on’
ODB plug is not required
Yes.
There are settings for Target SOC, current adjustment for 6/8/16 and Max amps, a toggle to start and stop charging, start and stop times, and a selection for charge till target SOC or till stop time.