thin-edge.io icon indicating copy to clipboard operation
thin-edge.io copied to clipboard

what is right way to implement a device through TCP protocol connect to the thin-edge?

Open icoco opened this issue 8 months ago • 4 comments

not support yet ? if possible create a plugin that support TCP protocol then deploy on the thin-edge ?

icoco avatar Apr 15 '25 14:04 icoco

@icoco Thanks for reaching out in the project. Though would be able to explain a little bit more on what you are trying achieve, as it is a little vague?

Are you trying to deploy an application which talks a TCP protocol (like modbus), and want to now publish the data to the cloud via thin-edge.io?

reubenmiller avatar Apr 15 '25 15:04 reubenmiller

If you are talking in general how to integrate some custom external device is accessible by some TCP protocol, then the diagram below might help to illustrate how everything fits together.

In the diagram it shows a custom plugin/component (in this case a modbus agent) which knows how to talk Modbus, and it can translate messages from Modbus into thin-edge.io MQTT messages. These messages are then translated by the thin-edge.io components and pushed to the clouds.

Image

The power of thin-edge.io is that it offers are very easy to consume interface which custom components can use without having to worry about any of the more complex cloud communication (e.g. data buffering, message translation etc.).

There is already a community driven modbus-plugin, or alternatively, there is the takebishi-devicegateway which can be used to connect to PLCs and it can then be configured to publish the information retrieved from the PLCs to the local thin-edge.io MQTT broker.

reubenmiller avatar Apr 15 '25 16:04 reubenmiller

most like, just the device apply private TCP data packet format, need do parse job in edge side then convert to standard data format (json or others) , after that push to cloud

so, the modbus-plugin can use for base reference?

icoco avatar Apr 16 '25 02:04 icoco

most like, just the device apply private TCP data packet format, need do parse job in edge side then convert to standard data format (json or others) , after that push to cloud

so, the modbus-plugin can use for base reference?

You can use the tedge-modbus-plugin as a reference, however I'd still recommend using the thin-edge.io MQTT API Docs as your main reference on how to interact with thin-edge.io.

reubenmiller avatar Apr 17 '25 13:04 reubenmiller