How to have a feedback in button using TCP/Telnet from the Server.
Tecnico Videosound 4 years ago • updated by Vladimir Ovchinnikov (expert) 4 years ago • 7 • 1 duplicate
i'm having this issue about Server and Telnet/TCP.
What i'm trying to do is to control a smart power socket with 4 ports (netio 4c) with buttons , all the input commands are ok but i need to receive a feedback (the light is on / the light is off).
I'm controlling the socket via Telnet (using hex code).
The circled button should receive the feedback.
And this is the Server I/O config.
this is the command to get the port status (n.1 of 4) :
Thank you, Samuele
Customer support service by UserEcho
Ok, Thank you .
I need to incorporate the script in the server.
I followed the guide but i can't find a solution
Use EVENT_RECEIVE_TEXT or EVENT_RECEIVE_DATA events. to receive data from the device. Then process and write to the desired feedbacks by the SetFeedback method.
This is so simple but the script doesn't work.
I want to set the value of the feedback channel at 1 if the listener receives data , 0 if it doesn't.
I solved the problem.
But another one appeared :
Now the feedback lights work but i can't differentiate the 4 sockets , so when i turn on socket n1 the feed light of n2 ,n3 , n4 also turn on.
I tryied sending from each socket his number (with command "ID") to the server ;
using GetCommandAtName() for reading the number of the socket;
if() for accepting only the right number.
The problem is that the program seems to ignore the "if" condition.
You have a server project that uses the GetItem() method, which only works in a panel project. So you will never have an ID equal to "1" or "2".