Third-party sources

This page lists the third-party code the project runs on. A separate section lists services whose behaviour was adapted from ideas or documentation in another open source project without using its code. The exact versions are in the package files (pyproject.toml, go.mod, package.json). This page says what each dependency is for and where less obvious implementation choices came from.

Python services

Every service depends on paho-mqtt (via libs/energy_node_common) for its MQTT connection. Beyond that:

Package Used by What for
paho-mqtt All services MQTT client, declared in libs/energy_node_common/pyproject.toml
apsystems-ez1 services/apsystems_ez1/ Client for the EZ1 microinverter’s local REST API
requests + urllib3 services/shelly/, services/trucki/ HTTP polling with connection pooling and retry
tinytuya services/tuya_mqtt/ Local protocol for Tuya devices without the cloud, including the setup wizard the dashboard calls

services/battery_soc/ and services/automation/ need nothing beyond paho-mqtt. Their logic lives in the internal packages battery_soc_core and energy_node_common, which only use the standard library.

Adding a finding message

The calibration findings of battery_soc_core (libs/battery_soc_core/battery_soc_core/tuning.py) get their text from a catalog in messages.py, not from a string in the code. To add a finding:

  1. Pick the code, for example too_few_samples. If the finding has a subject, the catalog key is the code plus the subject, for example implausible_efficiency. finding_key builds it from params["subject"].
  2. Add the German and the English text to CATALOGS in messages.py, with the same placeholders as the params you pass.
  3. Add the same keys as config.tuning.finding.<key> to both dashboard catalogs, dashboard/internal/webui/catalogs/de.json and en.json.
  4. Raise the finding through _finding(code, severity, **params). It formats the German text from the catalog and keeps params for the dashboard to translate.

libs/battery_soc_core/tests/test_dashboard_catalog_parity.py fails when the core catalog and a dashboard catalog differ in keys or placeholders. If a finding has no params, the dashboard shows the German message as the fallback. Run .venv/bin/python3 scripts/vendor_core.py afterwards, so the Home Assistant integration gets the new messages.py.

Go: dashboard and installer

Package Used by What for
eclipse/paho.mqtt.golang dashboard/ MQTT client. gorilla/websocket, golang.org/x/net and golang.org/x/sync come in as its dependencies
pkg/sftp installer/ File transfer to the target Pi over SSH
zalando/go-keyring installer/ Keeps the node access details in the OS keychain
golang.org/x/crypto, golang.org/x/term installer/ SSH client and terminal handling for the setup

installer/webui/ (github.com/Developer-Simon/energy-node-webui) only uses the standard library.

Dashboard web UI (JavaScript)

The libraries are vendored into the repository, with no CDN and no build step. dashboard/internal/webui/static/js-deps/THIRD-PARTY-NOTICES.md lists them with versions and licenses (Alpine.js, ApexCharts, Choices.js, Cytoscape.js, flatpickr, htmx). installer/webui/ embeds the same build, and its notices file points to that list.

Adapted from, not depended on

APsystems EZ1

apsystems-ez1-enhanced is a community maintained Home Assistant integration for the same inverters. Its documentation of the RAM and flash power limit (getDefaultMaxPower / setDefaultMaxPower) and its use of the undocumented getOutputDataDetail endpoint are the basis for the power limit handling and the extended diagnostics in services/apsystems-ez1.md. No code was copied. Both projects use the same apsystems-ez1 PyPI package, so the endpoint behaviour applies directly.

Written for Energy Node v0.11.0.

Edit on GitHub