Volvo2Mqtt: Connect your AAOS Volvo 🚙

Same VCC-API-KEY issue here in Finland. Installed the add-on today, made a VCC API account and generated my API App (showing “Only for testing”), using Primary key for the AddOn but with error.

I think that there could be few lines more about the API creation in the README to clarify the pricess. Example is it needed to publish the App, which of the two key to use etc…

Hope to get this working as the legacy VolvoOnCall was not working as I swapped my old Volvo SensusOS car to a new with AAOS.

It take some time until the key is ready to use.
The primary key is correct, there is no need to publish your app.

1 Like

Thank you for your response. I will wait a couple of days.

The message in the Volvo2MQTT log has changed. It now reads:

“Dec 20 18:27:57 volvo2mqtt [106] - INFO: Mqtt update done. Next run in 300 seconds.
Dec 20 18:32:57 volvo2mqtt [106] - INFO: Sending mqtt update…
Dec 20 18:32:57 volvo2mqtt [106] - INFO: Mqtt update done. Next run in 300 seconds.
Dec 20 18:37:57 volvo2mqtt [106] - INFO: Sending mqtt update…
Dec 20 18:37:58 volvo2mqtt [106] - INFO: Mqtt update done. Next run in 300 seconds.”

So, it looks like its working but i can’t find any Volvo related entities?

Look at that, so it has. I restarted the app, and now I am hetting A LOT of emtities frim my car. It just toom like 2 days to start working.

So restart the app.

EDIT: Problem solved! I am using the MQTT add-on but i forgot to tell the MQTT INTEGRATION to connect to the add on. It all works perfectly now.

I have a 2023 XC40 full electric

Solved Problem:
I restarted the Volvo2mqtt app and in the log i see a lot of messages like: success! Window front left is supported!

But when i look for an entity “binary_sensor.volvo” for example, nothing is found…

I am running HA on Virtual Machine, could this be the problem?

Can somebody help me with my issue from a few days ago?

I have it working by just following the instructions of the docker setup, and then you can get the data via the MQTT integration in HA. I have a Mosquitto MQTT broker running in a separate container for which I added the (login) data.

Maybe my question is a bit off-topic but I using the MQTT integration in HA with pleasure, thanks for the good work to make this possible.
Now I want to sent my volvo car data to ABRP route planner. I have issues with google maps now and then while ABRP is very convient to use.
I don’t now if the service to sent the car data to ABRP can be implemented into the Volvo2Mqtt. Otherwise it would be sufficient to me to program it as a service and use a automation to sent it every 10sec. So far this works from a browser:

https://api.iternio.com/1/tlm/send?api_key=****&token=*******0&tlm={“utc”:1553807658,“soc”:90.4,“soh”:97.7,“speed”:0,“lat”:29.564,“lon”:-95.025,“elevation”:50,“is_charging”:0,“power”:13.2,“ext_temp”:25,“batt_temp”:25,“car_model”:" volvo:xc40:20:75",“current”:36.66,“voltage”:360}’

Any help to program this automation in HA would be very helpful.

Thanks, I created a docker application in the end, just in case it’s of use to anyone else.

version: '3'

services:
    volvo2mqtt:
        image: ghcr.io/dielee/volvo2mqtt:1.8.22
        network_mode: host
        environment:
            - CONF_updateInterval=900
            - CONF_babelLocale=en_GB
            - 'CONF_mqtt=@json { "broker": "192.168.x.x", 
                "username": "user", 
                "password": "password",
                "port": 1883}'
            - 'CONF_volvoData=@json {"username": "[email protected]", 
                "password": "secret", 
                "vccapikey": ["myapikey", 
                                "anotherapikey"], 
                "odometerMultiplier": 1,
                "averageSpeedDivider": 1,
                "vin": "VIN",
                "averageFuelConsumptionMultiplier": 10}'
            - CONF_debug=false
            - TZ=Europe/London
1 Like

I didn´t get it - how can i link my VIN with the Volvo Developer Account?
I´m using my private email address for Volvo App Login and Google Auth for Dev portal.

Just use the rest_command for this link

Just found this and worked perfect, you can add 2022 S90 PHEV to the working car list.

It is working fine for my XC90 T8 2023 except for the sunroof status. In both states (open diagonally or fully open) the state remained closed after a couple of refreshes. Normal windows were working fine.

Does anyone else experience the same issue? Or are there people where the sunroof status just works fine?

In case someone else is wondering how he nmcrae85 set this up, I found this way which worked for me (there are special layout grid cards also available):
use vertical-stack as the basis, then add the image card as the first row, and proceed with vertical/horizontal stacks as required. I’ve chosen a slightly different arrangement

type: vertical-stack
cards:
  - type: picture
    image_entity: image.volvo_xc60_exterior_image
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-lock-card
        entity: lock.volvo_xc60_lock_status
        fill_container: true
        name: Lock State
      - type: vertical-stack
        cards:
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xc60_electric_range
            name: Electric Range
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xc60_battery_charge_level
            name: Charge Level
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: device_tracker.volvo_xc60_location
        name: Location
      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_charging_connection_status
        name: Connection Status
      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_charging_system_status
        name: System Status
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_distance_to_empty_tank

      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_odometer

  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_estimated_charging_finish_time

      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xc60_estimated_charging_time

  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: switch.volvo_xc60_climate_status


as you can see I am using the “Mushroom” Collection for the cards

@darek_203 @baybod since you asked how to get this look

I have my username, password and vccapikey in Volvo config options.

Do I also need to use MQTT broker settings? It says
“Leave the settings as they are if you are using the MQTT Mosquitto Addon”
Do I still need to use a Docker?

From log:
Jan 13 20:24:46 volvo2mqtt [106] - INFO: Success! API Backend status is supported by your vehicle.
Jan 13 20:24:48 volvo2mqtt [106] - INFO: Sending mqtt update…
Jan 13 20:24:48 volvo2mqtt [106] - ERROR: API Call failed. Status Code: 401. Error: {
“status”: 401,
“error”: {
“message”: “Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.”

I read it can take a while for the code to be active, is that the case here?

Thanks for this great add-on. However, I can only see a few sensors in home-assistant. When looking at the logs from volvo2mqtt, I see a fair amount of

volvo2mqtt [1] - ERROR: API Call failed. Status Code: 401. Error: {  
                        "status": 401,
                        "error": {  
                            "message": "Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application."
                        }
                    }

The strange thing is that other request seem to work (eg the odometer, distance to empty battery, the image entities, etc). Other sensors also seem to work but give Unknown as a value. When checking the values via developer.volvocars.com I do see the correct values (and can also retrieve the sensors that generate an error message in volvo2mqtt). I’ve waited for a few days now, but everything stays the same. Can anyone help me with this?

1 Like

Hi, could anyone that has this working on unraid help with my config?

Anyone else has this problem? As of yesterday the addon logs starting to show this:

Jan 19 06:15:20 volvo2mqtt [106] - ERROR: API Call failed. Status Code: 401. Error: {
“error” : {
“message” : “Unauthorized”,
“description” : “Full authentication is required to access this resource”
}
}

I has been working find for a time and this came suddenly without any configuration changes…

can someone help me, i feel quite dumb now.
what is the problem by the setup?
Failed to save add-on configuration, does not match regular expression ^([a-zA-Z0-9_.±]+@[a-zA-Z0-9-]+.[a-zA-Z0-9-.]+)|(+\d{5,20})$. Got {‘updateInterval’: 300, ‘babelLocale’: ‘hu_HU’, ‘TZ’: ‘Europe/Budapest’, ‘debug’: False, ‘disable_logging’: False, ‘mqtt’: {‘broker’: ‘auto_broker’, ‘port’: ‘auto_port’, ‘username’: ‘auto_user’, ‘password’: ‘auto_password’}, ‘volvoData’: {‘username’: , ‘password’: ‘’, ‘vin’: ‘’, ‘vccapikey’: , ‘odometerMultiplier’: 1, ‘averageSpeedDivider’: 1, ‘averageFuelConsumptionMultiplier’: 1}}