/volvo2mqtt

Home Assistant addon for connecting AAOS Volvos

Primary LanguagePythonMIT LicenseMIT

Volvo2Mqtt

Supports aarch64 Architecture Supports amd64 Architecture Supports armhf Architecture Supports armv7 Architecture Supports i386 Architecture
Project Maintenance GitHub Release GitHub Activity

This component establishes a connection between the newer AAOS Volvo cars and Home Assistant via MQTT.
Maybe this component works also with other Volvo cars. Please try out the native Volvo integration before using this component! If the native component doesn't work for your car, try this mqtt bridge.

Home Assistant thread can be found here.

If you like my work:
ko-fi

Confirmed working with

  • XC40 BEV (2024)
  • XC40 BEV (2023)
  • XC40 BEV (2022)
  • XC40 PHEV (2021)
  • V60 T8 PHEV (2023)
  • C40 BEV (2023)
  • C40 BEV (2022)
  • XC90 T8 PHEV (2023)
  • XC60 PHEV (2024)
  • XC60 PHEV (2023)
  • XC60 PHEV (2022)
  • XC90 PHEV T8 (2023)
  • XC90 PHEV T8 (2024)
  • V90 PHEV T8 (2019)*

*only partly working

Please let me know if your car works with this addon so I can expand the list!

Supported features

  • Lock/unlock car
  • Start/stop climate
  • Sensor "Battery Charge Level"
  • Sensor "Electric Range"
  • Sensor "Charging System Status"
  • Sensor "Charging Connection Status" (partly broken since 2.10 car update)
  • Sensor "Estimated Charging Finish Time"
  • Sensor "Door Lock Status (All doors, tank lid, and engine hood)"
  • Sensor "Window Lock Status (All windows and sunroof - Thanks to @navet)"
  • Sensor "Engine Status"
  • Sensor "Odometer"
  • Sensor "Tire Status"
  • Sensor "Fuel Status"
  • Sensor "Average Fuel Consumption"
  • Sensor "Average Speed"
  • Sensor "Distance to Empty"
  • Sensor "Hours to Service"
  • Sensor "Distance to Service"
  • Sensor "Months to Service"
  • Sensor "Service warning status"
  • Sensor "Service warning trigger"
  • Car Device Tracker
  • Multiple cars

NOTE: Energy status currently available only for cars in the Europe / Middle East / Africa regions. source

Setup

Docker:

Just install this addon with the following command. Please note to fill in your settings inside the environment variables.

docker run -d --pull=always -e CONF_updateInterval=300 -e CONF_babelLocale='de' -e CONF_mqtt='@json {"broker": "", "username": "", "password": "", "port": 1883}' -e CONF_volvoData='@json {"username": "", "password": "", "vin": "", "vccapikey": ["key1", "key2"], "odometerMultiplier": 1, "averageSpeedDivider": 1, "averageFuelConsumptionMultiplier": 1}' -e TZ='Europe/Berlin' --name volvo2mqtt ghcr.io/dielee/volvo2mqtt:latest

HA Add-On:

Open your Home Assistant instance and show the add add-on repository dialog with a specific repository URL pre-filled.

Here is what every option means:

Environment Variable Name Type Json Option Default Description
CONF_updateInterval int required Update intervall in seconds.
CONF_babelLocale string required Select your country from this list. "Locale name" is the column you need!
CONF_mqtt json broker required Your MQTT Broker IP. Eg. 192.168.0.5.
CONF_mqtt json port 1883 Your MQTT Broker Port. If no value is given, port 1883 will be used.
CONF_mqtt json username optional MQTT Username for your broker.
CONF_mqtt json password optional MQTT Password for your broker.
CONF_volvoData json username required Normally your email address to login into the Volvo App.
CONF_volvoData json password required Your password to login into the Volvo App.
CONF_volvoData json vin optional A single VIN like "VIN1" or a list of VINs like "["VIN1", "VIN2"]". Leave this empty if you don't know your VIN. The addon will use every car that is tied to your account.
CONF_volvoData json vccapikey required VCCAPIKEY linked with your volvo developer account. Get your Vccapi key from here. Starting version 1.8.0, it is possible to define multiple keys, like this: ["vccapikey1", "vccapikey2", "vccapikey3", "etc..."]
CONF_volvoData json odometerMultiplier optional The multiplier value for the odometer value, as the volvo api delivers inconsistent data. For some cars this setting is 10, for some 1. Try what's right for your car. If you leave it empty, the multiplier will be 1.
CONF_volvoData json averageSpeedDivider optional The divider value for the average speed value, as the volvo api delivers inconsistent data. For some cars this setting is 10, for some 1. Try what's right for your car. If you leave it empty, the divider will be 1.
CONF_volvoData json averageFuelConsumptionMultiplier optional The multiplier value for the average fuel consumption value, as the volvo api delivers inconsistent data. For some cars this setting is 10, for some 1. Try what's right for your car. If you leave it empty, the multiplier will be 1.
CONF_debug string optional Debug option (true/false). Normally you don't need this.
TZ string required Container timezone eg "Europe/Berlin" from here