A GEN24 answers for the inverter on unit ID 1 and for its Smart Meter on unit ID 200 by default, behind the same host and port. One thing now carries two SunSpecConnection objects, the second one driven by the meterSlaveId parameter that until now no line of C++ ever read. The meter connection is created during setup but left idle: it is only brought up once the primary connection has finished discovering, so the two never handshake at the same time towards the same inverter. An absent meter never fails the pairing, since a GEN24 without a Smart Meter is a legitimate installation and the parameter has a non zero default the user did not choose. thingRemoved() and the reconfigure path now dispose of both connections through a single entry point. Their else if chain used to stop at the primary one, which left the meter connection outliving its thing with an open socket and signals pointing at a destroyed Thing. Child things look their model up across every connection of their parent. The two connections of a GEN24 never announce the same model ID, so no discriminator has to be persisted. Adds a test suite instantiating the plugin behind a real ThingManager with two connections. It lives in its own binary because the F1 suite checks global call counters that extra configured things would falsify. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
etm-powersync-plugins-modbus
Languages
CSS
93.6%
C++
3.3%
HTML
3%