setupThing() only knew about sunspecConnection and solarEdgeConnection, so a froniusConnection thing fell into the final Q_ASSERT_X. In a release build the assert is compiled out, setupThing() returns without calling info->finish(), and the pairing hangs until the setup times out - with no message at all. In a debug build nymead dies on the assert instead. Take the same branch as the two vendors that already work: createConnection() already reads the slave ID and picks the byte order for froniusConnection, so no new logic is needed. postSetupThing() and thingRemoved() are unchanged on purpose. The former only special cases solarEdgeConnection, for the battery search a Fronius must not run, and registers the refresh timer for every thing. The latter is keyed on m_sunSpecConnections, which createConnection() now populates for Fronius as well. Makes the four cases of tst_sunspecplugin pass. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
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