Connecting first Tracking device

Hi Everyone,

I have read through the documents in regards to connecting the first device, and I cannot seem to find the instructions I need.

Can I receive instructions on how to connect the first device using TCP please.

This has been configured in “Master” in the Manager UI.
(Please note the Quotes have not been entered for manual typed parameters).

So far;

  • I have pointed the device to the IP address of the Platform and Port 29050, which the port has been opened on the platform.

  • I have created the TCP Agent, in which I entered “localhost”

  • I have ticked the messageConvertHex option (Boolean Type)

  • I have set the port to 29050

As a result, the agentStatus Connection status had changed automatically to CONNECTING.

Can you advise on what I need to do next please.

Thank you in advance,
Michael

Hi,

Agents are generally for connecting to devices/services from the manager not the other way around.

There is the AbstractTcpServerAgent that can be used as a base for creating a concrete implementation of a TCP server for allowing devices to connect and you then define how to process the data using Netty handlers.

Rich

What would be the recommended way of making a connection between the device and the Platform using TCP connection please?

Good morning @Technique

As Rich mentioned, agents are usually considered to be services that they themselves connect to (outside) servers.

What you have essentially done in your TCP Agent is to point it to localhost:29050 as a client, not open up port 29050 to the internet and allow devices to connect there. There is currently no way (through the UI) to directly create a TCP service that opens up a port for other devices to connect to.

As Rich also mentioned, you would need to implement a AbstractTcpServerAgent in the OpenRemote code, that encodes and decodes your data as it’s coming in, and there, you would customize the behavior of that connection to your needs. If you do decide to implement your own Agent, make sure to consult the OpenRemote documentation and the various agents in the main OpenRemote repository.

Best of luck!

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.