Sensor not restored after the Ethernet2UART gateway node was rebuilt #27
Merged
ClaudeAI
merged 1 commits from fix/sensor-gateway-rebuild into master 56 minutes ago
Loading…
Reference in new issue
There is no content yet.
Delete Branch 'fix/sensor-gateway-rebuild'
Deleting a branch is permanent. It CANNOT be undone. Continue?
Sensor not restored after the Ethernet2UART gateway node was rebuilt.
Night log: the gateway TCP link timed out, the reconnect attempt failed, validate() returned false and the node factory deleted the gateway object and created new ones. The sensor stayed bound to the deleted object and remained "Connection is Unavailable" until restart.
Tested on site: sensor and camera powered off and on, the connection was re-established.
Generated with Claude Code
https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN16
- deviceETH2UART::validate(): the node stays valid while its DB record is unchanged; a lost link is reconnected by the node itself (back-off). Before, a failed reconnect made the node factory delete the gateway and create a new object, and the sensor stayed bound to the deleted one ("Connection is Unavailable" until restart). - basicTransport destructor notifies its parsers (transportDestroyed): the stale pointer is cleared and the connection reported as lost. - protocolParser leaves the transport's recipient list when deleted. - device2DSensor: a destroyed transport makes it request the resource again and run the connection sequence on the new object. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_0139veDo3XyavMuVhdnHcN160a9768dad4.