Patrick Schurig d838bce331 fix(v2c): set host address before connectDevice() in setupThing()
Bug: ModbusTcpMaster: device ':502' ConnectionError when adding a trydan
by manual IP (createMethod "user") or after nymead restart before the
NetworkDeviceMonitor completes its ARP scan.

Root cause: TrydanModbusTcpMaster was constructed with
monitor->networkDeviceInfo().address(), which is null at first
registerMonitor() — the monitor only populates its cache after an
asynchronous ARP/mDNS resolution. connectDevice() then ran against
QHostAddress() → ":502".

Fix:
- Read the initial IP from the stored address param (always set at
  discovery or user-entry) and use it as the fallback when the monitor
  has not yet resolved the address.
- Guard the networkDeviceInfoChanged callback: only call setHostAddress()
  when the new address is non-null (the monitor emits transient null info
  during its internal refresh cycles).

Order is now: create master with valid address → wire callbacks →
connectDevice(). The monitor update path remains for DHCP renewals.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-12 17:13:37 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:30:06 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:50:55 +02:00
2026-05-31 11:30:06 +02:00
2026-05-31 11:50:55 +02:00

etm-powersync-plugins-modbus

Description
No description provided
Readme GPL-3.0 7.5 MiB
Languages
CSS 93.2%
C++ 3.7%
HTML 3%