Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support other Models of the VW Group? #32

Open
buliwyf42 opened this issue Oct 10, 2021 · 39 comments
Open

Support other Models of the VW Group? #32

buliwyf42 opened this issue Oct 10, 2021 · 39 comments
Assignees
Labels
enhancement New feature or request

Comments

@buliwyf42
Copy link

Hello,

do you plan to add the support for other models of the VW Group as well, e.g., Seat or Škoda?

@tillsteinbach
Copy link
Owner

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.

@tillsteinbach tillsteinbach self-assigned this Oct 10, 2021
@tillsteinbach tillsteinbach added the enhancement New feature or request label Oct 10, 2021
@buliwyf42
Copy link
Author

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?

@tillsteinbach
Copy link
Owner

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?

@buliwyf42
Copy link
Author

It's called SEAT Connect (Version 1.4.6)

@tillsteinbach
Copy link
Owner

Ok, that is the equivalent of the WeConnect App from VW. That is using the old API.

@tasisale
Copy link

tasisale commented Jan 3, 2022

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

@tillsteinbach
Copy link
Owner

tillsteinbach commented Jan 3, 2022

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?

@tasisale
Copy link

tasisale commented Jan 3, 2022

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

@tillsteinbach
Copy link
Owner

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.

@tasisale
Copy link

tasisale commented Jan 4, 2022

Ok, thx.
please help me to make a autostart Task for your tool.
I don’t now how to do this.

regards

@tillsteinbach
Copy link
Owner

What operating system are you running?

@tasisale
Copy link

tasisale commented Jan 4, 2022

Ubuntu 20.04 LTS

@tillsteinbach
Copy link
Owner

@tasisale
Copy link

tasisale commented Jan 4, 2022

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.

@tillsteinbach
Copy link
Owner

what does systemctl status weconnect-mqtt.service say?

@tasisale
Copy link

tasisale commented Jan 4, 2022

` 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 [email protected] --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.
`

@tillsteinbach
Copy link
Owner

I tried to change the service file a bit. Maybe it works better that way

@tasisale
Copy link

tasisale commented Jan 4, 2022

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?

@tasisale
Copy link

tasisale commented Jan 4, 2022

yes, the % in my password are the problem.

@tillsteinbach
Copy link
Owner

tillsteinbach commented Jan 4, 2022

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

@tasisale
Copy link

tasisale commented Jan 4, 2022

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

@tillsteinbach
Copy link
Owner

tillsteinbach commented Jan 4, 2022

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.

@tasisale
Copy link

tasisale commented Jan 5, 2022

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.

Sorry, but no simplejson is install, the error i get every time i drive the car.

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.

@tillsteinbach
Copy link
Owner

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!

@tasisale
Copy link

tasisale commented Jan 5, 2022

ok, thx will test and report here.

regards
simon

@Intenos
Copy link

Intenos commented Mar 27, 2023

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

@TotallyInformation
Copy link

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.

tillsteinbach/WeConnect-python#26

@daernsinstantfortress
Copy link

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: tillsteinbach/WeConnect-python#26 (comment)

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.

@TotallyInformation
Copy link

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.

@tillsteinbach
Copy link
Owner

If you need something in node.js have a look here https://github.com/TA2k/ioBroker.vw-connect

@KingKoerle
Copy link

KingKoerle commented Oct 17, 2023

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

@tillsteinbach
Copy link
Owner

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.

@chrisandsally
Copy link

Hi, I have a VW Tiguan Hybrid 2022, which you are more than welcome to test

@tillsteinbach
Copy link
Owner

A 2022 (European) Tiguan should already work

@chrisandsally
Copy link

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.

@tillsteinbach
Copy link
Owner

Ah ok, can you send me a log with -vv enabled? The output is probably enough to add the missing attributes

@chrisandsally
Copy link

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?

@tillsteinbach
Copy link
Owner

The docker should show a log with warnings when you add -vv to the ADDITIONAL_PARAMETERS

@chrisandsally
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

8 participants