Two coupled fixes so the ABB Terra AC can be added over Modbus TCP:
- Restore checkReachableRegister ("serialNumber") in the register JSON.
The libnymea-modbus 1.15 code generator *requires* it — without it the
connection classes (abbterramodbustcpconnection.h) are never generated and
the plugin fails to build. Reverts the false lead in b23a9a2. The register
is valid: mbpoll confirms holding reg 16384 (uint64) responds at slave 2.
- Fix a use-after-free in AbbTerraTcpDiscovery::cleanupConnection() that
SIGSEGV'd nymead during network discovery whenever any Modbus device on the
LAN answered on :502 with an exception (e.g. "illegal data address"). The
method is invoked from several of the connection's own signals; it now
bails out on the second (re-entrant) call and disconnects the connection's
signals before disconnectDevice(), so the teardown can no longer re-enter
while the QModbusReply "finished" handler is still dereferencing the reply.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
ABB Terra AC
This plugin integrates ABB Terra AC chargers via Modbus TCP and Modbus RTU.
Implemented features:
- network discovery for Modbus TCP chargers
- Modbus RTU discovery using nymea's managed RTU hardware resource
- connection state
- plugged-in and charging state detection
- charging enable/disable via current-limit control
- writable maximum charging current
- active power and session energy
- firmware version, serial number, and error code
- communication timeout setting
The register model is based on:
ABB_Terra_AC_Charger_ModbusCommunication_v1.7.pdf