Possible you can give us a guide?
Sure, I’ll leave you a link to download the MIK app.
MIK APP
You must have ADB running.
It’s a dashboard that can replace BYD’s Dlink, so I don’t recommend it.
It allows for a lot of customization for the car, but in my case, I only use it for MQTT.
You have to configure the app to start with the system.
The app is all in Chinese; you can use Google Lens to help.
Sorry, I don’t have any screenshots to upload right now. Go to the last configuration option and find the MQTT section. In my case, I started the tests by pointing the Home Assistant IP to the Mosquitto addon in HA locally. Once it was working, I opened a port on my router and sent it over the internet.
The app communicates when I turn the car on and off; during the trip, it doesn’t send information.
In HA, I created the sensors manually, using AI. The sensor template may vary depending on the car, but they review it with MQTT Explorer and adapt it.
Tips:
I have automations with a summary of each trip, a service notification when the mileage is reached, and a notification to charge it when the battery is at 25% or less, etc.
I’ll upload some images of the MIK app later.
###################### Sesnores Auto BYD ############################
# --- Sensores de Estado del Vehículo ---
- name: "BYD Battery"
unique_id: "byd_battery_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "%"
device_class: "battery"
value_template: >
{% if '电量(%)' in value %}
{{ (value | regex_findall('电量\\(%\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: &byd_device
identifiers: ["byd_vehicle"] # <-- Original para no duplicar
name: "BYD Auto"
manufacturer: "BYD"
model: "MQTT Vehicle"
- name: "BYD Range"
unique_id: "byd_range_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "km"
device_class: "distance"
value_template: >
{% if '电量剩余里程(km)' in value %}
{{ (value | regex_findall('电量剩余里程\\(km\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Odometer"
unique_id: "byd_odometer_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "km"
device_class: "distance"
state_class: "total_increasing"
value_template: >
{% if '总里程(km)' in value %}
{{ (value | regex_findall('总里程\\(km\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
# --- Sensores de Temperatura de Neumáticos ---
- name: "BYD Tire Temp Front Left"
unique_id: "byd_tire_temp_fl_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°C"
device_class: "temperature"
value_template: >
{% if '轮胎温度(℃)' in value %}
{% set tire_line = (value | regex_findall('轮胎温度\\(℃\\):\\s*(.*)'))[0] | default('') %}
{{ (tire_line | regex_findall('左前:\\s*([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Tire Temp Front Right"
unique_id: "byd_tire_temp_fr_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°C"
device_class: "temperature"
value_template: >
{% if '轮胎温度(℃)' in value %}
{% set tire_line = (value | regex_findall('轮胎温度\\(℃\\):\\s*(.*)'))[0] | default('') %}
{{ (tire_line | regex_findall('右前:\\s*([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Tire Temp Rear Left"
unique_id: "byd_tire_temp_rl_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°C"
device_class: "temperature"
value_template: >
{% if '轮胎温度(℃)' in value %}
{% set tire_line = (value | regex_findall('轮胎温度\\(℃\\):\\s*(.*)'))[0] | default('') %}
{{ (tire_line | regex_findall('左后:\\s*([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Tire Temp Rear Right"
unique_id: "byd_tire_temp_rr_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°C"
device_class: "temperature"
value_template: >
{% if '轮胎温度(℃)' in value %}
{% set tire_line = (value | regex_findall('轮胎温度\\(℃\\):\\s*(.*)'))[0] | default('') %}
{{ (tire_line | regex_findall('右后:\\s*([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
# --- SENSORES DE RESUMEN DE VIAJE ---
- name: "BYD Last Trip Consumption kWh"
unique_id: "byd_last_trip_consumption_kwh_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "kWh"
device_class: "energy"
state_class: "measurement"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('耗电量\\(kWh\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Distance"
unique_id: "byd_last_trip_distance_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "km"
device_class: "distance"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('行驶里程\\(km\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Duration"
unique_id: "byd_last_trip_duration_mqtt"
state_topic: "bydb" # <-- CORREGIDO
icon: "mdi:clock-outline"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('耗时:([^\\n]*)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Average Speed"
unique_id: "byd_last_trip_avg_speed_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "km/h"
device_class: "speed"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('平均时速\\(km/h\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Efficiency"
unique_id: "byd_last_trip_efficiency_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "kWh/100km"
icon: "mdi:leaf-circle-outline"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('百公里电耗:\\s*([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Battery Used"
unique_id: "byd_last_trip_battery_used_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "%"
icon: "mdi:battery-minus"
value_template: >
{% if '能耗提醒' in value %}
{{ (value | regex_findall('耗电量\\(%\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Outside Temperature"
unique_id: "byd_outside_temperature_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°C"
device_class: "temperature"
value_template: >
{% if '熄火能量检测' in value %}
{{ (value | regex_findall('车外温度:([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last 50km Consumption"
unique_id: "byd_last_50km_consumption_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "kWh"
icon: "mdi:chart-line"
device_class: "energy"
state_class: "measurement"
value_template: >
{% if '熄火能量检测' in value %}
{{ (value | regex_findall('近50KM电耗\\(kWh\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Incline"
unique_id: "byd_incline_mqtt"
state_topic: "bydb" # <-- CORREGIDO
unit_of_measurement: "°"
icon: "mdi:angle-acute"
value_template: >
{% if '熄火能量检测' in value %}
{{ (value | regex_findall('车身坡度:([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
###############################################
- name: "BYD Last Trip Start Battery"
unique_id: "byd_last_trip_start_battery_mqtt"
state_topic: "bydb"
unit_of_measurement: "%"
device_class: "battery"
value_template: >
{% if '起始电量' in value %}
{{ (value | regex_findall('起始电量\\(%\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip End Battery"
unique_id: "byd_last_trip_end_battery_mqtt"
state_topic: "bydb"
unit_of_measurement: "%"
device_class: "battery"
value_template: >
{% if '结束电量' in value %}
{{ (value | regex_findall('结束电量\\(%\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Electric Distance"
unique_id: "byd_last_trip_electric_distance_mqtt"
state_topic: "bydb"
unit_of_measurement: "km"
icon: "mdi:ev-station"
value_template: >
{% if '耗电里程' in value %}
{{ (value | regex_findall('耗电里程\\(km\\):([0-9.]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Fuel Efficiency"
unique_id: "byd_last_trip_fuel_efficiency_mqtt"
state_topic: "bydb"
unit_of_measurement: "L/100km"
icon: "mdi:gas-station"
value_template: >
{% if '百公里油耗' in value %}
{{ (value | regex_findall('百公里油耗:([0-9.]+)升/百公里', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip Start Time"
unique_id: "byd_last_trip_start_time_mqtt"
state_topic: "bydb"
icon: "mdi:clock-start"
value_template: >
{% if '启动时间' in value %}
{{ (value | regex_findall('启动时间:([0-9: -]+)'))[0] | trim }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Last Trip End Time"
unique_id: "byd_last_trip_end_time_mqtt"
state_topic: "bydb"
icon: "mdi:clock-end"
value_template: >
{% if '结束时间' in value %}
{{ (value | regex_findall('结束时间:([0-9: -]+)'))[0] | trim }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD IPv6"
unique_id: "byd_ipv6_mqtt"
state_topic: "bydb"
icon: "mdi:ip-network-outline"
value_template: >
{% if 'IPV6=' in value %}
{{ (value | regex_findall('IPV6=([0-9a-fA-F:]+)', ignorecase=true))[0] | default(this.state) }}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
##############################################
binary_sensor:
- name: "BYD Ignition"
unique_id: "byd_ignition_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "power"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '启动' in value %} ON
{% elif '熄火' in value %} OFF
{% else %} {{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Charging"
unique_id: "byd_charging_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "battery_charging"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '充电中' in value %}ON{% else %}OFF{% endif %}
device: *byd_device
- name: "BYD Window Front Left"
unique_id: "byd_window_fl_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "window"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '车窗状态' in value %}
{% set window_line = (value | regex_findall('车窗状态:\\s*(.*)'))[0] | default('') %}
{% set window_val = (window_line | regex_findall('左前:\\s*([0-9]+)', ignorecase=true) | first | default('0')) %}
{% if (window_val | int(0)) > 0 %} ON {% else %} OFF {% endif %}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Window Front Right"
unique_id: "byd_window_fr_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "window"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '车窗状态' in value %}
{% set window_line = (value | regex_findall('车窗状态:\\s*(.*)'))[0] | default('') %}
{% set window_val = (window_line | regex_findall('右前:\\s*([0-9]+)', ignorecase=true) | first | default('0')) %}
{% if (window_val | int(0)) > 0 %} ON {% else %} OFF {% endif %}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Window Rear Left"
unique_id: "byd_window_rl_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "window"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '车窗状态' in value %}
{% set window_line = (value | regex_findall('车窗状态:\\s*(.*)'))[0] | default('') %}
{% set window_val = (window_line | regex_findall('左后:\\s*([0-9]+)', ignorecase=true) | first | default('0')) %}
{% if (window_val | int(0)) > 0 %} ON {% else %} OFF {% endif %}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Window Rear Right"
unique_id: "byd_window_rr_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "window"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '车窗状态' in value %}
{% set window_line = (value | regex_findall('车窗状态:\\s*(.*)'))[0] | default('') %}
{% set window_val = (window_line | regex_findall('右后:\\s*([0-9]+)', ignorecase=true) | first | default('0')) %}
{% if (window_val | int(0)) > 0 %} ON {% else %} OFF {% endif %}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Sunroof"
unique_id: "byd_sunroof_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "window"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '车窗状态' in value %}
{% set window_line = (value | regex_findall('车窗状态:\\s*(.*)'))[0] | default('') %}
{% set window_val = (window_line | regex_findall('天窗:\\s*([0-9]+)', ignorecase=true) | first | default('0')) %}
{% if (window_val | int(0)) > 0 %} ON {% else %} OFF {% endif %}
{% else %}
{{ this.state }}
{% endif %}
device: *byd_device
- name: "BYD Doors Open"
unique_id: "byd_doors_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "door"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '门状态' in value and ('1' in (value | regex_findall('门状态:[^\\n]+')) | join ) %}ON{% else %}OFF{% endif %}
device: *byd_device
- name: "BYD Lights"
unique_id: "byd_lights_mqtt"
state_topic: "bydb" # <-- CORREGIDO
device_class: "light"
payload_on: "ON"
payload_off: "OFF"
value_template: >
{% if '灯光' in value and ('1' in (value | regex_findall('灯光:[^\\n]+')) | join ) %}ON{% else %}OFF{% endif %}
device: *byd_device
Did you manage to make it send data periodically or it only sends on turn on and turn off? Also how did you enable it to autostart but not replace the bottom controls?
In the tablet’s settings, in the applications section, you can specify any app to run at startup. It’s a toggle switch; disabling it will cause the app to open automatically. That’s all that’s needed. MIK runs in the background. During MIK installation, you have to accept some permissions it requests. As far as I could tell, MQTT messages are sent when the car is turned on and has a connection, and also when it’s turned off. The app has the potential to send real-time data; it reads a lot of information from the car—speed, RPM, battery level, coordinates, etc.—but unfortunately, it doesn’t send it via MQTT. Were you able to install the app and configure MQTT? Regards
Thanks so much for this! Had to change some values around for my atto I wonder if it’s country/region specific in terms of how the mqtt messages are published but seems to be working now.
My only other problem is to get the BYD to connect to my home wifi instead of the phone when I start up and switch over the home wifi as soon as I get home and before I turn the car off. Any suggestions there would be greatly appreciated
I’m glad you tried it and it works for you!
In my case, when I start the car, it automatically connects to my home Wi-Fi, but I have an app on my phone that automates turning on the hotspot. So when I leave home, it switches from my home Wi-Fi to my phone’s hotspot.
The app is called Automate for Android.
Do you have a link to the integration you used?
Created an integration on smartcar.com (used free tier) created a second “authorised account” via BYD app as per smartcar instructions.
In HACS added smartcar and linked it.
I’m going to say if I can do it anyone can do it!
The free version on smartcar has some limits but I’ve achieved what I have been trying a year to achieve
But they’ve recently opened the free tier up to include webhooks which is a huge plus!
Ah nice! Unfortunately they don’t cover Australia. ![]()
The values of smartcar will not be refreshed in home-assistant?
Yes but it seems on the free tier, not enough. Early days
Maybe I don’t understand your question, but of course they’ll be updated.
The docs explain better, but briefly:
- The integration allows for polling for updates every 6 hours
- If you enable webhooks, it will not poll for updates
- You can customize polling in either case (and disable the default polling if you’d like)
It’s all in the docs, but if it’s unclear, open an issue or PR and I’ll work with you to improve it!
ok. now its clear every 6 h hours. hmm thats less.
I’m working on a webhook integraion
Looks like someone has created an integration for A Better Route Planner. It’s still early, but seems cool.
How does this work exactly? Can you install the app on an Atto 3 to access data such as SoC etc.? I’m in Aus so hopefully it’s available to me
After using it (rate limited) for a few months, EVLinkHA using evlinkha.se has stopped working on Dec 10.
I get " EVLinkHA Vehicle Status Error : Unexpected error 503 when trying to fetch vehicle status." messages and it looks like https://evlinkha.se/ is no longer reachable.
That’s a shame as it was a great solution.
Voce pode desabilitar o monitor de dados. Com isso os envios serão realizados pelo wifi ou dados moveis.
adb shell pm disable-user --user 0 “com.byd.trafficmonitor”
