A Python package for remotely controlling Vattenfall EV charging stations
Project description
⚡PyInCharge - An unofficial Python library for controlling your Vattenfall InCharge charging stations 🔌
Because manually walking to your EV charger is so 2023 🚗💨
Welcome to this unofficial, half-baked but working (on my machine) Python package for controlling your Vattenfall InCharge charging stations. In essence, this is a Python wrapper around the Vattenfall InCharge web application.
It is born out of the frustration of not being able to control my charging station via Home Assistant, so I set out to develop a Python package with which you at least have some control over your station.
Right now, it can't do a lot, but at least it has these features:
- Selenium-Powered-Login: Automates the login process in a not so neat but working way
- Remote Start: Start charging your EV without leaving your computer
🏗️ Installation
pip install py-incharge
Or if you're feeling adventurous and want to build from source:
git clone https://github.com/Swopper050/py-incharge.git
cd py-incharge
pip install -e .
🎮 Quick Start
Environment Setup
Create a .env file or set these environment variables:
export USERNAME="your@email.com"
export PASSWORD="your_super_secret_password"
export STATION_NAME="EVB-P1234567"
export RFID="12345AB6789C01"
export SUBSCRIPTION_KEY="your_subscription_key_here"
Python API Usage
import asyncio
from vattenfall_charger import send_remote_start
# Charge your car like it's 2024
asyncio.run(send_remote_start())
🌟 How It Works
- Login: Uses Selenium to authenticate with Vattenfall's portal
- Get Tokens: Retrieves bearer tokens and command IDs
- WebSocket Connection: Establishes a real-time connection
- Send Commands: Sends remote start commands to your charging station
- Profit: Your car starts charging! 🎉
🚨 Important Notes
- Chrome Required: This package uses Chrome for authentication
- Credentials: Keep your credentials safe and never commit them to version control
- Rate Limits: Don't spam the API (be nice to the servers)
- Testing: Always test in a safe environment first
🤝 Contributing
Found a bug? Want to add a feature? PRs are welcome! Just make sure to:
- Write clean, documented code
- Follow the existing code style
- Add tests (not really, but when you're at it, feel free to test my code too ;) )
- Update this README if needed
📄 License
MIT License - feel free to use this for your own EV charging projects
Disclaimer: This is an unofficial tool and is not affiliated with Vattenfall. Use at your own risk and always follow local regulations regarding EV charging.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file py_incharge-0.1.0.tar.gz.
File metadata
- Download URL: py_incharge-0.1.0.tar.gz
- Upload date:
- Size: 5.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
57d1d52f58ce7305355297aa1e740018ace73fad6fe451efcfd786c5b798041b
|
|
| MD5 |
9873e4f915f3882635b327395c46738a
|
|
| BLAKE2b-256 |
a0d6b11bce4acc9cb9287e0c36016c03648c8d90e835f8cee5287b58660a7bf2
|
Provenance
The following attestation bundles were made for py_incharge-0.1.0.tar.gz:
Publisher:
publish.yml on Swopper050/py-incharge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_incharge-0.1.0.tar.gz -
Subject digest:
57d1d52f58ce7305355297aa1e740018ace73fad6fe451efcfd786c5b798041b - Sigstore transparency entry: 248512807
- Sigstore integration time:
-
Permalink:
Swopper050/py-incharge@cd85ba9f22160c84ea9753ba6144a32d599eb225 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Swopper050
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd85ba9f22160c84ea9753ba6144a32d599eb225 -
Trigger Event:
push
-
Statement type:
File details
Details for the file py_incharge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: py_incharge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 6.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
13a61550dbea95f391d22673791f75fb7a17f9d059a0b7757a04f65e75a7999b
|
|
| MD5 |
686f756e7fbae02bb0d97a4cf83446a0
|
|
| BLAKE2b-256 |
323d1b31dd4d88ba197096b5be7d8e0bd8d248bcdd6ee5710535e6be1c1c1700
|
Provenance
The following attestation bundles were made for py_incharge-0.1.0-py3-none-any.whl:
Publisher:
publish.yml on Swopper050/py-incharge
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
py_incharge-0.1.0-py3-none-any.whl -
Subject digest:
13a61550dbea95f391d22673791f75fb7a17f9d059a0b7757a04f65e75a7999b - Sigstore transparency entry: 248512810
- Sigstore integration time:
-
Permalink:
Swopper050/py-incharge@cd85ba9f22160c84ea9753ba6144a32d599eb225 -
Branch / Tag:
refs/tags/v0.1.2 - Owner: https://github.com/Swopper050
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@cd85ba9f22160c84ea9753ba6144a32d599eb225 -
Trigger Event:
push
-
Statement type: