Patrick Schurig e1e91a19c3 sunspec: sweep orphan children against every connection at once
processDiscoveryResult() makes child things disappear when their model
is no longer announced. It used to confront them with the models of the
one connection that had just finished discovering, which is only half of
the picture on a thing carrying two: the inverter discovery would delete
the meter child, and the meter discovery the inverter and storage ones,
on every single reconnect.

The sweep now waits for every connection of the parent to have reported
a successful discovery, then confronts the children with the union of
their models. A grace period releases it if a connection never reports,
so a hung discovery cannot freeze the cleanup for good.

That grace period is inferred, not measured: it is set generously
because sweeping too late leaves a stale child showing as disconnected,
while sweeping too early deletes a thing of the user. Recorded as D-2 in
DIVERGENCES.md with what to measure to replace it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
2026-08-02 09:02:35 +02:00
..

SunSpec

Connect nymea to SunSpec devices over Modbus TCP

Supported Things

  • SunSpec Inverter
    • Model ID 101 & 111 Single phase inverter
    • Model ID 102 & 112 Split phase inverter
    • Model ID 103 & 113 Three phase inverter
  • SunSpec Meter
    • Model ID 201 & 211 Single phase meter
    • Model ID 202 & 212 Split phase meter
    • Model ID 203 & 213 Three phase meter
  • SunSpec Storage
    • Model ID 124

Tested connections

  • SolarEdge (with custom battery)

Requirements

  • The package 'nymea-plugin-sunspec' must be installed.
  • The SunSpec device must support SunSpec over modbus TCP

More

https://sunspec.org