Open buliwyf42 opened 3 years ago
I would be interested to do so, but I have no car to test. One challenge: I use the new API that came with the ID models. I don't know if that is already available for Skoda/Seat For skoda it could be possible as the Enyaq is on the market. For seat we probably have to wait for the Born. And then the question is if the API vor Skoda/Seat is also working for the previous generation of cars. If someone has more information I would be keen to know what is possible today.
I own a late 2020 Seat Leon FR Hybrid. How can I try if it is reachable via the new API? It is accessible via the my.seat site. If it is not reachable via the new WEconnect API, should I look for a CarNet access?
My guess is that it will be available when the new My Cupra App is available mid of November. They call it CUPRA CONNECT GEN4. But Seat might be also a special case as Cupra is a subbrand. Very difficult to predict. How is the app called you are using now with the car?
It's called SEAT Connect (Version 1.4.6)
Ok, that is the equivalent of the WeConnect App from VW. That is using the old API.
Hi, how i can start the "weconnect-mqtt" as service or so?
When my e-Golf is not at home, the script stops with error and i must start ist via putty/terminal again.
The show error-code are:
Traceback (most recent call last): File "/home/fhemadmin/.local/bin/weconnect-mqtt", line 8, in <module> sys.exit(main()) File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect_mqtt/weconn ect_mqtt_base.py", line 231, in main mqttCLient.run() File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect_mqtt/weconn ect_mqtt_base.py", line 462, in run self.updateWeConnect() File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect_mqtt/weconn ect_mqtt_base.py", line 287, in updateWeConnect self.weConnect.update(updateCapabilities=self.updateCapabilities, updatePict ures=self.updatePictures) File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect/weconnect.p y", line 530, in update self.updateVehicles(updateCapabilities=updateCapabilities, updatePictures=up datePictures, force=force) File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect/weconnect.p y", line 600, in updateVehicles self.__vehicles[vin].update(fromDict=vehicleDict, updateCapabilities=updateC apabilities, updatePictures=updatePictures) File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect/elements/ve hicle.py", line 203, in update self.updateStatus(updateCapabilities=updateCapabilities, force=force) File "/home/fhemadmin/.local/lib/python3.8/site-packages/weconnect/elements/ve hicle.py", line 428, in updateStatus data = statusResponse.json() File "/home/fhemadmin/.local/lib/python3.8/site-packages/requests/models.py", line 910, in json return complexjson.loads(self.text, **kwargs) File "/usr/lib/python3/dist-packages/simplejson/__init__.py", line 518, in loa ds return _default_decoder.decode(s) File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 370, in deco de obj, end = self.raw_decode(s) File "/usr/lib/python3/dist-packages/simplejson/decoder.py", line 400, in raw_ decode return self.scan_once(s, idx=_w(s, idx).end()) simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
regards simon
Looks like the car is sending something unexpected when there is no parking position. I will try to fix that based on your log. Hope that I can do that. Always difficult to debug for a car I don’t have access to.
which version of WeConnect-MQTT are you running?
Looks like the car is sending something unexpected when there is no parking position. I will try to fix that based on your log. Hope that I can do that. Always difficult to debug for a car I don’t have access to.
which version of WeConnect-MQTT are you running?
How can I help you, to get access, any log or a invitation to my weconnect? The lastest version, how can I check ;-).
regards
I think I already found the problem. It looks like an exception is not properly handled when simpeljson is installed on the system, which is the case for you. I will fix that in an upcoming release. If you want a quick workaround you can uninstall simplejson package.
Ok, thx. please help me to make a autostart Task for your tool. I don’t now how to do this.
regards
What operating system are you running?
Ubuntu 20.04 LTS
Can you try this out?: https://github.com/tillsteinbach/WeConnect-mqtt/tree/main/autostart/systemd
Can you try this out?: https://github.com/tillsteinbach/WeConnect-mqtt/tree/main/autostart/systemd
sudo systemctl start weconnect-mqtt Failed to start weconnect-mqtt.service: Unit weconnect-mqtt.service has a bad unit file setting. See system logs and 'systemctl status weconnect-mqtt.service' for details.
what does systemctl status weconnect-mqtt.service
say?
` Loaded: loaded (/etc/systemd/system/weconnect-mqtt.service; enabled; vendor preset: enabled) Active: failed (Result: exit-code) since Tue 2022-01-04 10:22:43 CET; 4min 16s ago Main PID: 196944 (code=exited, status=127)
Jan 04 10:22:43 srvfhem systemd[1]: Started WeConnect-mqtt. Jan 04 10:22:43 srvfhem sh[196944]: /bin/sh: 1: weconnect-mqtt: not found Jan 04 10:22:43 srvfhem systemd[1]: weconnect-mqtt.service: Main process exited, code=exited, status=127/n/a Jan 04 10:22:43 srvfhem systemd[1]: weconnect-mqtt.service: Failed with result 'exit-code'. Jan 04 10:22:58 srvfhem systemd[1]: /etc/systemd/system/weconnect-mqtt.service:8: Failed to resolve unit specifiers in weconnect-mqtt --username simon@xxxxx.de --password xxxxxxx --mqttbroker 192.168.151.18 --no-capabilities --> Jan 04 10:22:58 srvfhem systemd[1]: weconnect-mqtt.service: Unit configuration has fatal error, unit will not be started. `
I tried to change the service file a bit. Maybe it works better that way
I tried to change the service file a bit. Maybe it works better that way
/etc/systemd/system/weconnect-mqtt.service:9: Failed to resolve unit specifiers in %XxxxxXxxxxx!: Invalid slot
i think the problem is my password, it beginns with an %. have you any idear to fix that?
yes, the % in my password are the problem.
Yes, I think the % is interpreted. Can you replace the %
with %%
. If that does not help you can also rely on storing your password in netrc like described here: https://github.com/tillsteinbach/WeConnect-mqtt#credentials
perfect with %% ist works now fine. thx for the grait work. one question more, is it possible to user your script to set the climatisationState on, or start charging
regards simon
yes, in general it should be possible if your car supports it. There should be a topic like:
weconnect/0/vehicles/WVWZZZXXXYYYZZZ012345/controls/climatization
(the actual topic name of course depends on your prefix and the VIN of the car) when you send a start
to that topic climatization should start, when you send stop
it should stop (there will be some delay due to the communication through the servers. You can also e.g. change the temperature on the topic: weconnect/0/vehicles/WVWZZZXXXYYYZZZ012345/status/climatisationSettings/targetTemperature_C
and some more settings.
I think I already found the problem. It looks like an exception is not properly handled when simpeljson is installed on the system, which is the case for you. I will fix that in an upcoming release. If you want a quick workaround you can uninstall simplejson package.
pi@fhem-aussen:~ $ sudo pip3 uninstall simplejson Found existing installation: simplejson 3.17.2 Not uninstalling simplejson at /usr/lib/python3/dist-packages, outside environment /usr Can't uninstall 'simplejson'. No files were found to uninstall. pi@fhem-aussen:~ $ sudo apt-get remove simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket simplejson kann nicht gefunden werden. pi@fhem-aussen:~ $ sudo apt-get remove simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket simplejson kann nicht gefunden werden. pi@fhem-aussen:~ $ sudo apt-get remove python-simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket python-simplejson kann nicht gefunden werden. pi@fhem-aussen:~ $ sudo apt-get remove --auto-remove python-simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket python-simplejson kann nicht gefunden werden. pi@fhem-aussen:~ $ sudo apt-get purge python-simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket python-simplejson kann nicht gefunden werden. pi@fhem-aussen:~ $ sudo apt-get purge --auto-remove python-simplejson Paketlisten werden gelesen… Fertig Abhängigkeitsbaum wird aufgebaut… Fertig Statusinformationen werden eingelesen… Fertig E: Paket python-simplejson kann nicht gefunden werden.
I just pushed version 0.22.0 that should fix your problem without uninstalling simplejson (probably it came through some other pip package). Please be aware that the naming of the topics slightly changed in 0.22.0!
ok, thx will test and report here.
regards simon
Hi, May I kindly ask if it is planned to continue working on the Cupra Born? If so it would be fantastic :-) and I would be happy to support as good as I can.
Regards, Tobias
I would also like to ask about the Cupra Born now that I have one :-)
I note that the base weconnect does now seem to support the Born. But I just tried with my login and it is saying the login isn't valid.
I've just released a new custom component for Home Assistant, based on this library specifically for the Cupra Born. More details in this post: https://github.com/tillsteinbach/WeConnect-python/issues/26#issuecomment-1582902306
You can install it from https://github.com/daernsinstantfortress/cupra_we_connect using HACS.
As a note, this is clearly not an MQTT integration at this point (not sure if I'll ever get around to porting this bit unless there's demand), but if you're wanting to work directly with HA, you'll be ok with the one I've released.
Thanks for your work. I don't use HA myself as I'm a native Node-RED user and contributor. But I will certainly take a good look at it and see if I can adapt it. If I can work out how to do the initial secure connection using node.js, the rest I can hopefully work out as I've done with other API's.
If you need something in node.js have a look here https://github.com/TA2k/ioBroker.vw-connect
Is there a possibility to integrate a cupra born to weconect-mqtt now?
I don't use ha or node.js (but openHAB instead) :-s
No, unfortunately for now the differences between the APIs is just too big. I have an idea for a rewrite of a library what could support different types of cars and brands, but right now I have no time for that.
Hi, I have a VW Tiguan Hybrid 2022, which you are more than welcome to test
A 2022 (European) Tiguan should already work
Hi, yes most do. Some have an error. like charge mode
weconnect/0/vehicles/WVGZZZ5xxxxxxx/domains/charging/chargeMode also, I believe vehicle_moving is a state that is reported but not listed.
Ah ok, can you send me a log with -vv enabled? The output is probably enough to add the missing attributes
Sorry, how do I do that? I'm a quick learner but only started Mqtt & Docker the other day. What log file. MQTT Explorer / docker?
The docker should show a log with warnings when you add -vv
to the ADDITIONAL_PARAMETERS
Hi, This is the output of the log.
2023-11-20T18:40:33+0000:INFO:weconnect_mqtt_base:WeConnect-mqtt 0.48.3 (using WeConnect-python 0.59.5) 2023-11-20T18:40:33+0000:INFO:weconnect_mqtt_base:Connect to WeConnect 2023-11-20T18:40:33+0000:INFO:weconnect_mqtt_base:Connected to MQTT broker 2023-11-20T18:40:33+0000:INFO:weconnect_mqtt_base:waiting for first update from server 2023-11-20T18:45:33+0000:INFO:weconnect_mqtt_base:Update data from WeConnect 2023-11-20T18:50:38+0000:INFO:weconnect_mqtt_base:Update data from WeConnect 2023-11-20T18:55:42+0000:INFO:weconnect_mqtt_base:Update data from WeConnect
Hello,
do you plan to add the support for other models of the VW Group as well, e.g., Seat or Škoda?