It does seem to be an issue on the Volvo API side. I use this great (thank you for this integration!) integration besides a Node-RED API call automation. They both receive the same data. Besides that I still do see different values for battery state in the Volvo app, but different from the actual SoC of our car (XC40 Recharge 2023 model). So none of the sources was showing correct yesterday.
Today it seems to be working again.
Is there anyway of installing this on a containerised Home Assistant that doesnât support Add-Ons?
Hi, Iâm looking to build some logic in to NodeRed so that I can run commands to lock/unlock the car and turn pre-conditioning on without having HA running.
At the moment I can connect to the car and run everything through HA but wanted to know what MQTT topics and payloads I should be sending so that I can trigger Volvo2Mqtt to lock/unlock the car directly from NodeRed without having to go via HA.
Apologies for posting about how not to use HA in this scenario but does anyone know if this is possible and if so, what the MQTT topics and payloads are please?
Thanks.
Hi everyone,
I have HA Supervisor with Debian 12 and encountering below error:
â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
curl: (7) Failed to connect to supervisor port 80 after 1 ms: Couldnât connect to server
[22:04:04] ERROR: Something went wrong contacting the API
Nov 02 22:04:06 volvo2mqtt [103] - INFO: Starting volvo2mqtt version v1.8.8
Traceback (most recent call last):
File â/volvoAAOS2mqtt/main.pyâ, line 14, in
connect()
File â/volvoAAOS2mqtt/mqtt.pyâ, line 39, in connect
client.connect(settings[âmqttâ][âbrokerâ], port)
File â/usr/lib/python3.11/site-packages/paho/mqtt/client.pyâ, line 914, in connect
return self.reconnect()
^^^^^^^^^^^^^^^^
File â/usr/lib/python3.11/site-packages/paho/mqtt/client.pyâ, line 1044, in reconnect
sock = self._create_socket_connection()
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/usr/lib/python3.11/site-packages/paho/mqtt/client.pyâ, line 3685, in _create_socket_connection
return socket.create_connection(addr, timeout=self._connect_timeout, source_address=source)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/usr/lib/python3.11/socket.pyâ, line 851, in create_connection
raise exceptions[0]
File â/usr/lib/python3.11/socket.pyâ, line 831, in create_connection
sock = socket(af, socktype, proto)
^^^^^^^^^^^^^^^^^^^^^^^^^^^
File â/usr/lib/python3.11/socket.pyâ, line 232, in init
_socket.socket.init(self, family, type, proto, fileno)
PermissionError: [Errno 13] Permission denied
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â
If I am using
mqtt:
broker: auto_broker
port: auto_port
username: auto_user
password: auto_password
â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
curl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldnât connect to server
[22:10:08] ERROR: Something went wrong contacting the API
Nov 02 22:10:10 volvo2mqtt [102] - INFO: Starting volvo2mqtt version v1.8.8
Traceback (most recent call last):
File â/volvoAAOS2mqtt/main.pyâ, line 13, in
set_mqtt_settings()
File â/volvoAAOS2mqtt/util.pyâ, line 134, in set_mqtt_settings
raise Exception(âMQTT connection could not be established. Please check if your MQTT Add-On is running!â)
Exception: MQTT connection could not be established. Please check if your MQTT Add-On is running!
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â
Solved by editing apparmor.txt
Hi all,
Iâm having problems starting the integration. I have started the docker container with the right conf for Mosquitto and the VCC-API-KEYS I just created but the logs show the following: âmessage": âAccess denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.ââ
Iâve regenerated the two keys and passed them to docker as in the example, but I keep on getting the same message. Do you need to publish the application for the API keys to work? So far I just create an App and generated the two API keys, but I did not publish the application. I assume I must be doing something wrong with my devel API conf.
Any hints?
Thanks!
UPDATE: Even though I keep on seeing that message in the docker logs it turns out that Home Assistant does receive all the sensors data via Mosquitto, so everything seems to be working.
/Nacho
Just wanted to check if others are seeing their Battery Level no longer returning data. Started just today.
Nov 07 15:48:37 volvo2mqtt [106] - INFO: Failed, Battery Charge Level is unfortunately not supported by your vehicle.
Worked for months. XC90 2024 Recharge Ultimate.
After a restart of volvo2mqtt I also lost battery level, but also some other sensors like windows, doors. Some are still working.
Engine status is not working, now again.
Volvo C40 MY24 here. Battery charge level is not working any more. Energy API has never returned any values for me, and the volvo2mqtt add-on tries polling the OpenAPI (Connected Vehicle API) as well as a fall back. Now that doesnât work either.
If I manually go to the Volvo Developer portal Overview â Connected Vehicle API â APIs | Volvo Cars Developer Portal and try the Get Battery Charge Level endpoint on the v1 API, it get a correct response. Unfortunately, Iâm not skilled enough to grab that into Home Assistant, so now my EV has most of its entities in Home Assistant apart from one of the most important one; battery charge.
Please update to version v1.8.11. It will fix the API changes by Volvo and moves the battery charging endpoint back to V1.
Could you, please, update apparmour.txt to enable Debian 12 and HA connection?
Capabilities
capability,
file,
signal (send) set=(kill,term,int,hup,cont),
network,
Thanks
Would you please format this config right ? Iâm unsure what have to be insite the apparmor.txt at this time.
At this moment it is only:
âfile,
signal (send) set=(kill,term,int,hup,cont),â
WIth this configuration in Debian there is a api error to connect to the supervisor port:
âcurl: (7) Failed to connect to supervisor port 80 after 0 ms: Couldnât connect to server
[22:10:08] ERROR: Something went wrong contacting the APIâ
I know what it is at this timeâŠ
So please send your working config in a formated format.
#include <tunables/global>
profile 982ee2c4_volvo2mqtt flags=(attach_disconnected,mediate_deleted) {
#include <abstractions/base>
# Capabilities
capability,
file,
signal (send) set=(kill,term,int,hup,cont),
network,
# Receive signals from S6-Overlay
signal (receive) peer=*_ADDON_SLUG,
# Access to options.json and other files within your addon
/data/** rw,
# Access to mapped volumes specified in config.json
/share/** rw,
# Access required for service functionality
/usr/bin/myprogram r,
/bin/bash rix,
/bin/echo ix,
/etc/passwd r,
/dev/tty rw,
# Allow outbound MQTT communication
network tcp,
network inet stream,
network inet dgram,
network inet6 stream,
network inet6 dgram,
# Add any additional MQTT-related rules if needed
# For example, if you're using the paho-mqtt library
/usr/bin/python3 cx -> paho.mqtt,
/usr/lib/python3.11/site-packages/paho/mqtt/** r,
This is incomplete⊠Please pm me.
Hello! Thatâs just beautiful. Would you please share your yaml? I cannot wait to use it with my carâŠ
Thank you in advance!
I have the same issue with ânon valid API-keyâ. Some of the sensors are found by HA, however, they do not receive any values (status Unknown).
Iâm having troubles with the VCC API Key. Iâve tried creating three apps, copying the Primary Key into the config, and I always get the same error message:
Access denied due to invalid VCC-API-KEY. Make sure to provide a valid key for an active application.
Iâve tried the VCC API Key in the example âlist VINsâ curl example on the API site (with the demo/dummy vehicle), and I get the same error message, so itâs not a Volvo2Mqtt issue per se.
Iâm only asking here as youâve all gotten this to work and I thought Iâd ask to help me figure out where my VCC API access is going wrong.
If there are any gotchas newbies miss on getting the API to respond to basic requests, Iâd love to hear it. I must be doing something wrong, but I donât know what!
Like, is there a delay between establishing a Volvo API account and it working?
Volvo site says under my app
Status: Only for testing
Requests today: 0 out of 10 000
Iâm in Australia if that means anything.
Thanks!
Sean