Hey all,
Wanted to share a project for anyone else who happens to live at the intersection of “owns a BYD” and “runs Home Assistant” — I know, it’s a narrow slice of the Venn diagram, but if you’re here, welcome, we’re a small club.
Since BYD (via the BYD Auto Link app) doesn’t offer a public API, I built a tool that gets telemetry out anyway using UI automation, and pushes it into Home Assistant over MQTT.
GitLab: https://gitlab.com/Spudmn/byd_auto_data_extractor
How it works
Since there’s no supported API, the tool drives the actual BYD Auto Link Android app using Appium and reads whatever’s on screen — same as a human would. It runs unattended on a spare/old Android phone connected to a home server or NUC, walks through the Home, Status, and AC screens on a schedule (plus a best-effort attempt at pulling location out of the in-app Google Maps view), and publishes what it finds to an MQTT broker.
A scheduler process runs it on a loop and adjusts how often based on the car’s driving status — polling more often while the car’s active, and backing off when it’s shut down, so it’s not hammering the app all day for no reason. It also listens for MQTT commands so you can wake it early on demand.
What you get in HA
- Vehicle status and general home-screen data
- AC/climate status
- Rough location (via Maps UI scraping — best-effort, can fail if Maps switches to nav mode mid-read)
- Whatever else the phase scripts pull off the Home/Status/AC screens
Setup basics
- Old Android phone with the BYD Auto Link app, PIN-unlockable, plugged in via USB to a PC/NUC
- Appium + Python 3
- MQTT broker
- Config is a
.envfile with your device name, app PIN, and MQTT broker settings
Heads up
This isn’t using any private/internal API — it’s purely reading what’s visibly shown in the official app, so it’s not affiliated with or endorsed by BYD in any way. It’s GPL-3.0 licensed, so feel free to dig in, fork it, or send improvements. Since it depends on the app’s UI, future app updates may require selector tweaks on my end (or yours, PRs welcome).
A couple of things are still rough edges: the Seat phase isn’t implemented yet, and Location is wrapped in a try/except because Maps’ UI can shift out from under the scraper mid-read.