Volvo2Mqtt: Connect your AAOS Volvo 🚙

Is there a way to set Load Current Limit so we can adjust the current in function of the current produced by an pv system?

Thanks in advance

No sorry. Currently the api don’t support anything like this.

Would someone please test the otp auth ?

Release: v1.9.0b1
Docker Image: Package volvo2mqtt ¡ GitHub

If this works as expected, I will merge the changes into main.

1 Like

I was wondering the same thing about XC40 MY24.

I have a solar system integrated into HA and have installed a non-smart EV charger (3-phase 11kw) that was a gift from the dealership. I would love to be able to change Vehicle’s charging current limit (in ampere) in order to maximize my “self-use” of power.

Any ideas would be much appreciated!

Thanks for a great addon.

Is it possible to get the batteryChargeLevel out? It seems to be returned together with the fuel level on my car but there is no sensor or attribute with the value:

{
  "data": {
    "fuelAmount": {
      "value": 30.2,
      "unit": "l",
      "timestamp": "2024-03-20T15:50:55.129Z"
    },
    "batteryChargeLevel": {
      "value": 48,
      "unit": "%",
      "timestamp": "2024-03-20T15:58:01.988Z"
    }
  }
}```

It will be very nice when the two new sensors (energy:charging_current_limit and energy:target_battery_level) are available.
After that my HomeAssistant can calculate the cheapest charging time by using the values; SoC, Target SoC, Charging Current and Spot price.
At the moment I have to enter the Target Soc and Charging Current manually.
(I use Volvo Cars app to set the Charging time.)

Re: the connection issue in North America and the transition to API 2, I got this message. I am not a developer of the integration; can anyone who is comment on whether this might be good news for North American drivers who would like a working HA integration again?

Important Notice: Deprecation of Connected Vehicle API Version 1 and Migration to Version 2

Dear Users,

With regards to the previous notice, this is a formal reminder of the imminent deprecation of Connected Vehicle API Version 1 on April 30, 2024. Kindly transition to Version 2 promptly to ensure uninterrupted service.

Explore the latest updates of Connected Vehicle API Version 2 [here]
[Connected Vehicle API Version 2]

For questions/assistances regarding this, contact us at [email protected].

Thank you for your cooperation.

Best regards,

Developer Portal - Volvo Cars.

@ajfi-droid2 Came here to research the same. They are definitely deprecating version 1 of the api now in favor of version 2 so im sure some updates are in order.

In regards to NA If you scroll down in the notification it explains that NA is not supported explicitly in production however that their api works globally in test.

I am not sure what “in test” affects this integration but it makes me hopeful this project might be able to hit the test instance for us NA folk

Yeah, the more I read, the more I think this was nothing more than a reminder, and Volvo continues to say nothing about this issue. Sigh!

I stumbled over one little issue in my installation of the add-on in HA using a separate MQTT broker on a different server. The MQTT Broker settings requires the port number to be set in double quotes (“1883”).

I only found out about it going trial and error through each YAML-field as the error msg is quite unspecific and complains about the whole config to be not a valid value.

Is that maybe a bug? As YAML typically doesn’t complain about unquoted interger values.

I created pull request #183 a few days ago which should add the sensors.

Currently waiting until @Dielee has some time to review the changes.

1 Like

Tested version 1.9.0b1 and everything is still working as expected :raised_hands:

When restarting home assistant the add-on does not require any actions. But when restarting the add-on manually I need to fill in the OTP code again.

very interested in this card too, if you do not mind sharing it. very nice work!

sure,

type: vertical-stack
cards:
  - type: picture
    image: https://demo.home-assistant.io/stub_config/t-shirt-promo.png
    image_entity: image.volvo_xxx_exterior_image
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-lock-card
        entity: lock.volvo_xxx_lock_status
        name: Lock State
      - type: vertical-stack
        cards:
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xxx_electric_range
            name: Range
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xxx_battery_charge_level
            name: Battery Charge Level
  - type: horizontal-stack
    cards:
      - type: horizontal-stack
        cards:
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xxx_charging_connection_status
            name: Cable
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xxx_charging_system_status
            name: Charging
          - type: custom:mushroom-entity-card
            entity: sensor.volvo_xxx_estimated_charging_finish_time
            name: Finished
  - type: horizontal-stack
    cards:
      - type: custom:mushroom-entity-card
        entity: sensor.volvo_xxx_average_energy_consumption
        name: Avg Energy
      - type: custom:mushroom-entity-card
        entity: binary_sensor.volvo_xxx_engine_state
        name: Engine

replace xxx with your id

1 Like

Hey. Can someone here help. What is the best process for getting this setup now? I originally did this via MQTT via a docker image. Is this still the best way? Whats all this about the APIv2 stuff?

Is there something I missed? saw this today and it refuses to start.

s6-rc: info: service s6rc-oneshot-runner: starting
s6-rc: info: service s6rc-oneshot-runner successfully started
s6-rc: info: service fix-attrs: starting
s6-rc: info: service fix-attrs successfully started
s6-rc: info: service legacy-cont-init: starting
s6-rc: info: service legacy-cont-init successfully started
s6-rc: info: service legacy-services: starting
s6-rc: info: service legacy-services successfully started
Apr 26 11:20:53 volvo2mqtt [105] - INFO: Starting volvo2mqtt version v1.8.27
Traceback (most recent call last):
  File "/volvoAAOS2mqtt/main.py", line 15, in <module>
    authorize()
  File "/volvoAAOS2mqtt/volvo.py", line 61, in authorize
    raise Exception(message["error_description"])
Exception: Account Locked
s6-rc: info: service legacy-services: stopping
s6-rc: info: service legacy-services successfully stopped
s6-rc: info: service legacy-cont-init: stopping
s6-rc: info: service legacy-cont-init successfully stopped
s6-rc: info: service fix-attrs: stopping
s6-rc: info: service fix-attrs successfully stopped
s6-rc: info: service s6rc-oneshot-runner: stopping
s6-rc: info: service s6rc-oneshot-runner successfully stopped

Hello everyone.
What a great Topic.

New to both Home Assistant and Volvo Cars.

I managed to install and config all requirements but i stumbled in something big … What Now ? How i put the Volvo2Mqtt in a dashboard ?

I am attaching the log from Volvo2Mqtt

You need to install the MQTT integration in HA and point it at the MQTT server. HA will then create the sensors etc for you.

2 Likes

Have tried to get this working on multiple occasions. But it always fails when I try to save my configuration. I always get an error.

Its like when it installs the add-on, it fails to install correctly. So whatever file it should save the configuration to doesnt seem to exist. When browsing my yaml’s with studio code server, there are no sign of Volvo2mqtt anywhere.

I get the same error no matter if i try to configure with the UI or direct in YAML.

Please help

The configuration could not be saved, Missing option ‘volvoData’ in root in Volvo2Mqtt (982ee2c4_volvo2mqtt). Got {‘updateInterval’: 300, ‘babelLocale’: ‘da_DK’, ‘TZ’: ‘Europe/Berlin’, ‘debug’: False, ‘disable_logging’: False, ‘mqtt’: {‘broker’: ‘auto_broker’, ‘port’: ‘auto_port’, ‘username’: ‘auto_user’, ‘password’: ‘auto_password’}}

Look at the error, it says “Missing option ‘volvoData’ in root in Volvo2Mqtt”.

You need to add the volvoData object with at least username, password and vccapikey properties.

volvoData:
  username: xxx
  password: xxx
  vccapikey: xxx

More info on how to setup available in the repo: GitHub - Dielee/volvo2mqtt: Home Assistant addon for connecting AAOS Volvos