Commit graph

9 commits

Author SHA1 Message Date
hmelder 6bd2d18ce2 succd: Do not exit prematurely if modbus connections fails
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 11s
2024-11-15 23:49:26 +01:00
hmelder 3b9c1ba912 succd: MODBUS library does not differentiate between TCP socket time outs and RTU time outs
All checks were successful
/ test (pull_request) Successful in 10s
/ test (push) Successful in 10s
2024-11-10 07:06:56 +01:00
hmelder 9ec580c26f succd: implement auto-restarting of MODBUS connection in case of network loss
All checks were successful
/ test (push) Successful in 11s
/ test (pull_request) Successful in 10s
2024-11-10 06:51:21 +01:00
Rahix 152290f5a3 succd: Fix -KEC1 relay board updates
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 10s
The accesses to -KEC1 always time out on the attempt to update the
output values.  We noticed that this is related to the timing between
the reading of the inputs and the following write to the outputs.

Fix -KEC1 accesses by waiting before sending the next request to the
board after receiving the reply for the previous one.
2024-11-10 06:36:43 +01:00
hmelder 6f93b96c39 succd: do not early return on error in modbusUpdate
When one device fails, this should not influence updates of the other
devices.  Thus, early return was the wrong strategy here.

Instead, when communication with a device fails, skip the process data
update and continue with the next device.
2024-11-10 06:35:50 +01:00
hmelder d8a467a0c4 succd: Split scope lock into multiple blocks
All checks were successful
/ test (push) Successful in 11s
/ test (pull_request) Successful in 10s
We noticed huge load spikes with the latest changes.  This was caused
by the modbus goroutine blocking the entire daemon for long periods of
time while doing its data transfer.

Fix this by only holding the lock while performing data accesses.
2024-11-10 05:45:58 +01:00
hmelder e7fd2dd7d7 succd: KFA{1,6,7} are normally closed
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 10s
2024-11-10 05:20:24 +01:00
hmelder 606d470577 succd: Migrate to KEC1 MODBUS relay board
All checks were successful
/ test (push) Successful in 10s
/ test (pull_request) Successful in 10s
2024-11-10 05:11:48 +01:00
hmelder 2e6a3be100 Add modbus integration 2024-11-10 01:59:09 +01:00