I’ve developed a custom integration for Volvo Cars! The supported models are limited to those compatible with the Volvo API.
Why?
The core integration does not work for my car (XC40 BEV 2024). From what I can tell based on the docs, my integration also has more entities (like charging connection, lock with reduced guard, separate light status entities and other diagnostics).
I’m also planning to include more features in upcoming releases, like smart data refresh interval (so certain sensor will update faster when necessary).
What’s included?
Support for multiple cars
Support for multiple accounts
Translations (currently only EN, so I might need some help on this )
Sensors (energy/fuel consumption, distance to empty battery/tank, battery/fuel level, charging info, avg. speed, service info, odometer, trip meters)
Locks (lock/unlock, reduced guard mode)
Buttons (start/stop climatization, honk, flash)
Location (device tracking, including heading direction)
Images (interior, exterior)
For more details on features and installation, check out the repository! Feel free to create an issue, whether you’ve found a bug or have a feature request.
I was actually using that add-on before. Let me first say that the goal with my integration isn’t to compete, like at all. I just want to offer an alternative.
I didn’t want to make a direct comparison, but since you’ve asked, here are some differences:
Like you said: no requirement on MQTT, but also built as an integration, which should be “less demanding” on resources than an add-on (which is a docker container in the end).
With my car, I count 44 entities with the volvo2mqtt add-on and 68 with my integration. Some entities also include additional information in the attributes, like reason why something is “a problem” (tyre pressure, levels, command results). All entities of my integration are listed on the repository page.
Support for multiple Volvo accounts.
Translatable (but requires help from the community)
The volvo2mqtt add-on currently offers unit conversion, but that is something that I’m planning to add as well. EDIT: HA handles this automatically.
You can run both side by side to see the differences. Just make sure to create an additional API key. And in the end, it all comes down to what you need and your personal preferences.
The API reports time to service in days or months, so I’ve used days as unit value for the sensor. It seems the UI decides to express it in hours. I’ll have a look if that can be influenced somehow. Maybe by changing the device class?
Engine hours to service is reported back in hours by the API. I can convert it to days, but then anything less than 24h will be reported as 0 days. I also don’t know if it goes negative if you wait too long.
Do you mean the switch button? I don’t think that reports back the actual status. If you start preheating via the Volvo app, it won’t toggle the button to “on”. The API doesn’t return that information. That’s why I created buttons to start or stop the preheating.
When switching the button to “on”, volvo2mqtt does automatically stops the preheating after 30 minutes or when a door opens. I haven’t built in this automation, because I believe its up to the car and/or the user to decide what he wants.
@jelmer I’ve just published v0.2.0-b1 with your suggested changes. Since it is a beta release, you’ll need to click “Redownload” in HACS and explicitly choose this version.
Both sensors will report the value in days now. Please note that I had to rename Engine hours to service to Engine time to service. You’ll need to remove the old entity manually.
I’m planning to include some other work before releasing the final v0.2.0. No worries if you want to wait for this.
Unfortunately, yes, GitHub has restricted access to the repo because something discovered (or someone reported) that a hard coded secret is being used. The same one that all other Volvo projects are using, among others evcc (a big project) and volvo2mqtt, but also elsewhere on the internet.
I’ve reached out to GitHub support with my arguments, and here’s hoping that they will reopen my repository. Now I have no idea how long it takes for them to process support tickets.
I’ll post an update when I receive feedback from GitHub.
For when you regain access to the repo: I’ve had some internet outages the last few days, and the integration throws an error and asks to be reconfigured/re-authorized immediately when the internet goes out. Other (cloud) integrations don’t suffer from this.
It’s been a week now and GitHub still didn’t respond to my ticket. Here’s an extract of the automated mail I received after creating my ticket:
Please note, we are receiving higher volumes of support requests and as a result you may experience longer wait times.
Since the wait time is very vaguely described, I’m wondering what the best approach would be. Should I wait a few days longer, or should I just create a new repository (without the secret in it)?
I have updated the opening post with the new repo URL. Since it is under a new URL, you’ll need to remove the current integration from HACS and HA before installing this one. All entities will have the same ID, except for those mentioned in the breaking changes.
Ping me if you encounter an issue or want something added.
This should not happen. Could provide some more details?
At which moment exactly do you receive this error?
The moment you want to add the integration?
After the first step of the setup flow?
After the second (OTP) step of the setup flow?
Somewhere else?
Can you find the stacktrace that comes with the error? You need to open the log file and look for an ERROR on custom_components.volvo_cars. Below that line you should see a Traceback line. Copy everything from the ERROR line until the next log entry (a line that starts with a date).
Which HA version are you using? You need at least v2024.11.0.