Skip to main content

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 2024 🚗💨

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

Usage

import logging
from py_incharge import InChargesend_remote_start

# Optional: logging.basicConfig(level=logging.INFO)
client = InCharge(email="your@email.com", password="your_password", subscription_key="your_subscription_key")
client.login()

# Charge your car like it's 2025
client.start_remote_transaction(station_name="EVB-12345678", rfid="123456abcdef")

🌟 How It Works

  1. Login: Uses Selenium to authenticate with Vattenfall's portal
  2. Get Tokens: Retrieves bearer tokens and command IDs
  3. WebSocket Connection: Establishes a real-time connection
  4. Send Commands: Sends remote start commands to your charging station
  5. 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:

  1. Write clean, documented code
  2. Follow the existing code style
  3. Add tests (not really, but when you're at it, feel free to test my code too ;) )
  4. 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


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

py_incharge-0.1.5.tar.gz (6.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

py_incharge-0.1.5-py3-none-any.whl (6.1 kB view details)

Uploaded Python 3

File details

Details for the file py_incharge-0.1.5.tar.gz.

File metadata

  • Download URL: py_incharge-0.1.5.tar.gz
  • Upload date:
  • Size: 6.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for py_incharge-0.1.5.tar.gz
Algorithm Hash digest
SHA256 8dbf359c3f917e64a93a3a3d429a74fbefb64795b929cdb0952a744487c57031
MD5 11d05ac689704c3f49de8d97bb9972c6
BLAKE2b-256 61903b37779f406b089016b7787c898b617876ab7e28a99e52055e82f74181f3

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_incharge-0.1.5.tar.gz:

Publisher: publish.yml on Swopper050/py-incharge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file py_incharge-0.1.5-py3-none-any.whl.

File metadata

  • Download URL: py_incharge-0.1.5-py3-none-any.whl
  • Upload date:
  • Size: 6.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for py_incharge-0.1.5-py3-none-any.whl
Algorithm Hash digest
SHA256 3bfc19e8b59b28c8c8f4440d385fc1746386cc69004065cef6e7c8378935444d
MD5 2a6ed6fc5ee950b81f92aacae2c0411c
BLAKE2b-256 63b1936cb8856bc6c25e377573ec3704c48d41b418947ffe1bcb7e5d747c7907

See more details on using hashes here.

Provenance

The following attestation bundles were made for py_incharge-0.1.5-py3-none-any.whl:

Publisher: publish.yml on Swopper050/py-incharge

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page