Skip to main content

evse-hub

Solar monitoring and control daemons for Modbus-based EVSE (Electric Vehicle Supply Equipment) and energy monitoring, including polling, status tracking, MQTT integration, and InfluxDB data persistence.

Structure

evse_hub/
├── cli/
│   ├── evse_online.py
│   ├── evse_poll.py
│   ├── evse_scan.py
│   ├── mqtt_power_logger.py
│   ├── runtime.py
│   ├── status.py
│   └── supervisor.py
├── influx/
│   ├── influx_client.py
│   └── influx_writes.py
├── modbus/
│   ├── etrel/
│   │   ├── etrel.py
│   │   ├── modbus_reads.py
│   │   └── modbus_writes.py
│   └── modbus_device.py
├── mqtt/
│   ├── interface.py
│   └── parsers.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.
  • mqtt_power_logger.py: Async MQTT power logger with InfluxDB integration for monitoring power data from MQTT topics.
  • 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.

MQTT Support (evse_hub/mqtt/)

  • interface.py: MQTT configuration dataclasses and topic state tracking for power monitoring.
  • parsers.py: Message parsers for different MQTT formats (Frient impulse loggers, Shelly Pro 3EM three-phase power).

InfluxDB Integration (evse_hub/influx/)

  • influx_client.py: Singleton InfluxDB client manager with connection pooling for persistent database connections.
  • 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.

Metadata

Release files for evse-hub 0.7.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for evse-hub 0.7.1
File Size Uploaded Provenance Actions
evse_hub-0.7.1.tar.gz 39.0 kB Without provenance Details for evse_hub-0.7.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for evse-hub 0.7.1
File Interpreter ABI Platform Actions
evse_hub-0.7.1-py3-none-any.whl Python 3 none any Details for evse_hub-0.7.1-py3-none-any.whl

Total release size: 74.5 kB

Release files / evse_hub-0.7.1.tar.gz

Download URL evse_hub-0.7.1.tar.gz
Size 39.0 kB
Tags Source
SHA-256 checksum
How to use checksums
ab4a9bf99c9bde9c7c58ea60b87130033462fff7939afed35c6e8e62cf2bfcec
BLAKE2b-256 checksum
How to use checksums
dafac3458d9c1132640d3516508e28852b11fc50d2421348f48aab91b1c9861d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Release files / evse_hub-0.7.1-py3-none-any.whl

Download URL evse_hub-0.7.1-py3-none-any.whl
Size 35.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
70f32583cd64b30c7a884b2d9319ee2175136eda971fdb048c5f721f14147e2f
BLAKE2b-256 checksum
How to use checksums
5ff4a78496818f308c3872693cdac388815387132d5eb69ee7a5209645a3259d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.12

Security for evse-hub 0.7.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page