Skip to main content

Easee EV charger API library

Project description

Maintenance

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.12

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

Attribution, support and cooperation

This project was started by the late Niklas Fondberg, @fondberg. The repository has been inherited by his collaborators.

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

pyeasee-0.8.9.tar.gz (23.8 kB view details)

Uploaded Source

Built Distribution

pyeasee-0.8.9-py3-none-any.whl (25.4 kB view details)

Uploaded Python 3

File details

Details for the file pyeasee-0.8.9.tar.gz.

File metadata

  • Download URL: pyeasee-0.8.9.tar.gz
  • Upload date:
  • Size: 23.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyeasee-0.8.9.tar.gz
Algorithm Hash digest
SHA256 2065720faf677ee1bef348b89c37c6b185f2bb4f08fef1e8b5c423c4b6d8f306
MD5 c02e4f0e7450a956aa42a145da0635ae
BLAKE2b-256 2fbf7bff7158c7773c46eaa7c0a169b1139aa3c5c6e418987ec4dad47c24a03a

See more details on using hashes here.

File details

Details for the file pyeasee-0.8.9-py3-none-any.whl.

File metadata

  • Download URL: pyeasee-0.8.9-py3-none-any.whl
  • Upload date:
  • Size: 25.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for pyeasee-0.8.9-py3-none-any.whl
Algorithm Hash digest
SHA256 48e497f8274c12a4569fe51b973ea00f98331dc71cead7f99f1c3a91ef5d448e
MD5 551f3bef1fa18986860289a9ab0873b8
BLAKE2b-256 3ed0caa7a280dac326a259e15d91bcf206ff148ee173e3a9d63c06a7e5b8e7f3

See more details on using hashes here.

Supported by

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