Skip to main content

Base for EVSE API wrappers.

Project description

HEVA EVSE Wrapper

The purpose of this module is to provide a standardised base class for OpenHEVA compatible EVSE wrappers.

Included below are instructions describing how to build a wrapper for any HTTP based EVSE control and metering API.

Usage

First, install the module via pip install.

pip install heva-evse

Next, import the EVSEConnector base class for use in your project.

from heva_evse import EVSEConnector

Finally, use the base class as a guide to implement the required control and telemetry methods.

Note 1: The first argument of the constructor should be a dictionary of required config fields for a singular EVSE.

Note 2: The second argument to the constructor should also be a dictionary containing any fields required to integrate with the specific API (such as a generic API key).

class MyEVSEWrapper(EVSEConnector):
    def __init__(self, config, setup):
        self.username = config['username']
        self.password = config['password']
        self.charger_id = config['charger_id']

        self.partner_api_key = setup['api_key']
    
    ...

An example wrapper is available in the examples folder of this repository, showing how the base class can be used to abstract control of the Wallbox API.

Integration with OpenHEVA

In order to integrate your control and telemetry module into the OpenHEVA server, a simple yaml file must be included in the project root.

This file defines the import values and configuration fields required for successful operation, as well as brand and model information to assist in user onboarding.

For example:

module_name: my_evse
import_name: MyEVSEWrapper
brand_name: "My EVSE"
model_names:
  - "The first and best v0"
  - "Supercharge v1.0"
config:
  - username
  - password
  - charger_id
setup:
  - api_key

With this file present, OpenHEVA is able to install the wrapper using only a git url (be it public or private).

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

heva_evse-0.0.2-py3.8.egg (3.9 kB view details)

Uploaded Egg

File details

Details for the file heva_evse-0.0.2-py3.8.egg.

File metadata

  • Download URL: heva_evse-0.0.2-py3.8.egg
  • Upload date:
  • Size: 3.9 kB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.2 importlib_metadata/4.6.4 pkginfo/1.7.1 requests/2.22.0 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.10

File hashes

Hashes for heva_evse-0.0.2-py3.8.egg
Algorithm Hash digest
SHA256 0e9546c57533c62934cc2e0382de9802997cabe388f760a00523cba554eb7564
MD5 d2ec32318e63cfcd270fa7904ec4b89b
BLAKE2b-256 f5223ed581ee45d6dec7a4e1f9a0abf024f4118b499b136955600f21b0108276

See more details on using hashes here.

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