0
Under review

How to have a feedback in button using TCP/Telnet from the Server.

Tecnico Videosound 3 weeks ago updated by Vladimir Ovchinnikov 2 weeks ago 7 1 duplicate

Good Morning, 

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) : 

0x6c,0x6f,0x67,0x69,0x6e,0x20,0x61,0x64,0x6d,0x69,0x6e,0x20,0x61,0x64,0x6d,0x69,0x6e,0x0d,0x0a,0x70,0x6f,0x72,0x74,0x20,0x31,0x0d,0x0a

Thank you, Samuele

Duplicates 1

Under review

Hello.

Feedback from equipment controlled with the help of AV & Custom Systems, can be received only with the help of JavaScript. it is conditioned by the fact that the program does not know to which equipment it will connect in advance. So it cannot determine the format and type of data which can be received.

https://dev.iridi.com/AV_%26_Custom_Systems/en#Feedback

Ok, Thank you .

How can i read this kind of data via javascript?

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.



Hello.

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".