Giter Club home page Giter Club logo

weconnect-mqtt's People

Contributors

dependabot[bot] avatar stefanroeck avatar tillsteinbach avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

weconnect-mqtt's Issues

cannot import name 'Final' from 'typing'

Hi,

I'm not able to run the script.
I did a fresh installation and all I get is:

pi@nodered:~ $ ~/.local/bin/weconnect-mqtt
Traceback (most recent call last):
  File "/home/pi/.local/bin/weconnect-mqtt", line 6, in <module>
    from weconnect_mqtt.weconnect_mqtt import main
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 16, in <module>
    from weconnect import weconnect, addressable, errors, util
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/weconnect.py", line 18, in <module>
    from weconnect.elements.vehicle import Vehicle
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/elements/vehicle.py", line 2, in <module>
    from typing import Dict, Any, Type, Final, Optional, cast, TYPE_CHECKING
ImportError: cannot import name 'Final' from 'typing' (/usr/lib/python3.7/typing.py)

It's running on Rasbian.
Any ideas?

Exception with honkAndFlashControl

Good morning,
version 0.40.0 of the Docker image creates an exception and does not publish data to mqtt.

Would be nice if you could take a look.

2022-09-23T05:10:37+0000:ERROR:client:Caught exception in on_connect: 'NoneType' object has no attribute 'enabled'
Exception in thread Thread-1 (_thread_main):
Traceback (most recent call last):
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
self.run()
File "/usr/local/lib/python3.10/threading.py", line 953, in run
self._target(*self._args, **self._kwargs)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main
self.loop_forever(retry_first_connection=True)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever
rc = self._loop(timeout)
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop
rc = self.loop_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read
rc = self._packet_read()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read
rc = self._packet_handle()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3039, in _packet_handle
return self._handle_connack()
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3138, in _handle_connack
on_connect(
File "/usr/local/lib/python3.10/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 585, in on_connect_callback
self.updateWeConnect()
File "/usr/local/lib/python3.10/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 446, in updateWeConnect
self.weConnect.update(updateCapabilities=self.updateCapabilities, updatePictures=self.updatePictures, selective=self.selective)
File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 181, in update
self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 199, in updateVehicles
vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI,
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 124, in init
self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective)
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 218, in update
self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective)
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 372, in updateStatus
self.controls.update()
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/controls.py", line 67, in update
self.honkAndFlashControl.enabled = False # TODO: Remove this line when the endpoint becomes available

climatisation

Hallo Till,

ich konnte früher mit dem Code deiner "FHEM examples" über den Befehl set MyCar climatisation start die Klimatisierung einschalten.
Hat sich da was geändert? Muss ich etwas umstellen, damit das wieder funktioniert?

Gruß
Reiner

Issue during Docker start

Hi,

I want to switch my WeConnect-mqtt to a docker container. But it's not starting:

  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 174, in _new_conn,
    conn = connection.create_connection(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/connection.py", line 73, in create_connection,
    for res in socket.getaddrinfo(host, port, family, socket.SOCK_STREAM):,
  File "/usr/local/lib/python3.9/socket.py", line 953, in getaddrinfo,
    for res in _socket.getaddrinfo(host, port, family, type, proto, flags):,
socket.gaierror: [Errno -3] Try again,
,
During handling of the above exception, another exception occurred:,
,
Traceback (most recent call last):,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 699, in urlopen,
    httplib_response = self._make_request(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 382, in _make_request,
    self._validate_conn(conn),
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 1010, in _validate_conn,
    conn.connect(),
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 358, in connect,
    conn = self._new_conn(),
  File "/usr/local/lib/python3.9/site-packages/urllib3/connection.py", line 186, in _new_conn,
    raise NewConnectionError(,
urllib3.exceptions.NewConnectionError: <urllib3.connection.HTTPSConnection object at 0xb5bdf1c0>: Failed to establish a new connection: [Errno -3] Try again,
,
During handling of the above exception, another exception occurred:,
,
Traceback (most recent call last):,
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 439, in send,
    resp = conn.urlopen(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 783, in urlopen,
    return self.urlopen(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 783, in urlopen,
    return self.urlopen(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 783, in urlopen,
    return self.urlopen(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/connectionpool.py", line 755, in urlopen,
    retries = retries.increment(,
  File "/usr/local/lib/python3.9/site-packages/urllib3/util/retry.py", line 574, in increment,
    raise MaxRetryError(_pool, url, error or ResponseError(cause)),
urllib3.exceptions.MaxRetryError: HTTPSConnectionPool(host='login.apps.emea.vwapps.io', port=443): Max retries exceeded with url: /authorize?nonce=jrQusoT7mxW9NOoC&redirect_uri=weconnect://authenticated (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb5bdf1c0>: Failed to establish a new connection: [Errno -3] Try again')),
,
During handling of the above exception, another exception occurred:,
,
Traceback (most recent call last):,
  File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 208, in main,
    mqttCLient.connectWeConnect(username=username, password=password, maxAgePictures=args.pictureCache),
  File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 276, in connectWeConnect,
    self.weConnect = weconnect.WeConnect(username=username, password=password, updateAfterLogin=False, updateCapabilities=self.updateCapabilities,,
  File "/usr/local/lib/python3.9/site-packages/weconnect/weconnect.py", line 205, in __init__,
    self.login(),
  File "/usr/local/lib/python3.9/site-packages/weconnect/weconnect.py", line 270, in login,
    tryLoginResponse: requests.Response = self.__session.get(tryLoginUrl, allow_redirects=False),
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 555, in get,
    return self.request('GET', url, **kwargs),
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in request,
    resp = self.send(prep, **send_kwargs),
  File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 655, in send,
    r = adapter.send(request, **kwargs),
  File "/usr/local/lib/python3.9/site-packages/requests/adapters.py", line 516, in send,
    raise ConnectionError(e, request=request),
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='login.apps.emea.vwapps.io', port=443): Max retries exceeded with url: /authorize?nonce=jrQusoT7mxW9NOoC&redirect_uri=weconnect://authenticated (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0xb5bdf1c0>: Failed to establish a new connection: [Errno -3] Try again')),
,
During handling of the above exception, another exception occurred:,
,
Traceback (most recent call last):,
  File "/usr/local/bin/weconnect-mqtt", line 8, in <module>,
    sys.exit(main()),
  File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 245, in main,
    mqttCLient.disconnect(),
  File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 271, in disconnect,
    disconectPublish.wait_for_publish(),
  File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 362, in wait_for_publish,
    raise RuntimeError('Message publish failed: %s' % (error_string(self.rc))),
RuntimeError: Message publish failed: The client is not currently connected.

Error code -6

Hello,
since this afternoon, i've got a connexion error in the mqtt stream.

'''Retrieval error during update. Will try again after configured interval of 300s'''
code error -6

The last data I received was at 2021-09-27T14:33:44+00:00
Am I the only one?
Thanks

ERROR:client:Caught exception in on_connect: invalid literal for int() with base 10: ''

Hello Tim,

I have not been getting any data from Weconnect for a few days now. I then updated the container ( The image is from 2022-08-24 12:06:42), but the problem persists. Strangely enough, only with my Passat. But not with the ID 3 of my wife.

The full log from Portainer looks like this:

2022-09-19T12:35:00+0200:ERROR:client:Caught exception in on_connect: invalid literal for int() with base 10: '',
Exception in thread Thread-1 (_thread_main):,
Traceback (most recent call last):,
File "/usr/local/lib/python3.10/threading.py", line 1016, in _bootstrap_inner,
self.run(),
File "/usr/local/lib/python3.10/threading.py", line 953, in run,
self._target(*self._args, **self._kwargs),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3591, in _thread_main,
self.loop_forever(retry_first_connection=True),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1756, in loop_forever,
rc = self._loop(timeout),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1164, in _loop,
rc = self.loop_read(),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 1556, in loop_read,
rc = self._packet_read(),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 2439, in _packet_read,
rc = self._packet_handle(),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3039, in _packet_handle,
return self._handle_connack(),
File "/usr/local/lib/python3.10/site-packages/paho/mqtt/client.py", line 3138, in _handle_connack,
on_connect(,
File "/usr/local/lib/python3.10/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 583, in on_connect_callback,
self.updateWeConnect(),
File "/usr/local/lib/python3.10/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 444, in updateWeConnect,
self.weConnect.update(updateCapabilities=self.updateCapabilities, updatePictures=self.updatePictures, selective=self.selective),
File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 181, in update,
self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective),
File "/usr/local/lib/python3.10/site-packages/weconnect/weconnect.py", line 199, in updateVehicles,
vehicle = Vehicle(weConnect=self, vin=vin, parent=self.__vehicles, fromDict=vehicleDict, fixAPI=self.fixAPI,,
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 124, in init,
self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures, selective=selective),
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 218, in update,
self.updateStatus(updateCapabilities=updateCapabilities, force=force, selective=selective),
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/vehicle.py", line 330, in updateStatus,
self.domains[domain.value][key] = className(vehicle=self, parent=self.domains[domain.value], statusId=key,,
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 30, in init,
super().init(vehicle=vehicle, parent=parent, statusId=statusId, fromDict=fromDict, fixAPI=fixAPI),
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/generic_status.py", line 38, in init,
self.update(fromDict=fromDict),
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 53, in update,
self.warningLights[warningLightDict['messageId']] = WarningLightsStatus.WarningLight(fromDict=warningLightDict,,
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 100, in init,
self.update(fromDict),
File "/usr/local/lib/python3.10/site-packages/weconnect/elements/warning_lights_status.py", line 113, in update,
self.priority.fromDict(fromDict, 'priority'),
File "/usr/local/lib/python3.10/site-packages/weconnect/addressable.py", line 301, in fromDict,
self.setValueWithCarTime(int(fromDict[key]), lastUpdateFromCar=None, fromServer=True),
ValueError: invalid literal for int() with base 10: '',

If you could have a look there please?

Thank you very much!

Ralf

Error messages

I get the following errors
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/climatisationWithoutExternalPower: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/climatizationAtUnlock: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/windowHeatingEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneFrontLeftEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneFrontRightEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneRearLeftEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneRearRightEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: id /vehicles/XXXXXX/controls/charging cannot be set. You need to provide it in the correct format select one of [start, stop]
INFO:weconnect-mqtt:Error setting value: id /vehicles/XXXXXX/controls/climatization cannot be set. You need to provide it in the correct format select one of [start, stop]
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/climatisationWithoutExternalPower: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/climatizationAtUnlock: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/windowHeatingEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneFrontLeftEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneFrontRightEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXXstatus/climatisationSettings/zoneRearLeftEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: /vehicles/XXXXXX/status/climatisationSettings/zoneRearRightEnabled: new value must be of type <class 'bool'> but is of type <class 'str'>
INFO:weconnect-mqtt:Error setting value: id /vehicles/XXXXXX/controls/charging cannot be set. You need to provide it in the correct format select one of [start, stop]
INFO:weconnect-mqtt:Error setting value: id /vehicles/XXXXXX/controls/climatization cannot be set. You need to provide it in the correct format select one of [start, stop]

Most data is received in MQTT server.

Timezone

Hallo Till,

die Zeitangaben in den Fhem-Readings sind immer um eine Stunde zurück.

2022-02-13 09:40:26+00:00

Wie stelle ich es an, dass ich die Angabe passend zu unserer Zeitzone Deutschland erhalte?

Die Anpassung der docker-compose klappt jedenfalls nicht.

    environment:
      - TZ=Europe/Berlin

Gruß
Reiner

Less data than before and payload always 1008

Hello Tim,

after I had problems receiving data from my Passat a few days ago, you were able to help me very quickly with the update to 0.40.0. Now it is so that we have problems with the data we query for the ID 3 of my wife from VW. However, it is here so that a login works and also no messages appear in the log from the Portainer. Only the fields that come back are incomplete and all filled with 1008 as payload.

I attach you a screenshot of my home automation tool, from which the communication with your weconnect-mqtt is quite clear.
What is immediately noticeable is the message "Incomplete packet. Wait for more data".

What I can say is that my wife could log in to weconnect in the browser without any problems...
And the problem occurs with your old version as well as with the current 0.40.0.

grafik

Best regards
Ralf

Autostart-Script (changes/error/warning)

i must change the script ->ExecStart=/usr/bin/python to ExecStart=/usr/bin/python3 on my Ubuntu 20.04 to work.
the script is perfect and works now greate.

thx for your work
regards
simon

Can't see any mqtt messages

Hey,

i have this program running within a docker container. On startup, i get the following logs:

weconnect-mqtt_composed | INFO:weconnect-mqtt:Connect to WeConnect
weconnect-mqtt_composed | INFO:weconnect:Token refreshed

So everything looks fine. I would now expect to get some messages every 5 minutes on a topic starting with weconnect (looked into your code), but nothing is happening. When having the cli tool run in parallel, i get updates there every 5 minutes (currently charging my car, so i have changing values..)

Am i doing something wrong?

error on update

i will update, then i get an error.
pip3 install weconnect-cli --upgrade Requirement already up-to-date: weconnect-cli in /home/fhemadmin/.local/lib/python3.8/site-packages (0.24.0) Requirement already satisfied, skipping upgrade: ascii-magic~=1.6 in /home/fhemadmin/.local/lib/python3.8/site-packages (from weconnect-cli) (1.6) Collecting weconnect[images]~=0.36.0 Downloading weconnect-0.36.2-py3-none-any.whl (140 kB) |████████████████████████████████| 140 kB 1.8 MB/s Requirement already satisfied, skipping upgrade: colorama in /usr/lib/python3/dist-packages (from ascii-magic~=1.6->weconnect-cli) (0.4.3) Requirement already satisfied, skipping upgrade: Pillow in /home/fhemadmin/.local/lib/python3.8/site-packages (from ascii-magic~=1.6->weconnect-cli) (9.0.0) Requirement already satisfied, skipping upgrade: requests~=2.27.1 in /home/fhemadmin/.local/lib/python3.8/site-packages (from weconnect[images]~=0.36.0->weconnect-cli) (2.27.1) Requirement already satisfied, skipping upgrade: oauthlib~=3.1.1 in /home/fhemadmin/.local/lib/python3.8/site-packages (from weconnect[images]~=0.36.0->weconnect-cli) (3.1.1) Requirement already satisfied, skipping upgrade: urllib3<1.27,>=1.21.1 in /usr/lib/python3/dist-packages (from requests~=2.27.1->weconnect[images]~=0.36.0->weconnect-cli) (1.25.8) Requirement already satisfied, skipping upgrade: certifi>=2017.4.17 in /usr/lib/python3/dist-packages (from requests~=2.27.1->weconnect[images]~=0.36.0->weconnect-cli) (2019.11.28) Requirement already satisfied, skipping upgrade: charset-normalizer~=2.0.0; python_version >= "3" in /home/fhemadmin/.local/lib/python3.8/site-packages (from requests~=2.27.1->weconnect[images]~=0.36.0->weconnect-cli) (2.0.9) Requirement already satisfied, skipping upgrade: idna<4,>=2.5; python_version >= "3" in /usr/lib/python3/dist-packages (from requests~=2.27.1->weconnect[images]~=0.36.0->weconnect-cli) (2.8) ERROR: weconnect-mqtt 0.28.1 has requirement weconnect[images]~=0.35.1, but you'll have weconnect 0.36.2 which is incompatible.
error_update

error_update2

option no-capabilities has no effect on userCapabilities

When cleaning up topics from older versions of API, I came across the new versions are showing a lot of userCapabilities despite I start weconnect-mqtt with --no-capabilities option.

E.g. this path gets successfully filtered by the option:
tswcc:tswc/vehicles/WVWirgendeineVIN!/capabilities/cubicNetwork/userDisablingAllowed:.* userDisablingAllowed

This path is not filtered out:
tswcc:tswc/vehicles/WVWirgendeineVIN!/userCapabilities/capabilitiesStatus/capabilities/access/id:.* id
...and there are a lot of them.

Is it by intention or somehow required for the tool to not filter the userCapabilities?
If no, might I request a new feature to filter those, too? Thanks.

No data is obtained from VW

Hello Mr Steinbach,

My wife drives an ID 3 (taken over May 22) and I drive a Passat GTE (taken over Dec. 20). Unfortunately, I now have the problem that the data update, after the Docker container start, no longer works after only a few days. In my home automation system IP-Symcon, however, a ping request from your service continues to arrive.

grafik

When I stop and restart the Docker container, the data is updated immediately. And the data can also be read out via the WeConnect app.

Is it also possible to view a log in the Docker version of your service? I couldn't find anything in Portainer at the last minute.

Best regards

Ralf Gronau

no update from vw-api

Since afternoon of 14.02.2023 the client can connect, but not receive any data on update. It seems VW changed something at the API.

There was a "confirm therms"-message and since this moment the API does not respond as expected. I accepted the terms, checked weconnect-mqtt is up to date, but it can't receive data from API.

Connection is established, but client logged:

weconnect_mqtt_base:API compatibility error during update.

WeConnect APP is still working

data update stopped, no self-recovery (Broken pipe)

Hi, yesterday during charging of the car, the update of data read by WeConnect-mqtt stopped at 47% charge, even the car continued up to 93%. The container was still running, but did not provide newer data.
I could only get it back running today when stopping & restarting (it did some version update) the docker container.

Maybe you have an idea what might have happened when taking a look to the trace below ?

I'm very sorry I cannot exactly tell which version was running when the failure happened, but it was not older than 1 or 2 months.
I don't know if there is a kind of logfile somewhere? If you can give me a hint where to find more persistent data about the failure, I can provide more.

When connecting to the server, this error-trace was displayed:

weconnect-mqtt_1  | ERROR:paho.mqtt.client:failed to receive on socket: [Errno 32] Broken pipe
weconnect-mqtt_1  | ERROR:paho.mqtt.client:failed to receive on socket: [Errno 32] Broken pipe
weconnect-mqtt_1  | ERROR:paho.mqtt.client:failed to receive on socket: [Errno 32] Broken pipe
weconnect-mqtt_1  | ERROR:paho.mqtt.client:Caught exception in on_disconnect: timed out
weconnect-mqtt_1  | Exception in thread Thread-2:
weconnect-mqtt_1  | Traceback (most recent call last):
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner
weconnect-mqtt_1  |     self.run()
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/threading.py", line 892, in run
weconnect-mqtt_1  |     self._target(*self._args, **self._kwargs)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3452, in _thread_main
weconnect-mqtt_1  |     self.loop_forever(retry_first_connection=True)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1779, in loop_forever
weconnect-mqtt_1  |     rc = self.loop(timeout, max_packets)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1201, in loop
weconnect-mqtt_1  |     return self.loop_misc()
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1628, in loop_misc
weconnect-mqtt_1  |     self._check_keepalive()
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2430, in _check_keepalive
weconnect-mqtt_1  |     self._do_on_disconnect(rc)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3360, in _do_on_disconnect
weconnect-mqtt_1  |     self.on_disconnect(self, self._userdata, rc)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 379, in on_disconnect_callback
weconnect-mqtt_1  |     self.reconnect()
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1075, in reconnect
weconnect-mqtt_1  |     sock = self._create_socket_connection()
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3546, in _create_socket_connection
weconnect-mqtt_1  |     return socket.create_connection(addr, source_address=source, timeout=self._keepalive)
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/socket.py", line 843, in create_connection
weconnect-mqtt_1  |     raise err
weconnect-mqtt_1  |   File "/usr/local/lib/python3.9/socket.py", line 831, in create_connection
weconnect-mqtt_1  |     sock.connect(sa)
weconnect-mqtt_1  | socket.timeout: timed out

If the data provided is too inaccurate, please close the ticket. Thank you for your support.

Issues with login to VW servers

I just noticed the new version with fix for a problem logging in to VW servers. I just pulled the latest docker image but still log the following error.

2022-01-31T11:03:25+0000:ERROR:weconnect_mqtt_base:Could not connect to VW-Server: HTTPSConnectionPool(host='login.apps.emea.vwapps.io', port=443): Max retries exceeded with url: /authorize?nonce=IEhCTAKTwIexnyxD&redirect_uri=weconnect://authenticated (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x7f1fb990a100>: Failed to establish a new connection: [Errno -3] Try again')), will retry in 10 seconds

Should I just wait awhile for the login attempts to reset and try again, or is this potentially another issue?

Set commands not working?

Hi,

it's me again ;-)

There is a topic weconnect/vehicles/WVWxxx/controls/climatization but it seems that I'm not able to control it as a set command.
I tried to send "start" or "stop" but nothing happend.

Currently unsupported or did I something wrong?
Thx

Error at start of Docker Container

Steps to reproduce:
Start Docker container with login-data

Expected:
Container starts and recieves data

Current Status:
Container start fails with message:
CRITICAL:weconnect-mqtt:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No Location for forwarding in response headers

Additional information:
Used Tag: latest
I have startet the container with -vvv to get more output. (Hint: E-Mailadress anonymized)
INFO:weconnect-mqtt:Connect to WeConnect DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): login.apps.emea.vwapps.io:443 DEBUG:urllib3.connectionpool:https://login.apps.emea.vwapps.io:443 "GET /authorize?nonce=u7NVDUPbWEsJFT3P&redirect_uri=weconnect://authenticated HTTP/1.1" 303 0 DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): identity.vwgroup.io:443 DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "GET /oidc/v1/authorize?client_id=a24fba63-34b3-4d43-b181-942111e6bda8%40apps_vw-dilab_com&scope=openid+profile+badge+cars+dealers+vin&response_type=code+id_token+token&redirect_uri=weconnect%3A%2F%2Fauthenticated&state=97d17c37b3b9bfbce5ca52c39a9f693887cb6e66faeb76b4d4b4e7cc77b3bf25&nonce=u7NVDUPbWEsJFT3P HTTP/1.1" 302 0 DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "GET /signin-service/v1/signin/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com?relayState=56171cc35a7e50f474bd20a51d6829791d3d842f HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "POST /signin-service/v1/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com/login/identifier HTTP/1.1" 303 0 DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "GET /signin-service/v1/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com/login/authenticate?relayState=56171cc35a7e50f474bd20a51d6829791d3d842f&email=user%40domain.de HTTP/1.1" 200 None DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "POST /signin-service/v1/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com/login/authenticate HTTP/1.1" 302 0 DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "GET /oidc/v1/oauth/sso?clientId=a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com&relayState=56171cc35a7e50f474bd20a51d6829791d3d842f&userId=34fb0578-f15b-4317-ab75-af16e7063322&HMAC=38aba99b36b0402b73f2cffad1faf8aa467569b19683f92358b510c405f17410 HTTP/1.1" 302 0 DEBUG:urllib3.connectionpool:https://identity.vwgroup.io:443 "GET /signin-service/v1/consent/users/34fb0578-f15b-4317-ab75-af16e7063322/a24fba63-34b3-4d43-b181-942111e6bda8@apps_vw-dilab_com?scopes=openid%20profile%20badge%20cars%20dealers%20vin&relayState=56171cc35a7e50f474bd20a51d6829791d3d842f&callback=https://identity.vwgroup.io/oidc/v1/oauth/client/callback&hmac=29f46e016730a68448ea699041911e35e900fe59ba3a2cadf257d726d8c8d12a HTTP/1.1" 200 None CRITICAL:weconnect-mqtt:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No Location for forwarding in response headers

Fails to run in docker on RaspberryPi

Hi folks,
i just tried to let it run within a docker container on my raspberry pi, but i get the following output:
image
Have you any ideas how to fix that?
Thx,
Max

weconnect-mqtt in image tillsteinbach/weconnect-mqtt does not honor timezone settings!

Hi!

I am not able to make weconnect-mqtt running in your image tillsteinbach/weconnect-mqtt honor the TZ settings either provided by the environment variable TZ=Europe/Berlin nor by binding the a hostpath Volume from /usr/share/zoneinfo/Europe/Berlin to /etc/localtime.

Both variants work fine when i exec a shell and check date but in mqtt i still get the wrong timezone on the weconnect/0/mqtt/weconnectUpdated topic.

Token expired kills the docker container

Hi,

I just noticed that my WeConnect-mqtt container went down.
In the log file I found:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/openid_session.py", line 165, in request
url, headers, data = self.addToken(url, body=data, headers=headers, access_type=access_type, token=token)
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/openid_session.py", line 204, in addToken
raise TokenExpiredError()
oauthlib.oauth2.rfc6749.errors.TokenExpiredError: (token_expired)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/openid_session.py", line 171, in request
self.refresh()
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/we_connect_session.py", line 55, in refresh
self.refreshTokens(
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/we_connect_session.py", line 308, in refreshTokens
raise TemporaryAuthentificationError('Token could not be refreshed due to temporary WeConnect failure: {tokenResponse.status_code}')
weconnect.errors.TemporaryAuthentificationError: Token could not be refreshed due to temporary WeConnect failure: {tokenResponse.status_code}

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/bin/weconnect-mqtt", line 8, in <module>
sys.exit(main())
File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 296, in main
mqttCLient.run()
File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 655, in run
self.updateWeConnect()
File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 404, in updateWeConnect
self.weConnect.update(updateCapabilities=self.updateCapabilities, updatePictures=self.updatePictures, selective=self.selective)
File "/usr/local/lib/python3.9/site-packages/weconnect/weconnect.py", line 175, in update
self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force, selective=selective)
File "/usr/local/lib/python3.9/site-packages/weconnect/weconnect.py", line 182, in updateVehicles
data = self.fetchData(url, force)
File "/usr/local/lib/python3.9/site-packages/weconnect/weconnect.py", line 344, in fetchData
statusResponse: requests.Response = self.session.get(url, allow_redirects=False)
File "/usr/local/lib/python3.9/site-packages/requests/sessions.py", line 542, in get
return self.request('GET', url, **kwargs)
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/openid_session.py", line 173, in request
self.login()
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/we_connect_session.py", line 49, in login
response = self.doWebAuth(authorizationUrl)
File "/usr/local/lib/python3.9/site-packages/weconnect/auth/we_connect_session.py", line 98, in doWebAuth
authorizationUrl = loginFormResponse.headers['Location']
File "/usr/local/lib/python3.9/site-packages/requests/structures.py", line 54, in __getitem__
return self._store[key.lower()][1]
KeyError: 'location'

Kein Status Ladestation

Hallo Till,

hat sich bei der Konfig (im speziellen für Fhem) etwas geändert?
Die Ladepunkte zeigen nur noch "AVAILABLE" obwohl ich aktuell selbst an einem dran hänge.

VG
Reiner

Reconnecting not working

This time I found a real issue ;-)

It seems that reconnecting to MQTT server is not working.
If I re-start my MQTT server (e.g. after change ACL- or passwd-file) I find these errors in the weconnect-mqtt logfile:

2022-01-29T10:56:49+0000:ERROR:client:failed to receive on socket: [Errno 104] Connection reset by peer 2022-01-29T17:40:11+0000:ERROR:weconnect_mqtt_base:Could not reconnect to MQTT-Server: [Errno 111] Connection refused, will retry in 10 seconds 2022-01-30T16:58:50+0000:ERROR:weconnect_mqtt_base:Could not reconnect to MQTT-Server: [Errno 111] Connection refused, will retry in 10 seconds 2022-01-31T01:02:13+0000:ERROR:weconnect_mqtt_base:Could not reconnect to MQTT-Server: [Errno 111] Connection refused, will retry in 10 seconds 2022-01-31T01:02:28+0000:ERROR:weconnect_mqtt_base:Could not reconnect to MQTT-Server due to timeout, will retry in 10 seconds 2022-01-31T01:02:43+0000:ERROR:weconnect_mqtt_base:Could not reconnect to MQTT-Server due to timeout, will retry in 10 seconds 2022-01-31T01:03:04+0000:ERROR:client:Caught exception in on_disconnect: [Errno 113] Host is unreachable Exception in thread Thread-2: Traceback (most recent call last): File "/usr/local/lib/python3.9/threading.py", line 954, in _bootstrap_inner self.run() File "/usr/local/lib/python3.9/threading.py", line 892, in run self._target(*self._args, **self._kwargs) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3591, in _thread_main self.loop_forever(retry_first_connection=True) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1756, in loop_forever rc = self._loop(timeout) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1164, in _loop rc = self.loop_read() File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1558, in loop_read return self._loop_rc_handle(rc) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 2350, in _loop_rc_handle self._do_on_disconnect(rc, properties) File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 3475, in _do_on_disconnect on_disconnect(self, self._userdata, rc) File "/usr/local/lib/python3.9/site-packages/weconnect_mqtt/weconnect_mqtt_base.py", line 496, in on_disconnect_callback self.reconnect() File "/usr/local/lib/python3.9/site-packages/paho/mqtt/client.py", line 1044, in reconnect sock = self._create_socket_connection() File "/usr/local/lib/python3.9/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/local/lib/python3.9/socket.py", line 843, in create_connection raise err File "/usr/local/lib/python3.9/socket.py", line 831, in create_connection sock.connect(sa) OSError: [Errno 113] Host is unreachable

The MQTT server was only down for some seconds (only restarting).

Service run, but no Data at a random time will send via MQTT

Service run, but no Data will send via MQTT:
status_mqtt_vw

after restart (putty -> sudo systemctl restart weconnect-mqtt) the Service:
status_mqtt_vw_restart

Data will send again, what can i do.
All other online queries will work, weather (wetter.com), pollenflug, and so on ;-)

regards
simon

Images

Hallo Till,

vielen Dank für diese wunderbare Arbeit!

Ich verwende WeConnect-MQTT im Docker Container und empfange und verarbeite die Daten in Fhem. Funktioniert einwandfrei.
Es geht um einen neuen Tiguan.

Nur das ausliefern der Bilder klappt nicht!?
Hier meine Docker-Compose-Datei:

version: '3.3'

services:
  weconnect-mqtt:
    container_name: weconnect-mqtt
    image: "tillsteinbach/weconnect-mqtt:latest"
    restart: unless-stopped
    environment:
      - [email protected]
      - PASSWORD=myvwidpassword
      - BROKER_ADDRESS=192.168.178.80
      - ADDITIONAL_PARAMETERS=-l 50.301051 8.813559 --chargingLocationRadius 500 --pictures --picture-format txt -v

Das und viele weitere Variationen habe ich auch schon ausprobiert:

--picture-format png

Ich beobachte über MQTT.fx per Subscibe den Kanal weconnect/0/vehicles/WVGZZZ5N??????????/pictures/# und erhalte keine Nachrichten, so dass Fhem natürlich auch nicht empfangen kann.

Hast du einen Tipp für mich?

Viele Grüße
Reiner

EV Charging "time to go" value issue

Hello,
I'm charging an ID3 and observe the process over MQTT. WeConnect returns a number-item for the remaining charging time.
Finally, this item disappears when charging is done and is not part of regular WeConnect updates. (observed with MQTT analyzer).

stateTopic="weconnect/0/vehicles/WVWxxxxxx/domains/charging/chargingStatus/remainingChargingTimeToComplete_min"

I have the following issue observed: The item counts down the remaining time as number,
but does not go to a number with value 0, but an empty string ''.
This drops an error message each time:
[openhab.binding.mqtt.generic.ChannelState] - Incoming payload '' not supported by type 'NumberValue'

It would be nice to have a permanently issued number item which returns to zero.

climatisationSettings not working, responding Bad Gateway

After climatisation-Settings by

/wec/vehicles/.../domains/climatisation/climatisationSettings/targetTemperature_C_writetopic 22.0
/wec/vehicles/.../domains/climatisation/climatisationSettings/climatisationWithoutExternalPower_writetopic True

... WeConnect-mqtt is responding with ...

error/code 2105
error/message Bad Gateway
error/group 2
error/info Upstream service responded with an unexpected status. If the problem persists, please contact our support.

after some time is see

/wec/mqtt/error/code -10
/wec/mqtt/error/message Error setting value: Could not set value (Bad Gateway - Upstream service responded with an unexpected status. If the problem persists, please contact our support. - Please retry in a moment)

set climatisation via VW-weconnect-App is working at same time.

Starting climatisation with /wec/vehicles/.../controls/climatisation_writetopic start mostly not starting climatisation

No credentials form found

Hi Till :-)

my weconnect-mqtt docker container has an issue since two or three days.
The logfile is saying:

`2022-01-29T10:14:07+0000:CRITICAL:weconnect_mqtt_base:There was a problem when communicating with WeConnect. If this problem persists please open a bug report: No credentials form found

On the other hand weconnect-cli is working perfectly (I think).
Any idea what I can check?

Best regards

can’t set climatizationAtUnlock

if i set weconnect/vehicles/+/domains/climatisation/climatisationSettings/climatizationAtUnlock_writetopic to True or False i get an error in weconnect/vehicles/+/domains/climatisation/climatisationStatus/error

error:
  code: 4001
  group: 2
  info: Internal error, please try again later. If the problem persists, please contact our support.
  message: Internal error
  retry: True
  timestamp: 2022-05-07 12:03:53+00:00

turning this on or off in the WeConnectID app works and displays this request in weconnect/vehicles/+/domains/climatisation/climatisationSettings/request/c805b723-d332-4816-a252-fba4db0084ca/body

{'callback': 'https://mobileapi.apps.emea.vwapps.io/vehicles/callbacks/xxx/climatisation/settings', 'targetTemperature': 20, 'targetTemperatureUnit': 'celsius', 'climatizationAtUnlock': True, 'windowHeatingEnabled': True, 'zoneFrontLeftEnabled': False, 'zoneFrontRightEnabled': False}

successful request from the app:
image

Data Updates only after restarting Docker Container

Hi,
I noticed, that from time to time there are no updates received anymore.
I use the internal FHEM MQTT Broker.
I have to stop and restart the we-connect docker container to get new values.
I cannot see any log entries in the container.

Any idea, how to further investigate?

Stopped working after several days

Hey,

i have the cli running as a docker container container. It worked perfectly, but since two days, no messages are published any more.
Can i somewhere review the logs what happened?

Thanks a lot,
Max

*_writetopic not working after MQTT reconnect

Hi Till!

To me it looks like after weconnect_mqttlost and reestablished the connection to the MQTT-Server the writeable topics are not working any more.

This is what the logs show:
2022-07-11T14:14:38+0000:INFO:weconnect_mqtt_base:Client unexpectedly disconnected (7), trying to reconnect 2022-07-11T14:14:49+0000:INFO:weconnect_mqtt_base:Connected to MQTT broker 2022-07-11T14:14:49+0000:INFO:weconnect_mqtt_base:Update data from WeConnect

From this moment on, publishing start or stopto weconnect/0/vehicles/WVXXXXXXXX/controls/charging_writetopicdoes not do anything. there is no answer wit a status, operation or body at all ever coming back.
Other information (not related to a write) is still coming in fine.

Before it loses connection for the first time everything works just fine.

BR
Tom

APICompatibilityError: No credentials form found

I don't know if it might be related to the fact that I'm trying this with a We-Connect account linked to a VW e-up! and not one of the tested cars but I'm getting this:

[opc@node-red ~]$ weconnect-mqtt --username <redacted> --password <redacted> --mqttbroker localhost --mqtt-username <redacted> --mqtt-password <redacted> --prefix weconnect
INFO:weconnect-mqtt:Connect to WeConnect
Traceback (most recent call last):
  File "/usr/local/bin/weconnect-mqtt", line 11, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.6/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 115, in main
    mqttCLient.connectWeConnect(username=username, password=password)
  File "/usr/local/lib/python3.6/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 136, in connectWeConnect
    self.weConnect = weconnect.WeConnect(username=username, password=password, updateAfterLogin=False)
  File "/usr/local/lib/python3.6/site-packages/weconnect/weconnect.py", line 113, in __init__
    self.login()
  File "/usr/local/lib/python3.6/site-packages/weconnect/weconnect.py", line 197, in login
    raise APICompatibilityError('No credentials form found')
weconnect.weconnect.APICompatibilityError: No credentials form found
[opc@node-red ~]$

Any ideas if this is fixable?

Clima topic vanished in new version

Hi!

After updating to the latest version i noticed various climate related topics are gone.
For example there was topic like the one below before:
weconnect/0/vehicles/WVWXXXXXXXXX/status/climatisationSettings/targetTemperature_K 293.15

I can't find any topic showing the actual temp.

Am i doing something wrong or is this a know issue at the moment?

Problem with docker configuration

Hello,
I'm trying to test weconnect-mqtt throw docker on a rpi3b.
I tried this command to run it :
docker run -it --name mqtt-weconnect --restart=always tillsteinbach/weconnect-mqtt -env BROKER_ADDRESS=192.168.1.144 -env ADDITIONAL_PARAMETERS=--mqttport 11884 -env USER=xxxx -env PASSWORD=xxx
-bash: !Bk: event not found

My password contains a ! char which seems to cause the issue.

If i try with a wrong password I've got this error :
docker: Error response from daemon: OCI runtime create failed: container_linux.go:380: starting container process caused: exec: "-env": executable file not found in $PATH: unknown.
ERRO[0007] error waiting for container: context canceled

Is there any other way to pass the configuration threw the container?
Thanks for your work !

Different Formats of Time Tags

Hello Mr. Steinbach,
I have observed the following behavior in the format of different time-tags:
Some have a T after the date part,
others have just a white-space there.
Example:

Last Upd from WeC    2023-02-01T23:30:01+01:00
Last Upd from Car    2023-02-01 22:07:24+01:00

Can you confirm this observation ? Some reason behind ?

On my side I like to assign the value to a datetimetype in openhab, which does not work.

Thank you for your comment.
Best regards

Documentation of available topics

@tillsteinbach Thanks for the great work, it just works like a charm for what I need!

However the most complicated part was the "guessing" of topics to subscribe to. It would be nice to have a table which lists all available topics and a rough description of what a topic delivers.

Any hint how to create such a table? From what I see in the code it looks like the we-connect API delivers an all-in-one response, maybe hooking in some sort of generator that publishes a list of topics to a "spec" topic is an option? I really would love to fill in here, but my Python knowledge is close to zero.

new items without data (mqtt)

thx again for your good work.
i have install the updated version an it likes good.
now i have any new items via mqtt in fhem, but no data.
rearLeft rearRight frontLeft frontRight windows
in the we connect app there are data, who can i fix this, or help you to help me ;-)

regards
simon

eGolf - Windowheating

Hallo in die Runde.

ich bekomme beim Versuch die Scheibenheizung zu aktivieren folgende Fehlermeldung:

*/domains/climatisation/climatisationStatus/carCapturedTimestamp 2022-12-11 17:25:15+00:00
*/controls/windowheating_writetopic start
*/controls/error/code 4104
*/controls/error/message Bad Gateway
*/controls/error/group 4
*/controls/error/info Looks like your service has expired. Please update your service subscription.
*/error/code -10
*/error/message Error setting value: Could not control windowheating (Bad Gateway - Looks like your service has expired. Please update your service subscription.)

Service ist aktuell und funktioniert auch bei anderen Befehlen/Abfragen einwandfrei - nur die Scheibenheizung funktioniert nicht. In der originalen App funktioniert auch Scheibenheizung aktivieren.

Hat einer ne Idee?

Missing some mqtt topics

Hi,

It seems that the mqtt client is not publishing all the topics.
The we-connect cli shows a lot of information.
However, by subscribing to all mqtt topics there are some information missing.
mosquitto_sub -v -t '#' does not show the same information like the cli.

I registered two cars in we Connect. Maybe more than one car is currently not supported?
I also get some message like „/mqtt/error/message Retrieval error during update. Will try again after configured interval of 300s“ which should actually be fixed in latest version, I guess.

Vehicle Position Information

Hi there,

I think it is not really an issue, more a question.
Is it possible to also get the longitude and latitude information?
On my WeConnect App I can see the current position of the car, so I guess these information should also be available somewhere.

BR

René

GDC_MISSING

And another one :-)

So it seems that I have to accept terms and conditions at the myvolkswagen.de website. But if I access the webseite via browser there is nothing I could accept. I can access the myvolkswagen part without any issues. Anything I can do?

Btw: why is the script throwing an exception? Wouldn't it be better to just exit with the information "This means you have to login at myvolkswagen.de website and accept the terms and conditions". Or is this happening independent?

INFO:weconnect-mqtt:WeConnect-mqtt 0.14.8 (using WeConnect-python 0.20.4)
INFO:weconnect-mqtt:Connect to WeConnect
INFO:weconnect:Token refreshed
INFO:weconnect-mqtt:Connected to MQTT broker
INFO:weconnect-mqtt:Update data from WeConnect
WARNING:weconnect:WeConnect reported enrollmentStatus GDC_MISSING. This means you have to login at myvolkswagen.de website and accept the terms and conditions
ERROR:paho.mqtt.client:Caught exception in on_connect: local variable 'status' referenced before assignment
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3452, in _thread_main
    self.loop_forever(retry_first_connection=True)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1779, in loop_forever
    rc = self.loop(timeout, max_packets)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1181, in loop
    rc = self.loop_read(max_packets)
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 1572, in loop_read
    rc = self._packet_read()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2310, in _packet_read
    rc = self._packet_handle()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 2942, in _packet_handle
    return self._handle_connack()
  File "/usr/local/lib/python3.7/dist-packages/paho/mqtt/client.py", line 3030, in _handle_connack
    self, self._userdata, flags_dict, result)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 354, in on_connect_callback
    self.updateWeConnect()
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect_mqtt/weconnect_mqtt.py", line 286, in updateWeConnect
    self.weConnect.update(updateCapabilities=self.updateCapabilities, updatePictures=self.updatePictures)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/weconnect.py", line 439, in update
    self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=updatePictures, force=force)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/weconnect.py", line 480, in updateVehicles
    fixAPI=self.fixAPI, updateCapabilities=updateCapabilities, updatePictures=updatePictures)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/elements/vehicle.py", line 73, in __init__
    self.update(fromDict, updateCapabilities=updateCapabilities, updatePictures=updatePictures)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/elements/vehicle.py", line 171, in update
    self.updateStatus(updateCapabilities=updateCapabilities, force=force)
  File "/home/pi/.local/lib/python3.7/site-packages/weconnect/elements/vehicle.py", line 275, in updateStatus
    elif status in keyClassMap:
UnboundLocalError: local variable 'status' referenced before assignment

Topic republished with value (null)

Hey!

First of all, thank you very much for the great job on this project.

I updated to the latest docker-image today and noticed a bit of strange behavior regarding the temperature settings.
Sometimes after weconnect-mqtt publishes a temp-topic it republishes it right after but "nulls" its value.

Here is an output of said issue using mosquitto_sub to read the traffic:

weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_C 20.0
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_F 68.0
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_K 293.15
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_K 293.5
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_K (null)
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_C (null)
weconnect/0/vehicles/WVWXXX/climatisation/climatisationSettings/targetTemperature_F (null)

Is this a known issue with the new version or do i have to specify any type of argument to ignore topics with null values?

BR
Tom

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.