Volvo2Mqtt: Connect your AAOS Volvo šŸš™

I noticed a nice addition to the latest update: volvo_<VIN>_exterior_image

However, what is the appropriate approach to incorporate this image into your user interface? I am having trouble finding an easy way to display it (I might overlook something)

  • type: picture
    image_entity: image.volvo_yv1xzedvenxxxxxxxxx_exterior_image
1 Like

I literally just installed this and am far from an expert on it, but I wonder if this could be used for custom dashboards (e.g. Lovelace dashboards)? Iā€™m not sure how critically useful it is versus just finding a picture of your vehicle (since itā€™s not going to change over the life of the vehicle), but I agree that itā€™s neat!

Iā€™ve just started to use this add-on, but Iā€™m loving it so far and am so thankful that it exists and seems to work well. Thanks so much, @Dielee ā€¦ !

One question I have is about the Fuel Level entity. For my vehicle, it seems to be the one thing thatā€™s off and that I donā€™t see others asking about. For me, it says ā€œ229.4 litersā€, which seems off, as itā€™s more than three times the total capacity of the vehicleā€™s fuel tank, and my tank is not full, for that matter.

Does anyone have any suggestions for troubleshooting this? Itā€™s not the end of the world, of course, but Iā€™d love to get it working correctly if at all possible. Thank you all, and thanks again for creating this add-on and providing it to the community!

Possibly there is nothing I can do for you. The Volvo API delivers strange values some times. Please enable debug an upload the debug log file.

Thank you for the quick response and information - thatā€™s understood. Just in case, once Iā€™m able to, Iā€™ll share my debug log with you - thanks for offering, and thanks again for your work on this awesome add-on!

Thank you, that was quite simple.

3 Likes

Just found this add-on and setting it up. Though Iā€™ve set the locale to en_US (Iā€™m in the US) the fluid units are in liters. The distances are in miles. Is this correct?

Nevermind - I figured out the issue

Hi, Iā€™m just starting to setup this addon but after configuring I get this error

Traceback (most recent call last):
  File "/volvoAAOS2mqtt/./main.py", line 13, in <module>
    authorize()
  File "/volvoAAOS2mqtt/volvo.py", line 55, in authorize
    raise Exception(message["error_description"])
Exception: Account Locked

Is there any way to unlock the Account?

I guess it gets unlocked after a while.
But Iā€™m getting this error before the account gets locked

Traceback (most recent call last):
  File "/volvoAAOS2mqtt/./main.py", line 13, in <module>
    authorize()
  File "/volvoAAOS2mqtt/volvo.py", line 55, in authorize
    raise Exception(message["error_description"])
Exception: We didn't recognize the username or password you entered. Please try again.

Now I need to figure out why the user/pass is not correct. Any hints?
Do I need to publish the application? The user/pass should be used from the VolvoID account?

You have to login with your Volvo ID credentials. Those are the same as used in the Volvo app. Your given email/password is simply wrong. Recheck everything and try to login with this credentials into the Volvo app.

1 Like

EDIT: I just found the engine binary_sensor, Iā€™ll test if that works. Thereā€™s also a sensor for the engine state but thatā€™s always unknownā€¦

Do you have any idea how we could determine if the vehicle is started? I would like to make some automations for calculating trip costs and right now Iā€™m using the odometer sensor, because it will get updated when the car is turned off. From what I saw in the app once the vehicle starts it cuts off all communication ā€œfor security purposesā€. @Dielee I was thinking that maybe thereā€™s a type of HTTP status code returned when the vehicle isnā€™t responding, do you have any idea how we can try this?

Also, my fuel is going up and down even when Iā€™m only using the electric engine, any ideas why this is happening? I understand why the range would change based on my driving, but the amount of fuel in the tank should always be the same regardless of my driving style, right? Today for example I took a short 2km trip to the store which used 5% battery but the tank had 2 extra liters in it at the endā€¦

There should be a ā€œEngine runningā€ binary sensor, if your car supports this. If not, there is no way to check if the engine is running, sorry.

Why your fuel changes while driving, I canā€™t say, sorry. Maybe you have to ask Volvo whatā€™s going on there.

Just found the binary_sensor, thanks! Regarding the fuel, Iā€™m sure itā€™s a problem on their end, but I was trying to see maybe thereā€™s a logical explanation for this. If itā€™s unreliable then I canā€™t calculate a cost for short trips because it will always oscillate +/- 1 or 2 liters and that defeats the purpose.

Somehow the lovelace ā€˜picture-elementsā€™ is not capable of showing the (exterior) image as a background.
I now just replaced it via the exact URL. It works, as long as the URL stays alive. Does somebody have a suggestion to implement it more perfect? Better designs are also welcome :slight_smile:

Screenshot 2023-08-04 at 19.34.51

@Dielee : suggest to implement the API diagnostics too (/vehicles/{vin}/diagnostics). This enables us to implement service statuses and warning/alerts. Happy to help, I just need a guide in creating a PR to your git.

1 Like

I just want to share the dashboard Iā€™ve been working on this week, maybe it gives you some ideas. I made some sensors that give me the following data:

  • fuel/battery consumption for a trip
  • cost per trip
  • average cost per kilometer
  • overall cost per kilometer (battery + fuel costs since I bought the car divided by distance drove until now)
  • utility meters that measure how much I drive each day or each month, or how much battery I consume daily/monthly
  • total fuel/battery costs until now

Iā€™m looking for more ideas, especially on the dasbhoard UI. Hereā€™s what I have:


I also have another version that resembles the app but I like the first one more:

3 Likes

Hello thewindev

Can you share with us the code of this 2 dashboards ?
Thanks

Sullivan

1 Like

very good project, congratulations .

Sure, in this gist you have the lovelace yaml for the two dashboards, and I also added the code for the Node-Red flows and the template sensors.

Maybe this can help as well:

2 Likes

Is it possible that requesting data from the car every 5 minutes drains the 12V battery? Iā€™ve had some issues this morning that seem like they were caused by a drained 12v battery.

I donā€™t think the data is requested directly from the car. Most likely the car sends updates to the Volvo servers whenever something happens (location changes, battery level changes, etc) and the API just returns the latest values it got from the car. Iā€™m not sure this is the case, Iā€™m just saying how I wouldā€™ve done it as a developer :sweat_smile: