Hello guys!
I am trying to develop a driver to connect to a network device as a Tcp Client and send /receive binary messages. The device accepts connections without user authentication.
It has 3 inputs and 3 outputs that we can interact using binary messages.
The inputs inform their respective voltage levels each time they change via binary messages.
The idea is:
1 - Trigger events when input voltage changes and use these events in Rules and Alarms.
2 - Enable or disable outputs in the Smart Client.
3 - You view the inputs and their voltages on a Map / Smart Map.
I downloaded the Demo Driver and did some tests with it. It uses http or https. I didn’t see how to use TCP natively.
So I have a few questions:
1 - How to connect using TCP?
2 - How to associate the input voltage messages with the source input and show on a Map?
Thank you for your help!
The sample emulates that you are using a camera which would normally have a HTTP interface, but you can do TCP communication instead. Consider that you in the driver you develop implement the communication with your device. You should of course implement the communication you prefer or deem best for the task. There is only one sample, and no sample that shows a TCP communication. You are the expert on communication with your device and with this advice I hope you realize you can use your expertise and preferences.
Normally it is so that an input is only high or low. There is an opening, in the sample you can see how you can use an Analytics Event (in the sample: LPR event) so here you can add metadata to the event, an example could be a voltage value. This value however is not directly shown on maps or Smart Maps. It is shown if the event is used to raise an alarm and the alarm is shown in the Alarm Manager of the Smart Client.
I might be able to elaborate on how to show a voltage value, if you need this try to add some words on how you envision this being presented to the users.