tillsteinbach / VWsFriend

VW WeConnect visualization and control
MIT License
246 stars 19 forks source link
car docker grafana homekit iobroker volkswagen volkswagen-carnet volkswagen-weconnect

VWsFriend

GitHub sourcecode GitHub release (latest by date) GitHub GitHub issues PyPI - Downloads PyPI - Python Version Docker Image Size (latest semver) Docker Pulls Donate at PayPal Sponsor at Github

Docker Compose CI

Volkswagen WeConnect© API visualization and control (HomeKit) inspired by TeslaMate https://docs.teslamate.org/

What it looks like

Requirements

Login & Consent

VWsFriend 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 start

More information

More information can be found in the Wiki: https://github.com/tillsteinbach/VWsFriend/wiki

Update

Privacy

Depending on the data provided by your car usage profiles of the cars users can be made (including the locations of trips, refueling and charging). If you need to protect the privacy of the cars users please add --privacy no-locations to the ADDITIONAL_PARAMETERS in your myconfig.env file

ABPR (A better Route Planner) support

VWsFriend supports sending its data to ABPR out of the box. You just have to generate a user-token in ABRP and configure it for your car in the UI. Connecting VWsFriend to ABRP enables you to use the current SoC, position, parking and charging state (feature availability depends on your car!) when planning routes in ABRP

VWsFriend with Apple Homekit support

If you do not like to share the host network with vwsfriend you can use macvlan mode docker-compose-homekit-macvlan.yml:

docker compose -f docker-compose-homekit-macvlan.yml --env-file ./myconfig.env up

In macvlan mode VWsFriend will appear as a seperate computer in the network thus you also have to set HOMEKIT_IP to a free IP address in your network in the .env-file. HOMEKIT_MASK and HOMEKIT_GW need to be configured with the correct netmask and gateway settings for your network.

In macvlan mode you reach VWsFriends UI on the configured IP at port 4000

Macvlan mode is not supported on macOS! See also Known Issues.

VWsFriend with MQTT support

VWsFriend also includes WeConnect-MQTT. This enables to use the data from the servers at the same time inside VWsFriend and with MQTT and thus saves additional requests and load on the server. If you want to know how to configure MQTT, see here: WeConnect-MQTT Readme VWsFriend is using the same options as WeConnect-MQTT. Just select the options as described in WeConnect-MQTT and add those to the ADDITIONAL_PARAMETERS.

Automated Updates

As there are continuously updates to the WeConnect API VWsFriend my stop unexpectedly working. I try to push updates in this case as fast as possible. You can configure to get these updates automatically by adding watchtower to your docker-compose.yml file:

watchtower:
    image: containrrr/watchtower
    volumes:
      - /var/run/docker.sock:/var/run/docker.sock
    command: --interval 3600 --cleanup

If you want to be sure that the update only happens at a certain time of the day to prevent updating in times where you use the car you can also schedule update times like this:

    command: --schedule "0 0 2 * * *" --cleanup

The example shifts the update time to 2:00 (UTC)

Automated Backups

For automated backups I recommend using docker-volume-backup. You just need to add an additional service to your docker-compose.yml to allow it to make regular backups. This example shows a configuration for daily backups on a webdav enabled NAS:

backup:
  image: offen/docker-volume-backup:latest
  restart: always
  environment:
    WEBDAV_URL: https://mynas:5006
    WEBDAV_URL_INSECURE: 'true'
    WEBDAV_PATH: /home/backup/VWsFriend
    WEBDAV_USERNAME: backupuser
    WEBDAV_PASSWORD: secretbackuppassword
  volumes:
    - /var/run/docker.sock:/var/run/docker.sock:ro
    - postgresdb_data:/backup/postgresdb-backup:ro
    - grafana_data:/backup/grafana-backup:ro
    - vwsfriend_data:/backup/vwsfriend-backup:ro

docker-volume-backup supports various backup locactions and can also enable different retention policies.

Known Issues

Open improvements

Credits

Related projects

Seat, Cupra, Skoda IV, ...

In an effort to try to make VWsFriend 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.

Other

We Connect© Volkswagen AG