Package: weconnect-mqtt
WeConnect-MQTTMQTTClient that publishes data from Volkswagen WeConnect ServicesWhat is the purpose?If you want to integrate data from your weconnect enabled car a standard protocol such asMQTTcan be very helpful. This Client enables you to integrate with theMQTT Brokerof your choice (e.g. your home automation solution such asioBroker,FHEMorHome Assistant)RequirementsYou need to install python 3 on your system:How to install python. The minimum required python version is 3.8Login & ConsentWeConnect-mqtt is based on the new WeConnect API that was introduced with the new series of ID cars. If you use another car or hybrid you probably need to agree to the terms and conditions of the new WeConnect interface. Easiest to do so is by installing the Volkswagen app on your smartphone and login there. If necessary you will be asked to agree to the terms and conditions.How to installIf you want to use WeConnect-mqtt, the easiest way is to obtain it fromPyPI. Just install instead using:pip3installweconnect-mqttUpdatesIf you want to update WeConnect-mqtt, the easiest way is:pip3installweconnect-mqtt--upgradeDockerThere is also a Docker image to easily host WeConnect-MQTT:See on DockerhubHow to useStart weconnect-mqtt from the commandline:weconnect-mqttYou get all the usage information by using the --help commandweconnect-mqtt--helpAn example to connect with an MQTT broker at 192.168.0.1 with user test and password test123 isweconnect-mqtt--usernametest@test.de--passwordtest123--mqttbroker192.168.0.1--mqtt-usernametest--mqtt-passwordtest123--prefixweconnectThe client uses usertest@test.deand password test123 in this example to connect to weconnectS-PINFor some commands (e.g. locking/unlocking supported on some cars) you need in addition to your login the so called S-PIN, you can provide it with the--spinoption:weconnect-mqtt--usernametest@test.de--passwordtest123--spin1234--mqttbroker192.168.0.1--mqtt-usernametest--mqtt-passwordtest123--prefixweconnectCredentialsIf you do not want to provide your username or password all the time you have to create a ".netrc" file at the appropriate location (usually this is your home folder):# For WeConnect
machine volkswagen.de
login test@test.de
password testpassword123

# For the MQTTBroker
machine 192.168.0.1
login test
password testpassword123You can also provide the location of the netrc file using the --netrc optionThe optional S-PIN needed for some commands can be provided in the account section:# For WeConnect
machine volkswagen.de
login test@test.de
password testpassword123
account 1234Charging stationsYou can also obtain data from charging stations by adding a location with e.g.--chargingLocation 52.437132 10.796628and a radius in meters with--chargingLocationRadius=500.
Data for charging stations is mostly static, but you can see the current availability.TopicsIf your broker does not let you observe all available topics you can pass the parameter--list-topicsto get all topics displayed on the commandline. Topics marked as "(writeable)" can be manipulated.
There are also two topics to receive all available topics as a comma seperated list:weconnect/0/mqtt/topicslists all available topics,weconnect/0/mqtt/writeableTopicsprovides topics that can be manipulated.Disabling featuresYou can disable data for the cars capabilities with--no-capabilitiesIf you only need a subset of the data you can use the--selectiveoption. E.g.--selective climatisationImagesYou can enable ASCII Art pictures of the cars with--picturesPNG vehicle imagesIf your client can deal with PNG-images received through MQTT you can set--picture-format pngTimesBy default the times coming from the car are UTC isoformat. You can convert times to your local timezone by adding--convert-times. Convert times will use the systems timezone. If you want to set a specific timezone use e.g.--convert-times Europe/Berlin.
You can format times in your local format by adding--timeformat. This will use the default Date/Time format of your locale setting. If you want to set a specific format use e.g.--timeformat '%a %d %b %Y %T'.
If you want to set the date in another language than default on your system use e.g.--locale de_DE.Raw JSONIf you want to continue working with the whole data you can also enable the topicweconnect/0/rawjsonby adding--with-raw-json-topic. The topic is published on every change of the json string.Tested withVolkswagen ID.3 Modelyear 2021Volkswagen Passat GTE Modelyear 2021Reporting IssuesPlease feel free to open an issue atGitHub Issue pageto report problems you found.More Questions?Please see the wikiWikior start adiscussion.Known IssuesThe Tool is in alpha state and may change unexpectedly at any time!Related Projects:WeConnect-cli: Commandline Interface to interact with the Volkswagen WeConnect ServicesWeConnect-python: Python API to connect to Volkswagen WeConnect ServicesVWsFriend: VWsFriend is a software to visualize and record statistics of your car and allows control via HomeKitSeat, Cupra, Skoda IV, ...In an effort to try to make WeConnect-MQTT also to work with latest generation of vehicles from other volkswagen brands I'm looking for users to temporarily share access to their accounts. If you are willing to support please send me a message.Already tried: Cupra Born (The API looks a bit different, maybe it is older, I will check again in some weeks), thanks to the user initdebugs