What the App doesn't show

Faults and Technical chat for the Volvo XC40
gedger
Posts: 206
Joined: Thu Aug 10, 2023 1:45 pm
Location: Norfolk

Post by gedger »

I was intrigued by the Volvo public API and so spent a few hours adding my car to Home Assistant. All the hard work has been done by others so fairly straightforward process. There's a lot of information that is of questionable benefit but I created my own dashboard with the information that could be useful....I haven't sussed out the MPG yet as it say 3.1 litres but 3.1 litres per ????. If you have an electric car then there is more information on charge status etc.

Screenshot 2023-12-13 at 14.26.17.png

2023 XC40 Plus B4 AWD 19" 360 BLIS Tow bar Fjord Blue

User avatar
m@rk
Posts: 381
Joined: Fri Dec 11, 2020 10:06 pm
Location: Nottinghamshire, United Kingdom

Post by m@rk »

Would it not be 3.1L per 100kM?
XC40 T5 Recharge Inscription Pro - Denim & Blonde
gedger
Posts: 206
Joined: Thu Aug 10, 2023 1:45 pm
Location: Norfolk

Post by gedger »

That would be 91 MPG which would be nice but not correct for a B4. The API does seem very much in development so it may just be giving a duff reading....
2023 XC40 Plus B4 AWD 19" 360 BLIS Tow bar Fjord Blue
User avatar
BrianT58
Posts: 48
Joined: Sun Aug 22, 2021 10:32 am
Location: Portsmampton

Post by BrianT58 »

gedger wrote: Wed Dec 13, 2023 3:33 pm I was intrigued by the Volvo public API and so spent a few hours adding my car to Home Assistant. All the hard work has been done by others so fairly straightforward process. There's a lot of information that is of questionable benefit but I created my own dashboard with the information that could be useful....I haven't sussed out the MPG yet as it say 3.1 litres but 3.1 litres per ????. If you have an electric car then there is more information on charge status etc.

Screenshot 2023-12-13 at 14.26.17.png
I have just spent an hour trying to get this working in my HA with no success. my previous car a 2021 T5 showed up fine but my new 2024 B4 ultimate doesn't appear at all. any chance you can share your setup?
Regards Brian
MY2024 XC-40 Ultimate B4
Image
gedger
Posts: 206
Joined: Thu Aug 10, 2023 1:45 pm
Location: Norfolk

Post by gedger »

The inbuilt Volvo on Call integration doesn't appear to work with AAOS cars at the moment so I used volvo2mqtt which is a bit more involved to setup.

https://github.com/Dielee/volvo2mqtt
2023 XC40 Plus B4 AWD 19" 360 BLIS Tow bar Fjord Blue
User avatar
BrianT58
Posts: 48
Joined: Sun Aug 22, 2021 10:32 am
Location: Portsmampton

Post by BrianT58 »

gedger wrote: Thu Dec 14, 2023 12:54 pm The inbuilt Volvo on Call integration doesn't appear to work with AAOS cars at the moment so I used volvo2mqtt which is a bit more involved to setup.

https://github.com/Dielee/volvo2mqtt
That's the one I've been trying to configure but it keeps telling me that my config settings are wrong. I'll keep playing, I'll get there in the end :?
Regards Brian
MY2024 XC-40 Ultimate B4
Image
gedger
Posts: 206
Joined: Thu Aug 10, 2023 1:45 pm
Location: Norfolk

Post by gedger »

I set mine up as a separate docker instance using docker compose. This is my config, may help?

Code: Select all


version: '3'

services:
    volvo2mqtt:
        image: ghcr.io/dielee/volvo2mqtt:latest
        network_mode: host
        environment:
            - CONF_updateInterval=300
            - CONF_babelLocale=en_GB
            - 'CONF_mqtt=@json { "broker": "192.168.1.10", 
                "username": "volvo", 
                "password": "password",
                "port": 1883}'
            - 'CONF_volvoData=@json {"username": "myemailaddress", 
                "password": "mypassword", 
                "vccapikey": ["from volvo developer API", 
                                "From volvo developer API"], 
                "odometerMultiplier": 1,
                "averageSpeedDivider": 1,
                "vin": "myvin",
                "averageFuelConsumptionMultiplier": 1}'
            - TZ=Europe/London

2023 XC40 Plus B4 AWD 19" 360 BLIS Tow bar Fjord Blue
User avatar
BrianT58
Posts: 48
Joined: Sun Aug 22, 2021 10:32 am
Location: Portsmampton

Post by BrianT58 »

gedger wrote: Thu Dec 14, 2023 5:35 pm I set mine up as a separate docker instance using docker compose. This is my config, may help?

Code: Select all


version: '3'

services:
    volvo2mqtt:
        image: ghcr.io/dielee/volvo2mqtt:latest
        network_mode: host
        environment:
            - CONF_updateInterval=300
            - CONF_babelLocale=en_GB
            - 'CONF_mqtt=@json { "broker": "192.168.1.10", 
                "username": "volvo", 
                "password": "password",
                "port": 1883}'
            - 'CONF_volvoData=@json {"username": "myemailaddress", 
                "password": "mypassword", 
                "vccapikey": ["from volvo developer API", 
                                "From volvo developer API"], 
                "odometerMultiplier": 1,
                "averageSpeedDivider": 1,
                "vin": "myvin",
                "averageFuelConsumptionMultiplier": 1}'
            - TZ=Europe/London

Thanks for this I'll try your approach.
Regards Brian
MY2024 XC-40 Ultimate B4
Image
User avatar
BrianT58
Posts: 48
Joined: Sun Aug 22, 2021 10:32 am
Location: Portsmampton

Post by BrianT58 »

So I have finally got it working, suprise suprise it was me being a *^%&.

However can I ask if your dashboard is shareable?
Regards Brian
MY2024 XC-40 Ultimate B4
Image
gedger
Posts: 206
Joined: Thu Aug 10, 2023 1:45 pm
Location: Norfolk

Post by gedger »

Sure, you'll need to replace VIN with your actual VIN and generate the images to suit your car but I've attached mine for reference. Note that I've made many of the sensors conditional so that they only show when there is a problem or when a door is open.

Code: Select all

title: Home
views:
  - path: default_view
    title: Home
    icon: mdi:car
    badges: []
    cards:
      - type: picture-elements
        title: Car Status
        elements:
          - type: state-label
            entity: lock.volvo_VIN_lock_status
            prefix: 'Car is: '
            style:
              color: green
              top: 25%
              left: 80%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_service_warning_status
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:car-cog
                style:
                  color: red
                  top: 60%
                  left: 92%
          - type: state-label
            entity: sensor.volvo_VIN_time_to_service
            prefix: 'Time to service:'
            style:
              color: orange
              top: 20%
              left: 22%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_washer_fluid_warning
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:wiper-wash-alert
                style:
                  color: red
                  top: 35%
                  left: 65%
          - type: state-label
            entity: sensor.volvo_VIN_average_fuel_consumption
            prefix: 'MPG: '
            style:
              top: 93%
              left: 13%
              border-radius: 5px
              border: 1px solid grey
          - type: state-label
            entity: sensor.volvo_VIN_average_speed
            prefix: 'Avg Spd: '
            style:
              top: 93%
              left: 48%
              border-radius: 5px
              border: 1px solid grey
          - type: state-label
            entity: sensor.volvo_VIN_odometer
            prefix: 'Odo: '
            style:
              top: 4%
              left: 15%
              border-radius: 5px
              border: 1px solid grey
          - type: state-label
            entity: sensor.volvo_VIN_fuel_level
            prefix: 'Fuel: '
            style:
              top: 4%
              left: 49%
              border-radius: 5px
              border: 1px solid grey
          - type: state-label
            entity: sensor.volvo_VIN_distance_to_empty_tank
            prefix: 'Range: '
            style:
              top: 4%
              left: 85%
              border-radius: 5px
              border: 1px solid grey
        : /local/s/hank_side.png?v=1
      - type: picture-elements
        title: Door & Tyre  Status
        elements:
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_door_front_left
                state_not: 'off'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 85%
                  left: 45%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_door_front_right
                state_not: 'off'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 11%
                  left: 45%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_door_rear_left
                state_not: 'off'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 85%
                  left: 60%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_door_rear_right
                state_not: 'off'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 11%
                  left: 60%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_tyre_front_left
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:car-tire-alert
                style:
                  color: red
                  top: 85%
                  left: 25%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_tyre_front_right
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:car-tire-alert
                style:
                  color: red
                  top: 13%
                  left: 25%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_tyre_rear_left
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:car-tire-alert
                style:
                  color: red
                  top: 85%
                  left: 75%
          - type: conditional
            conditions:
              - entity: sensor.volvo_VIN_tyre_rear_right
                state_not: NO_WARNING
            elements:
              - type: icon
                icon: mdi:car-tire-alert
                style:
                  color: red
                  top: 12%
                  left: 75%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_tailgate
                state: 'on'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 50%
                  left: 92%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_engine_hood
                state: 'on'
            elements:
              - type: icon
                icon: mdi:car-door-lock-open
                style:
                  color: red
                  top: 50%
                  left: 6%
          - type: conditional
            conditions:
              - entity: binary_sensor.volvo_VIN_tank_lid
                state: 'on'
            elements:
              - type: icon
                icon: mdi:gas-station
                style:
                  color: red
                  top: 12%
                  left: 83%
          - type: state-icon
            entity: lock.volvo_VIN_lock_status
            style:
              top: 45%
              left: 50%
        : /local/s/hank_top.png?v=3
      - type: map
        entities:
          - entity: person.volvo
        dark_mode: false
        hours_to_show: 0

hank_top.png

hank_side.png

2023 XC40 Plus B4 AWD 19" 360 BLIS Tow bar Fjord Blue
Post Reply