Just made my first HACS integration. Today I made the first (what I think) is stable release, but it’s not been tested out in public yet.
Feel free to dive into the world of OVMS (if you own one). If not, maybe try my integration anyway.
Just made my first HACS integration. Today I made the first (what I think) is stable release, but it’s not been tested out in public yet.
Feel free to dive into the world of OVMS (if you own one). If not, maybe try my integration anyway.
If OVMS were compatible with my Chevrolet Volt, I would be all over it.
Yes, it seems like it is!
This is fantastic, thank you so much for this!! I will be trying this out with my girlfriend and her car. I have ordered the OVMS module for her MG ZS EV, who know I might even make a video series out of it!
Glad you like it!
Once you get the OVMS module, please run this from your OVMS CLI, so that we can add specific metrics for MG as well: metrics list
This looks really nice.
I installed it and connected to the server, but there appears only one entity ovms_VEHICLEID_status, no more data.
When opening MQTT explorer, there only seems to be this entity:
Do I have to change configuration at the OVMS server first?
*Update: seems like it is a setting in the OVMS hardware. I will check this soon and keep you updated.
Hi, thanks for the feedback!
You probably spelled the vehicle_id wrong. I’ve done the same thing many times during testing. It’s trying to parse the vehicle_id, and sometimes it gets it wrong.
Like it’s hard to notice the difference between l and I (small L, large i).
looks cool, if only i had a car
Well, maybe you can get one just to try out this awesome integration?
Hey guys (and girls), just released 0.8.0. Improved frontend in this one, and the setup is now perfect (according to me).
Try it out, create issues, and post feature requests!
I have gone ahead and collected the data for you off the MG ZS-EV. I have just realised I don’t current have a v3 server setup. So I will have to look into that.
m.egpio.input 0;1;2;3;4;5;6;7;8;9
m.egpio.monitor
m.egpio.output 3;4;5;6;7;8;9
m.freeram 3460128
m.hardware OVMS WIFI BLE BT cores=2 rev=ESP32/3; MODEM SIM7600
m.monotonic 6749Sec
m.net.mdm.iccid 89410124221000295426
m.net.mdm.mode LTE;Online
m.net.mdm.model LE20B05SIM7600G
m.net.mdm.netreg RegisteredRoaming
m.net.mdm.network
m.net.mdm.sq -81dBm
m.net.provider
m.net.sq -72dBm
m.net.type wifi
m.net.wifi.network
m.net.wifi.sq -71.8dBm
m.obdc2ecu.on
m.serial
m.tasks 17
m.time.utc 2025-03-19 18:46:48 UTC
m.version 3.3.004-4-gab8f16b7/ota_0/main (build idf v3.3.4-849-g6e214dc335 Mar 30 2024 08:08:21)
s.v2.connected yes
s.v2.peers 0
s.v3.connected
s.v3.peers
v.b.12v.current
v.b.12v.voltage 13.27V
v.b.12v.voltage.alert
v.b.12v.voltage.ref 12.6V
v.b.c.temp 11;11;10;11;11;11;11;11;11;11;11;11;11;11;11;11;11;11°C
v.b.c.temp.alert 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
v.b.c.temp.dev.max 0.56;0.67;-1.11;-0.67;-0.94;-0.78;-0.78;0.5;0.67;0.78;-1.06;-0.94;1.06;1.11;-0.67;-0.5;0.72;1.39°C
v.b.c.temp.max 11;11;11;11;11;11;11;11;11;11;11;11;11;12;11;11;11;11°C
v.b.c.temp.min 10;10;9;9;9;9;9;9;10;10;9;9;10;10;9;9;10;10°C
v.b.c.voltage 3.712;3.72;3.716;3.719;3.717;3.719;3.717;3.72;3.716;3.72;3.716;3.719;3.716;3.721;3.716;3.719;3.716;3.718V
v.b.c.voltage.alert 0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0;0
v.b.c.voltage.dev.max -0.00639;0.00239;-0.00239;0.00167;-0.00117;0.00211;-0.00117;0.00261;-0.00194;0.0025;-0.00183;0.00183;-0.00211;0.00383;-0.00222;0.00217;-0.00167;0.0015V
v.b.c.voltage.max 3.712;3.72;3.716;3.719;3.717;3.719;3.717;3.72;3.716;3.72;3.716;3.719;3.716;3.721;3.716;3.719;3.716;3.718V
v.b.c.voltage.min 3.669;3.673;3.671;3.673;3.672;3.674;3.672;3.674;3.671;3.674;3.671;3.673;3.671;3.674;3.671;3.674;3.671;3.673V
v.b.cac
v.b.consumption 0mi/kWh
v.b.coulomb.recd
v.b.coulomb.recd.total
v.b.coulomb.used 0.614523Ah
v.b.coulomb.used.total 0.614523Ah
v.b.current -5.2A
v.b.energy.recd
v.b.energy.recd.total
v.b.energy.used 0.241661kWh
v.b.energy.used.total 0.241661kWh
v.b.health
v.b.p.level.avg
v.b.p.level.max
v.b.p.level.min
v.b.p.level.stddev
v.b.p.temp.avg 10.94°C
v.b.p.temp.max 11°C
v.b.p.temp.min 10°C
v.b.p.temp.stddev 0.23°C
v.b.p.temp.stddev.max 0.62°C
v.b.p.voltage.avg 3.71761V
v.b.p.voltage.grad 0.00121V
v.b.p.voltage.max 3.721V
v.b.p.voltage.min 3.712V
v.b.p.voltage.stddev 0.00217V
v.b.p.voltage.stddev.max 0.00222363V
v.b.power -2.0878kW
v.b.range.est 59.1496M
v.b.range.full 163.42M
v.b.range.ideal 67.4053M
v.b.range.speed
v.b.soc 47.4317%
v.b.soh 86.96%
v.b.temp 12°C
v.b.voltage 401.5V
v.c.12v.current
v.c.12v.power
v.c.12v.temp
v.c.12v.voltage
v.c.charging yes
v.c.climit 11A
v.c.current 11.2A
v.c.duration.full 646Min
v.c.duration.range 0Min
v.c.duration.soc 646Min
v.c.efficiency
v.c.kwh 4.94183kWh
v.c.kwh.grid
v.c.kwh.grid.total
v.c.limit.range
v.c.limit.soc 100%
v.c.mode standard
v.c.pilot yes
v.c.power 2.66722kW
v.c.state charging
v.c.substate
v.c.temp
v.c.time 6665Sec
v.c.timermode
v.c.timerstart
v.c.type type2
v.c.voltage 238.144V
v.d.cp yes
v.d.fl no
v.d.fr no
v.d.hood
v.d.rl no
v.d.rr no
v.d.trunk
v.e.alarm
v.e.aux12v yes
v.e.awake yes
v.e.c.config
v.e.c.login yes
v.e.cabinfan
v.e.cabinintake
v.e.cabinsetpoint 22°C
v.e.cabintemp 17.2°C
v.e.cabinvent
v.e.charging12v yes
v.e.cooling no
v.e.drivemode
v.e.drivetime 6665Sec
v.e.footbrake
v.e.gear
v.e.handbrake
v.e.headlights
v.e.heating
v.e.hvac
v.e.locked yes
v.e.on yes
v.e.parktime 0Sec
v.e.regenbrake
v.e.serv.range
v.e.serv.time
v.e.temp 10.5°C
v.e.throttle
v.e.valet
v.g.climit
v.g.current
v.g.duration.empty
v.g.duration.range
v.g.duration.soc
v.g.efficiency
v.g.generating
v.g.kwh
v.g.kwh.grid
v.g.kwh.grid.total
v.g.limit.range
v.g.limit.soc
v.g.mode
v.g.pilot
v.g.power
v.g.state
v.g.substate
v.g.temp
v.g.time 0Sec
v.g.timermode
v.g.timerstart
v.g.type
v.g.voltage
v.i.efficiency
v.i.power
v.i.temp 25°C
v.m.rpm
v.m.temp 23°C
v.p.acceleration
v.p.altitude 523.621ft
v.p.direction
v.p.gpshdop 0.8
v.p.gpslock yes
v.p.gpsmode AA
v.p.gpsspeed 0Mph
v.p.gpssq 100%
v.p.gpstime 2025-03-19 18:46:46 GMT
v.p.latitude 53.7268
v.p.location Home
v.p.longitude -2.46996
v.p.odometer 41514.4M
v.p.satcount 14
v.p.speed
v.p.trip
v.p.valet.distance
v.p.valet.latitude
v.p.valet.longitude
v.t.alert
v.t.health
v.t.pressure 37.1297;38.29;34.2289;36.5495psi
v.t.temp 19.5;18.5;18.5;21°C
v.type MGA
v.vin PW7BB3FKZ204544
xmg.auth.bcm no
xmg.b.capacity 42.5kWh
xmg.b.dod.lower 25
xmg.b.dod.upper 940
xmg.c.max.dc.charge 82kW
xmg.enable.polling no
xmg.p.avg.consumption 3.76588mi/kWh
xmg.p.trip.consumption 3.76588mi/kWh
xmg.state.gwm 2
xmg.state.poll 1
xmg.task.bcm 0
xmg.task.gwm 0
xmg.v.bat.coolant.temp 11°C
xmg.v.bat.error 1
xmg.v.bat.resistance 3342.5
xmg.v.bat.voltage.bms 401.75V
xmg.v.bat.voltage.vcu 401.7V
xmg.v.bms.cell.voltage.max 3.721V
xmg.v.bms.cell.voltage.min 3.712V
xmg.v.bms.mainrelay.b yes
xmg.v.bms.mainrelay.g yes
xmg.v.bms.mainrelay.p yes
xmg.v.bms.time 20/03/25 02:53:49
xmg.v.dcdc.load 4.25%
xmg.v.env.faceoutlet.temp 3600°C
xmg.v.ignition.state 2
xmg.v.m.coolant.temp 23°C
xmg.v.m.torque 3600Nm
xmg.v.radiator.fan no
xmg.v.soc.raw 45.9%
xmg.v.vcu.dcdc.input.current 0A
xmg.v.vcu.dcdc.input.voltage 402V
xmg.v.vcu.dcdc.mode 2
xmg.v.vcu.dcdc.output.current 8A
xmg.v.vcu.dcdc.output.voltage 13.1V
xmg.v.vcu.dcdc.temp 25°C
Thanks! Will add a PR tonight for it
PR is here:
And here’s a dashboard, and README for MG:
title: MG ZS-EV Dashboard
views:
- title: Overview
icon: mdi:car-electric
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Vehicle Status
entities:
- entity: sensor.ovms_vehicle_id_v_b_soc
name: Battery Level
icon: mdi:battery
- entity: sensor.ovms_vehicle_id_xmg_v_soc_raw
name: Raw SOC
icon: mdi:battery-outline
- entity: sensor.ovms_vehicle_id_v_b_range_est
name: Estimated Range
icon: mdi:map-marker-distance
- entity: sensor.ovms_vehicle_id_v_c_charging
name: Charging Status
icon: mdi:battery-charging
- entity: binary_sensor.ovms_vehicle_id_v_e_locked
name: Vehicle Locked
icon: mdi:lock
- type: glance
title: Current Stats
entities:
- entity: sensor.ovms_vehicle_id_v_b_power
name: Power
icon: mdi:flash
- entity: sensor.ovms_vehicle_id_v_b_current
name: Current
icon: mdi:current-ac
- entity: sensor.ovms_vehicle_id_v_b_voltage
name: Voltage
icon: mdi:lightning-bolt
- entity: sensor.ovms_vehicle_id_v_p_odometer
name: Odometer
icon: mdi:counter
- type: map
entities:
- entity: device_tracker.ovms_vehicle_id_location
hours_to_show: 24
- title: Battery
icon: mdi:battery
badges: []
cards:
- type: vertical-stack
cards:
- type: gauge
entity: sensor.ovms_vehicle_id_v_b_soc
name: State of Charge
min: 0
max: 100
severity:
green: 50
yellow: 30
red: 10
- type: entities
title: Battery Details
entities:
- entity: sensor.ovms_vehicle_id_xmg_b_capacity
name: Battery Capacity
icon: mdi:battery
- entity: sensor.ovms_vehicle_id_v_b_power
name: Battery Power
icon: mdi:flash
- entity: sensor.ovms_vehicle_id_v_b_current
name: Battery Current
icon: mdi:current-ac
- entity: sensor.ovms_vehicle_id_v_b_voltage
name: Battery Voltage
icon: mdi:lightning-bolt
- entity: sensor.ovms_vehicle_id_v_b_temp
name: Battery Temperature
icon: mdi:thermometer
- type: entities
title: Advanced Battery Metrics
entities:
- entity: sensor.ovms_vehicle_id_xmg_v_bms_cell_voltage_max
name: Max Cell Voltage
icon: mdi:battery-high
- entity: sensor.ovms_vehicle_id_xmg_v_bms_cell_voltage_min
name: Min Cell Voltage
icon: mdi:battery-low
- entity: sensor.ovms_vehicle_id_xmg_v_bat_coolant_temp
name: Battery Coolant Temp
icon: mdi:thermometer-lines
- entity: sensor.ovms_vehicle_id_xmg_v_bat_resistance
name: Battery Resistance
icon: mdi:resistor
- title: Charging
icon: mdi:ev-station
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Charging Status
entities:
- entity: binary_sensor.ovms_vehicle_id_v_c_charging
name: Charging
icon: mdi:battery-charging
- entity: sensor.ovms_vehicle_id_v_c_mode
name: Charging Mode
icon: mdi:battery-charging-outline
- entity: sensor.ovms_vehicle_id_v_c_power
name: Charging Power
icon: mdi:lightning-bolt
- entity: sensor.ovms_vehicle_id_v_c_voltage
name: Charging Voltage
icon: mdi:flash
- entity: sensor.ovms_vehicle_id_v_c_current
name: Charging Current
icon: mdi:current-ac
- type: entities
title: Charging Limits
entities:
- entity: sensor.ovms_vehicle_id_v_c_limit_soc
name: SOC Limit
icon: mdi:battery-sync
- entity: sensor.ovms_vehicle_id_v_c_duration_full
name: Time to Full
icon: mdi:timer
- entity: sensor.ovms_vehicle_id_xmg_c_max_dc_charge
name: Max DC Charge Power
icon: mdi:ev-station
- type: entities
title: Recent Energy
entities:
- entity: sensor.ovms_vehicle_id_v_c_kwh
name: Charge Energy
icon: mdi:battery-charging
- entity: sensor.ovms_vehicle_id_v_b_energy_used
name: Energy Used
icon: mdi:battery-minus
- entity: sensor.ovms_vehicle_id_xmg_p_avg_consumption
name: Average Consumption
icon: mdi:chart-line
- entity: sensor.ovms_vehicle_id_xmg_p_trip_consumption
name: Trip Consumption
icon: mdi:chart-bell-curve
- title: Climate & Technical
icon: mdi:thermometer
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Temperature
entities:
- entity: sensor.ovms_vehicle_id_v_e_cabintemp
name: Cabin Temperature
icon: mdi:car-seat
- entity: sensor.ovms_vehicle_id_v_e_temp
name: Ambient Temperature
icon: mdi:thermometer
- entity: sensor.ovms_vehicle_id_xmg_v_env_faceoutlet_temp
name: Face Outlet Temperature
icon: mdi:air-conditioner
- entity: sensor.ovms_vehicle_id_xmg_v_m_coolant_temp
name: Motor Coolant Temperature
icon: mdi:coolant-temperature
- entity: sensor.ovms_vehicle_id_xmg_v_vcu_dcdc_temp
name: DCDC Temperature
icon: mdi:thermometer-auto
- type: entities
title: 12V System
entities:
- entity: sensor.ovms_vehicle_id_v_b_12v_voltage
name: 12V Voltage
icon: mdi:flash
- entity: sensor.ovms_vehicle_id_xmg_v_dcdc_load
name: DCDC Load
icon: mdi:percent
- entity: sensor.ovms_vehicle_id_xmg_v_vcu_dcdc_input_current
name: DCDC Input Current
icon: mdi:current-ac
- entity: sensor.ovms_vehicle_id_xmg_v_vcu_dcdc_output_current
name: DCDC Output Current
icon: mdi:current-ac
- type: entities
title: Motor & Drive
entities:
- entity: sensor.ovms_vehicle_id_xmg_v_m_torque
name: Motor Torque
icon: mdi:gauge
- entity: sensor.ovms_vehicle_id_v_m_temp
name: Motor Temperature
icon: mdi:thermometer
- entity: binary_sensor.ovms_vehicle_id_xmg_v_radiator_fan
name: Radiator Fan
icon: mdi:fan
- title: System Status
icon: mdi:tools
badges: []
cards:
- type: vertical-stack
cards:
- type: entities
title: Vehicle State
entities:
- entity: sensor.ovms_vehicle_id_xmg_v_ignition_state
name: Ignition State
icon: mdi:power
- entity: binary_sensor.ovms_vehicle_id_v_e_on
name: Vehicle On
icon: mdi:power
- entity: binary_sensor.ovms_vehicle_id_v_e_awake
name: Vehicle Awake
icon: mdi:sleep
- entity: binary_sensor.ovms_vehicle_id_v_e_charging12v
name: 12V Charging
icon: mdi:battery-charging
- type: entities
title: OVMS Status
entities:
- entity: binary_sensor.ovms_vehicle_id_xmg_enable_polling
name: Polling Enabled
icon: mdi:sync
- entity: sensor.ovms_vehicle_id_xmg_state_poll
name: Poll State
icon: mdi:state-machine
- entity: sensor.ovms_vehicle_id_m_version
name: OVMS Version
icon: mdi:package-up
- entity: sensor.ovms_vehicle_id_m_tasks
name: OVMS Tasks
icon: mdi:playlist-check
- type: entities
title: Network Status
entities:
- entity: sensor.ovms_vehicle_id_m_net_type
name: Network Type
icon: mdi:access-point
- entity: sensor.ovms_vehicle_id_m_net_sq
name: Signal Quality
icon: mdi:signal
- entity: sensor.ovms_vehicle_id_m_net_provider
name: Network Provider
icon: mdi:cellphone-wireless
- title: Commands
icon: mdi:console
badges: []
cards:
- type: vertical-stack
cards:
- type: markdown
content: >
## Vehicle Commands
Use these buttons to send commands to your MG ZS-EV.
- type: entities
title: Status Commands
entities:
- entity: button.update_all
name: Update All Metrics
- entity: button.get_battery_status
name: Check Battery Status
- entity: button.get_location
name: Update Location
- type: entities
title: Control Commands
entities:
- entity: button.climate_on
name: Climate Control On
- entity: button.climate_off
name: Climate Control Off
- entity: button.lock_vehicle
name: Lock Vehicle
- entity: button.unlock_vehicle
name: Unlock Vehicle
# Replace "vehicle_id" with your actual vehicle ID in all entity references
# Add custom buttons with service calls like:
#
# button:
# - platform: template
# buttons:
# update_all:
# friendly_name: "Update All"
# icon_template: mdi:refresh
# press:
# service: ovms.send_command
# data:
# vehicle_id: your_vehicle_id
# command: "server v3 update all"
# timeout: 10
# MG ZS-EV Support in OVMS Home Assistant
The OVMS Home Assistant integration now includes specialized support for MG ZS-EV vehicles.
## MG ZS-EV Specific Features
The integration provides full support for MG ZS-EV vehicles with specialized entity handling for:
- Battery capacity, DOD (Depth of Discharge) limits, and BMS data
- DC charging system information and capabilities
- Consumption metrics in miles/kWh
- Vehicle-specific sensor and binary sensor entities
- Cell voltage data (min/max)
- Battery coolant temperature and resistance
- DC-DC converter metrics
- Motor torque and coolant temperature
## MG ZS-EV Dashboard
A pre-configured dashboard for the MG ZS-EV is available in the `dashboards` directory or in the documentation. This dashboard includes:
- Battery status and charge information
- Battery temperature and cell voltage
- Climate control status and temperature monitoring
- Vehicle location tracking
- Power consumption statistics
- Vehicle system status
### Dashboard Installation
1. Copy the YAML code from the example dashboard
2. Go to your Home Assistant instance → Configuration → Dashboards
3. Click the "+" button to add a new dashboard
4. Select "YAML Mode"
5. Paste the YAML code and save
6. Replace all instances of `ovms_vehicle_id_` with `ovms_your_actual_vehicle_id_`
## Custom Commands for MG ZS-EV
You can create custom commands for your MG ZS-EV using the `ovms.send_command` service. For example:
```yaml
# Add to your configuration.yaml
button:
- platform: template
buttons:
mg_update_all:
friendly_name: "Update All MG ZS-EV Metrics"
icon_template: mdi:refresh
press:
service: ovms.send_command
data:
vehicle_id: your_vehicle_id
command: "server v3 update all"
timeout: 10
mg_battery_status:
friendly_name: "MG ZS-EV Battery Status"
icon_template: mdi:battery
press:
service: ovms.send_command
data:
vehicle_id: your_vehicle_id
command: "stat"
parameters: "battery"
timeout: 10
server v3 update all
command.unavailable
initially. This is normal until the vehicle provides data for these metrics.If you encounter issues with your MG ZS-EV integration:
configuration.yaml
:logger:
default: info
logs:
custom_components.ovms: debug
xmg.
in the topic).
Wow! I’ve been using OVMS in my 2013 Nissan Leaf for about 3 years now. And I have been a Home Assistant user for a little over a year. Now it looks like I get to unite the two systems!
Is there anything that might be an issue for me and my Leaf? This is what I’m currently running:
Factory image: 3.3.001-33-g58d01654
OTA_O image: 3.3.004-4-gab8f16b7
OTA_1 image: 3.3.003
But I’ve never even tried to enable the OVMS v3 server. Is that something I should do?
OVMS V2 login successful, and crypto channel established
OVMS v3 server has not been started
Here’s a link to the OVMS forum where I showed off my OVMS install:
OVMS 2013 Nissan Leaf installation
I’d love to spend some time exploring your integration!
@wes_westhaver It’s your lucky day I guess. I just added special support for Nissan Leaf!
It’s like this: All cars that are supported by OVMS are also supported by the integration. Think of the integration as an extension of the OVMS module. The integration picks up all the topics, parse them, and make some magic with them to make them show up nice and tidy in Home Assistant. Isn’t that great?!
The integration requires OVMS V3 since it’s sending everything over MQTT, so that needs to be enabled - yes. Please read the README to get all the info you need.
Would love some feedback from you, so please post any findings on Github, good or bad.