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.
Important note: The Volvo api currently ONLY works in these countries
If you like my work:
*only partly working
Please let me know if your car works with this addon so I can expand the list!
NOTE: Energy status currently available only for cars in the Europe / Middle East / Africa regions. source
As of version v1.9.0, this addon uses the same OTP authentication as the Volvo app. The following steps are required for authentication in exactly this order:
Waiting for otp code... Please check your mailbox and post your otp code to the following mqtt topic "volvoAAOS2mqtt/otp_code". Retry 0/15
Waiting for otp code... Please check your mailbox and post your otp code to the following mqtt topic "volvoAAOS2mqtt/otp_code". Retry 1/15
etc ...
4. Now, open your mailbox and copy your OTP Code
5. Open HomeAssistant and search for the entity ID text.volvo_otp
6. Paste your OTP into the text entity and press Enter
6a. (optional) If your OTP cannot be safed, try to paste your OTP code via MQTT to the following topic: volvoAAOS2mqtt/otp_code
OTP Post Script
1. Safe the following script in your script section
2. Go to https://yourHAUrl/developer-tools/service
3. Search for "Post Volvo OTP"
4. Tick "OTP" and fill in your OTP
5. Run this service
alias: Post Volvo OTP
sequence:
- service: mqtt.publish
metadata: {}
data:
topic: volvoAAOS2mqtt/otp_code
payload: "{{ otp }}"
mode: single
fields:
otp:
selector:
text: null
name: OTP
description: Volvo OTP
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"]}' \
-e TZ='Europe/Berlin' \
--name volvo2mqtt \
ghcr.io/dielee/volvo2mqtt:latest
HA Add-On:
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_mqtt |
json |
logging |
optional | Enable MQTT logging (true/false). Default don't enable MQTT log. |
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_debug |
string |
optional | Debug option (true/false). Normally you don't need this. | |
TZ |
string |
required | Container timezone eg "Europe/Berlin" from here |
$ claude mcp add volvo2mqtt \
-- python -m otcore.mcp_server <graph>