absmach / magistrala

Industrial IoT Messaging and Device Management Platform
https://www.abstractmachines.fr/magistrala.html
Apache License 2.0
2.46k stars 669 forks source link

Implement the Modbus adapter #1488

Open mpoplavkov opened 2 years ago

mpoplavkov commented 2 years ago

FEATURE REQUEST

2. Describe the feature you are requesting, as well as the possible use case(s) for it.

Implement an adapter supporting the Modbus protocol. The functionality should be the same as in existing adapters

3. Indicate the importance of this feature to you (must-have, should-have, nice-to-have).

nice-to-have

mpoplavkov commented 2 years ago

I'll start working on this one myself

cbrake commented 2 years ago

I've done quite a bit of work with modbus here: https://pkg.go.dev/github.com/simpleiot/simpleiot/modbus

The documentation is not current -- it now supports TCP as well as RTU. I would consider splitting this out into its own package if there is interest.

cbrake commented 2 years ago

SIOT can also be used to simulate modbus devices (functions as server) -- I find this handy for modbus development and testing. The following demonstrates client functionality, but server is very similar.

https://youtu.be/iIZWxr482mI

mpoplavkov commented 2 years ago

Unfortunately, due to the shifted focus in my company, I cannot take this issue now. If anyone wants to implement it - feel free.