Skip to main content

Solar monitoring and control daemons

Project description

evse_hub Python Package

This package provides tools and services for Modbus-based EVSE (Electric Vehicle Supply Equipment) and energy monitoring, including polling, status tracking, and integration with InfluxDB.

Structure

evse_hub/
├── cli/
│   ├── evse_online.py
│   ├── evse_poll.py
│   ├── evse_scan.py
│   ├── runtime.py
│   ├── status.py
│   └── supervisor.py
├── influx/
│   └── influx_writes.py
├── modbus/
│   ├── etrel/
│   │   ├── etrel.py
│   │   ├── modbus_reads.py
│   │   └── modbus_writes.py
│   └── modbus_device.py
├── ops/
│   └── heartbeat.py
└── tools/
    ├── async_tools.py
    ├── config.py
    ├── device_config.py
    └── wifi.py

Main Components

CLI Tools (evse_hub/cli/)

  • evse_online.py: Service for tracking online status of EVSE endpoints and writing status to JSON.
  • evse_poll.py: Polls Modbus devices for master/charger data and writes to InfluxDB.
  • evse_scan.py: Scans a network for Modbus TCP devices.
  • runtime.py: Defines EndpointRuntime, which holds runtime state for a Modbus endpoint.
  • status.py: Defines StatusSnapshot and utilities for loading endpoint status from JSON.
  • supervisor.py: Orchestrates polling tasks for all endpoints, starting/stopping them based on online status.

Modbus Support (evse_hub/modbus/)

  • modbus_device.py: Abstraction for Modbus TCP client connections and polling.
  • etrel/modbus_reads.py: Functions for reading Etrel-specific Modbus registers.
  • etrel/modbus_writes.py: Functions for writing to Etrel Modbus registers.

InfluxDB Integration (evse_hub/influx/)

  • influx_writes.py: Functions for writing EVSE and master data to InfluxDB.

Utilities (evse_hub/tools/)

  • async_tools.py: Async helpers for running blocking code.
  • config.py: Configuration loading utilities.
  • device_config.py: Endpoint configuration dataclasses and YAML loading.
  • wifi.py: WiFi-related utilities.

Example: Polling and Supervising Endpoints

  • Use evse_online.py to maintain a status file of which endpoints are online.
  • Use supervisor.py to start/stop polling tasks for each endpoint based on their online status.
  • Polled data is written to InfluxDB using the routines in influx_writes.py.

Key Classes

  • EndpointRuntime: Holds runtime state for a single Modbus endpoint (config, client, locks, task, etc).
  • StatusSnapshot: Immutable snapshot of endpoint online status at a given timestamp.

Key Functions

  • poll_endpoint: Polls a single endpoint for its configured roles.
  • supervisor: Orchestrates the lifecycle of all endpoint runtime objects and manages their polling tasks.

This README is auto-generated from the code and docstrings in src/evse_hub/. For details on each module, see the source files and their docstrings.

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

evse_hub-0.5.0.tar.gz (30.3 kB view details)

Uploaded Source

Built Distribution

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

evse_hub-0.5.0-py3-none-any.whl (24.8 kB view details)

Uploaded Python 3

File details

Details for the file evse_hub-0.5.0.tar.gz.

File metadata

  • Download URL: evse_hub-0.5.0.tar.gz
  • Upload date:
  • Size: 30.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for evse_hub-0.5.0.tar.gz
Algorithm Hash digest
SHA256 934897d627d7df48619ea4a61476de3736d782dce67d697d904a8fd8361ed522
MD5 15f25d019fa242e5c333b066ce724ce4
BLAKE2b-256 16c26cdc2b6b0d6c8c4f5a9c2724b3d7174bece1f4ea168edfdc1067281e1a1f

See more details on using hashes here.

File details

Details for the file evse_hub-0.5.0-py3-none-any.whl.

File metadata

  • Download URL: evse_hub-0.5.0-py3-none-any.whl
  • Upload date:
  • Size: 24.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.12.12

File hashes

Hashes for evse_hub-0.5.0-py3-none-any.whl
Algorithm Hash digest
SHA256 bcdd99c5aad67279d68f4bab20a9bd581b1f21bda90eccc1ee120f0f9e1fd81d
MD5 b7454f47da31891aa6dc73e913e83d98
BLAKE2b-256 dfcd3101c15275d91f233215bc9dfc02665594673fdc713312c1691362e7582a

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