Skip to content

WIP: adjust modbus sync logic and implement connection manager#2262

Open
alext-extracellular wants to merge 14 commits intofrangoteam:masterfrom
alext-extracellular:feat/statesync-good
Open

WIP: adjust modbus sync logic and implement connection manager#2262
alext-extracellular wants to merge 14 commits intofrangoteam:masterfrom
alext-extracellular:feat/statesync-good

Conversation

@alext-extracellular
Copy link

@alext-extracellular alext-extracellular commented Mar 15, 2026

📌 Description

A similar PR to this one: #2200
However I have implemented a different approach for synchronising with modbus devices. Instead of using a queue or sending the commands whenever the UI is used, the UI only modifies a local version of the state, which is then synchronised to the remote devices on the configured polling interval. This reduces the chance of timeout errors, and also means that a delay cannot build up between FUXA and the device on the other end of the queue. In this case, the delay between an action in FUXA and an update on the remote device will always be equal to the polling interval. It allows for setting higher polling frequencies with less chance of errors, as there are no user input triggered commands that can get sent at the same time and overload the bus.

To support multiple server devices on one RTU or TCP device, a connection manager has been added, which will create a key and shared connection that any other devices will reuse. this is the default behaviour now when no "Socket Reuse" option is selected.

I will mark as WIP for now, as I want to run some more tests in the coming week on my own hardware, but initial tests have succeeded and provided better performance.


🧪 Type of Change

Please mark the relevant option:

  • Bug fix
  • New feature
  • Refactoring
  • Documentation
  • Other

🚫 Build Artifacts Check

Please confirm:

  • I did NOT commit /client/dist
  • I did NOT commit generated Angular build output
  • Only source files are included

🔍 Checklist

  • Code follows project coding standards
  • I tested my changes locally
  • Documentation updated if required
  • Issue opened (for major changes)

📝 Additional Notes

@alext-extracellular
Copy link
Author

tabs have been replaced by spaces

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant