Watt Budget Charging calculator

Your Xpeng in Home Assistant, with no subscription

Battery, range, charging, locks, tyres, windows, how much solar went into the car: it all shows up in Home Assistant. This guide walks you through how I did it with my Xpeng G6, starting from scratch.

  • ~€76 of hardware (optional)
  • €0 per month
  • One evening to set up
  • Tested on a 2026 G6

There are two paths, and they complement each other. Follow one, the other or both: the card on this page uses both at once.

Xpeng G6 Performance Black Edition
At home · seen 3 min ago
Parked
Xpeng G6
41 %201 kmMedium
Target 100 % · 47.2 kWh to go
020406080100
LockedUnpluggedOnlineHome
Cabin
21 °C
HV batt.
19–20 °C
12 V
12.9 V
Odometer
6,732 km
Tyres and windowsAll good
2.44closed
2.39closed
2.42closed
2.42closed
Energy charged · year558 kWh
● Solar and battery 94 %● Grid 6 %
Saved / yr
91 €
kWh month
76.9
Grid cost
4.61 €
My own Home Assistant card, showing real values. It combines both data sources described here.

How it works, in one minute

Xpeng offers no official Home Assistant integration. So the data travels along two different routes that end up in the same place: a small messaging service called MQTT, which Home Assistant listens to.

Path 1 · WiCAN Pro
Your XpengWiCAN Pro
OBD port
Home
Wi-Fi
Mosquitto
(MQTT)
Home
Assistant
Path 2 · XPENG Direct
Your XpengXpeng cloud
(car's 4G)
XPENG Direct
(Docker)
Mosquitto
(MQTT)
Home
Assistant
Path 1 · WiCAN ProPath 2 · XPENG Direct
What it isA small box plugged into the car's diagnostic (OBD) portFree software that pretends to be the XPENG app on your phone
Cost~€76, onceFree (needs a device that is always on to run it)
DataPrecise state of charge, charge/discharge current, battery temperatures, 12 V voltage, odometerState of charge, range, charging power and time left, locks, cable, tyres, windows, cabin, location
Where it worksOnly when the car is within reach of your Wi-FiAnywhere, over the car's 4G
Depends onNothing: 100% localThe Xpeng cloud and a secondary account

My advice: if you only pick one, start with XPENG Direct (free, lots of data). Add the WiCAN Pro if you want precise, fully local readings, for example to drive charging from your solar panels.

A short glossary for beginners

The technical words used in this guide
Home Assistant
Free home automation software that brings all your home devices together. This guide assumes it is already installed.
MQTT and Mosquitto
MQTT is a "mailbox" where devices drop their readings. Mosquitto is the program acting as that mailbox; it installs in one click inside Home Assistant.
HACS
A community store of add-ons for Home Assistant.
OBD
The car's diagnostic port, the one mechanics use. On the G6 it sits under the steering wheel.
PID
A "question" sent to the car's computer, such as "what is the battery level?".
Docker
A way to run software inside an isolated box without installing anything else. It runs on a compatible NAS, a Raspberry Pi or a mini PC.
Fixed IP address
A device's address on your home network (for example 192.168.1.50). Making it "fixed" in your router stops it from changing.

What you need

  • Home Assistant, installed and reachable from your computer.
  • The Mosquitto broker add-on (Settings → Add-ons → Add-on store). If you already use Zigbee2MQTT, you have it.
  • A dedicated Home Assistant user for MQTT: Settings → People → Users → Add, for example mqtt-xpeng, tick "local access only", not an administrator. Write down its password.
  • For path 1: 2.4 GHz Wi-Fi reaching the spot where the car is parked (the WiCAN cannot see 5 GHz).
  • For path 2: a device that runs 24/7 and can run Docker, plus a second XPENG account (another email address).

1Path 1: the WiCAN Pro dongle

The WiCAN Pro (part number MP-WICAN-PRO, made by MeatPi) costs about €76 excl. VAT from Mouser, or can be ordered from Crowd Supply. Do not buy the basic WiCAN: it is cheaper but too limited.

  1. Install the integration in Home AssistantIn HACS, add the custom repository https://github.com/jay-oswald/ha-wican (category Integration), install it, then restart Home Assistant.
  2. Plug in the dongle and connect to itPlug it into the OBD port under the steering wheel. It creates a Wi-Fi network called WiCAN_xxxxxx (password @meatpi#). Connect your phone or computer to it, then open http://192.168.0.10 in a browser.
  3. Change the password straight awayOtherwise anyone walking past the car can connect to the dongle.
  4. Check the firmware versionAim for v4.51. As of October 2026, v6.00 no longer queries the G6 PIDs and wipes your settings: I tried it and rolled back. Before any update, export a backup of the configuration.
  5. Connect it to your Wi-FiSwitch the dongle to Station mode and pick your 2.4 GHz Wi-Fi. Note its name on the Status tab (like wican_xxxxxxxxxxxx.local) and reserve a fixed IP for it in your router.
  6. Set the protocol and MQTTSettings tab:
    • CAN protocol: AutoPID. Nothing works without it; this is the number one mistake.
    • MQTT broker: Home Assistant's IP, without http:// or a port. Port 1883, with the MQTT user created earlier.
    Save (Store), then reboot the dongle from the About tab.
  7. Load the lightweight G6 profileThe built-in Xpeng profile queries 234 parameters, many of which return wrong values and overload the dongle. Instead, download my 8-parameter profile xpeng_g6_wican.json and import it under Automate → Vehicle Profiles. Do not mix this profile with PIDs added by hand.
  8. Wake the car and checkThe car's network does not answer while it sleeps. Sit inside with the ignition on and compare the battery percentage in Home Assistant with the one on the dashboard: they should match exactly.
What you get

State of charge to one decimal, odometer, high-voltage current (positive when charging, negative when driving: the only reliable way to know the car is charging), min/max battery temperatures, min/max cell voltages, 12 V voltage.

Worth knowing about 2026 G6s

Their battery is an 80.8 kWh LFP pack (no longer NMC). State of health (SOH) and pack voltage do not answer on these batteries yet. If you find the right PIDs, please share them on the GitHub repository.

2Path 2: the XPENG Direct app

XPENG Direct was written by Paul Simon and packaged as a Docker image by Stéphane Bonnell, two members of the "Hey Xpeng France !" Facebook group. It logs into the Xpeng cloud exactly like the app on your phone, then drops the data into MQTT.

  1. Create a secondary XPENG accountCreate a new account in the XPENG app with another email address, then share the car with that account from your main account. Using a separate account protects your main one.
  2. Choose the machine that will run XPENG DirectYou need an always-on device with Docker: a Docker-capable Synology or QNAP NAS, a Raspberry Pi 4 or 5, a mini PC, or an LXC container on Proxmox (my setup). On Debian or Raspberry Pi OS, install Docker with:
    curl -fsSL https://get.docker.com | sh

    On Proxmox, in an unprivileged LXC container, first enable two options from the host shell (replace <ID> with the container number):

    pct set <ID> --features nesting=1,keyctl=1
  3. Start the setup assistant
    docker run -it --rm -v xpeng-storage:/data -p 8765:8765 \
      sbonnell/xpeng-direct:latest /app/setup.sh
    Then open http://machine-IP:8765 in your browser.
  4. Fill in the form
    • Log in with the secondary account.
    • MQTT: address = Home Assistant's IP (without http://), port 1883, MQTT username and password.
    • Battery capacity: for example 80 kWh for a 2026 G6.
    Confirm, then stop the assistant with Ctrl + C.
  5. Check everything was savedOn my setup the broker address stayed empty despite saving, and nothing came through. This command shows the settings file:
    docker run --rm -v xpeng-storage:/data alpine \
      sh -c 'ls -l /data; cat /data/settings.json'
    If the address is empty, repeat step 3.
  6. Run XPENG Direct for good
    docker run -d --name xpeng-direct --restart unless-stopped \
      -v xpeng-storage:/data sbonnell/xpeng-direct:latest
    The --restart unless-stopped option restarts it automatically after a power cut. To see what it is doing:
    docker logs -f xpeng-direct
  7. Find the car in Home AssistantSettings → Devices & services → MQTT: an Xpeng vehicle device appears with its sensors (level, range, locks, cable, tyres, windows, cabin, location…).

To update XPENG Direct later:

docker pull sbonnell/xpeng-direct:latest
docker rm -f xpeng-direct
# then run the “docker run -d …” command above again
Good to know

Every time it starts, the container downloads the XPENG Android app from the APKPure website. If that site is down, XPENG Direct will not start. This is an unofficial community tool: Xpeng may change how things work at any time.

3Inside Home Assistant

  1. Rename the entities right awayThey arrive with unreadable names like sensor.wican_14c19f…_soc. Rename them to sensor.xpeng_g6_soc and so on (Settings → Entities → cog icon). Your cards and automations will be much easier to read.
  2. Add mileage countersTwo "Utility meter" helpers on the odometer, one monthly and one yearly. They show unknown until the second reading: that is normal.
  3. Work out your real consumptionCombining distance driven with the energy measured by your charger gives your real kWh/100 km and cost per 100 km. The Watt Budget calculator does the same on the price side.
  4. Connect Watt Budget to Home AssistantThe car’s battery level is now a sensor: Watt Budget can read it every minute and work out your charges without you typing anything. The four steps.
  5. Build your cardMy card is a custom:button-card (available in HACS). It uses XPENG Direct data when it is less than 30 minutes old, otherwise the WiCAN data, and shows the solar share of every charge. Want the same one? Get in touch through the Watt Budget contact page.

4Precautions

Watch the battery for the first few nights

After the install, my G6's overnight loss went from about 1.3% to 3% per day: the car kept waking up every hour. I could not pin down the cause for certain; the problem went away and it now loses under 1% per day. Note the percentage every morning for a week, or set up an automatic notification.

  • WiCAN sleep: set the sleep threshold just above the 12 V voltage of the sleeping car (13.1 V on my G6), so the dongle goes to sleep at the same time.
  • Read only: neither path can unlock the car or start the air conditioning. For that, stick with the XPENG app (or its Shortcuts on iPhone).
  • Leased car: check your contract before leaving a device plugged in. It comes out in two seconds before you return the car.

Frequently asked questions

Does it work on a P7, G9 or X9?

Probably: the WiCAN profiles cover those models and XPENG Direct mimics the app shared by the whole range. I have only tested the G6, though. Feedback is welcome on GitHub.

The WiCAN stops sending data when the car is parked. Is it broken?

No. A sleeping car stops answering, and the dongle sleeps too. Data comes back as soon as the car wakes up (unlocking, charging, driving off).

Can I install XPENG Direct inside Home Assistant itself?

Not as an add-on for now. You need a separate machine running Docker.

Is my Synology NAS suitable?

Only if it offers Container Manager. Small entry-level models (like my DS213j) cannot run it.

Should I charge an LFP battery to 100%?

Yes, every now and then (every one to two weeks), so the car can recalibrate its charge estimate. That is the opposite of the advice for NMC batteries.

Links and thanks

Thanks to Paul Simon and Stéphane Bonnell for XPENG Direct, to stevelea for the work on Xpeng PIDs, to the MeatPi team and to the "Hey Xpeng France !" community.

What does a charge really cost you? Off-peak tariffs, solar, rapid chargers and XCombo codes: Watt Budget works it all out, free and without an account.

Open Watt Budget