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!
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.
Nice work! This is fantastic. I’ve got multiple vehicles with OVMS, I’ve just set them up using your integration and it worked perfectly
Is it possible to adjust the SoC limit? I.e
Great work!
Just got a friends e-Up working with OVMS and Dexter.
I had already seen this on Reddit, so I knew there was some hope:
https://www.reddit.com/r/homeassistant/s/Gg5SIE4TF3
We did just get the OpenVehicles app working on iOS, but that was a big letdown. I was expecting a modular dashboard and virtual buttons to create your own car remote app, but it’s just a couple of useless presets, and my friend was pretty bummed that it’s even worse than the official Volkswagen app.
Home Assistant seems to be the possible solution though, maybe mapping a dedicated dashboard to a Home Screen shortcut on the iPhone.