Metadata-Version: 2.4
Name: carconnectivity-connector-skoda
Version: 0.12.6
Summary: CarConnectivity connector for Skoda services
Author: Till Steinbach
License-Expression: MIT
Classifier: Development Status :: 3 - Alpha
Classifier: Intended Audience :: Developers
Classifier: Programming Language :: Python :: 3.9
Classifier: Programming Language :: Python :: 3.10
Classifier: Programming Language :: Python :: 3.11
Classifier: Programming Language :: Python :: 3.12
Classifier: Programming Language :: Python :: 3.13
Classifier: Programming Language :: Python :: 3.14
Classifier: Topic :: Software Development :: Libraries
Requires-Python: >=3.9
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: carconnectivity>=0.11.10
Requires-Dist: oauthlib~=3.3.1
Requires-Dist: requests~=2.34.0
Requires-Dist: pyjwt~=2.13
Requires-Dist: paho-mqtt~=2.1.0
Requires-Dist: firebase-messaging>=0.4.5
Dynamic: license-file



# CarConnectivity Connector for Skoda Vehicles
[![GitHub sourcecode](https://img.shields.io/badge/Source-GitHub-green)](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/)
[![GitHub release (latest by date)](https://img.shields.io/github/v/release/tillsteinbach/CarConnectivity-connector-skoda)](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/releases/latest)
[![GitHub](https://img.shields.io/github/license/tillsteinbach/CarConnectivity-connector-skoda)](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/blob/master/LICENSE)
[![GitHub issues](https://img.shields.io/github/issues/tillsteinbach/CarConnectivity-connector-skoda)](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/issues)
[![PyPI - Downloads](https://img.shields.io/pypi/dm/carconnectivity-connector-skoda?label=PyPI%20Downloads)](https://pypi.org/project/carconnectivity-connector-skoda/)
[![PyPI - Python Version](https://img.shields.io/pypi/pyversions/carconnectivity-connector-skoda)](https://pypi.org/project/carconnectivity-connector-skoda/)
[![Donate at PayPal](https://img.shields.io/badge/Donate-PayPal-2997d8)](https://www.paypal.com/donate?hosted_button_id=2BVFF5GJ9SXAJ)
[![Sponsor at Github](https://img.shields.io/badge/Sponsor-GitHub-28a745)](https://github.com/sponsors/tillsteinbach)

## CarConnectivity will become the successor of [WeConnect-python](https://github.com/tillsteinbach/WeConnect-python) in 2025 with similar functionality but support for other brands beyond Volkswagen!

[CarConnectivity](https://github.com/tillsteinbach/CarConnectivity) is a python API to connect to various car services. This connector enables the integration of skoda vehicles through the WeConnect API. Look at [CarConnectivity](https://github.com/tillsteinbach/CarConnectivity) for other supported brands.

## Configuration
In your carconnectivity.json configuration add a section for the skoda connector like this:
```
{
    "carConnectivity": {
        "connectors": [
            {
                "type": "skoda",
                "config": {
                    "username": "test@test.de",
                    "password": "testpassword123"
                }
            }
        ]
    }
}
```
### Credentials
If you do not want to provide your username or password inside the configuration you have to create a ".netrc" file at the appropriate location (usually this is your home folder):
```
# For WeConnect
machine skoda
login test@test.de
password testpassword123
```
In this case the configuration needs to look like this:
```
{
    "carConnectivity": {
        "connectors": [
            {
                "type": "skoda",
                "config": {
                }
            }
        ]
    }
}
```

You can also provide the location of the netrc file in the configuration.
```
{
    "carConnectivity": {
        "connectors": [
            {
                "type": "skoda",
                "config": {
                    "netrc": "/some/path/on/your/filesystem"
                }
            }
        ]
    }
}
```
The optional S-PIN needed for some commands can be provided in the account section of the netrc:
```
# For WeConnect
machine skoda
login test@test.de
password testpassword123
account 1234
```
### Known issues
#### MQTT `Not authorized`
The Skoda backend may reject new MQTT tokens for some time after a fresh installation, container restart, account switch, or notification token change. This often clears within a few minutes, but in some cases it can take much longer. During this time the logs can show `Not authorized` (reason code `135`) even though login and token refresh are working.

The connector retries automatically. On MQTT authentication failures it first refreshes the MQTT connect token a limited number of times. If that still fails, it performs at most one Android FCM notification re-registration, uploads the token to Skoda's notifications API again, and then backs off before retrying. This avoids repeatedly replacing notification tokens while Skoda's backend may still be propagating state. If MQTT still does not connect after recovery is exhausted, check the logs for notification registration failures before resetting credentials manually.

In local testing, running multiple CarConnectivity or MQTT connector instances with the same Skoda user appeared to make `Not authorized` failures more likely or longer-lasting. This is an operational observation, not a confirmed Skoda API rule. For long-running MQTT tests or deployments, use a dedicated guest user and use that guest user in only one active connector instance at a time.

#### Unexpected keys found
Not all items that are presented in the data from the server are already implemented by the connector. Feel free to report interesting findings in your log data in the [Discussions](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/discussions) section or as an [Issue (Enhancement)](https://github.com/tillsteinbach/CarConnectivity-connector-skoda/issues). My time is very limited, so usually new features take some time to get into the library, also because I need to align functionallity between the connectors of all brands.
