Easee EV charger API library
Project description
Easee EV Charger library
This library is an async thin wrapper around Easee's Rest API
Installation
You can install the libray from PyPI:
pip install pyeasee
The library is tested on Python 3.7 and Python 3.8
Command line tool
Run python -m pyeasee -h
for help.
Usage of the library
Docs
Read the API documentation here
Small example
Save the example to a file and run it like this: python3 example.py Username is the phone number that was used to register the Easee account with country code. E.g. +46xxxxxxxxx.
import asyncio
import sys
from pyeasee import Easee
async def async_main():
if len(sys.argv) < 3:
print(f"Usage: {sys.argv[0]} <username> <password>")
return
print(f"Logging in using: {sys.argv[1]} {sys.argv[2]}")
easee = Easee(sys.argv[1], sys.argv[2])
sites = await easee.get_sites()
for site in sites:
print(f"Site {site.name} ({site.id})")
equalizers = site.get_equalizers()
for equalizer in equalizers:
print(f" Equalizer: {equalizer.name} ({equalizer.id})")
circuits = site.get_circuits()
for circuit in circuits:
print(f" Circuit {circuit.id}")
chargers = circuit.get_chargers()
for charger in chargers:
state = await charger.get_state()
print(f" Charger: {charger.name} ({charger.id}) status: {state['chargerOpMode']}")
await easee.close()
asyncio.run(async_main())
See also __main__.py for a more complete usage example.
Development
This project uses black
for code formatting and flake8
for linting. To autoformat and run lint run
make lint
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
pyeasee-0.7.47rc1.tar.gz
(17.6 kB
view hashes)
Built Distribution
Close
Hashes for pyeasee-0.7.47rc1-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 825d31fe32d87b227f021cbcbf9b8e85b4e5d96dc60ec7c2c8a3685e3e6d26f7 |
|
MD5 | 366a4c99c19fa5c33832cdbb6d6f1525 |
|
BLAKE2b-256 | b73fca7a9fb333f4b2f9ff64de856ffdaad69d8bdebba7ccd57493148654c657 |