11-06-2020, 01:43 AM
if you want to query the relay state, you need send query command by "TCP OUT":
A.Read status of one relay:Send: RELAY-READ-255,x (x is the channel of Relay)
B.Read all relays status by one command:Send: RELAY-STATE-255
Then controller will feedback the state and use "TCP IN" to read , let your LED on/off.
But i think only two way will change the relay state (1: by your software 2: by wall switch from switch terminal board)
if by way-1 , you already can deal with it. way-2, when manual control by switch terminal board, it not need you send query command, controller will auto send message to Node-Red, whick button is pressed, and now is ON or OFF.
it will feedback command like this:
RELAY-KEY-255,x,1,OK (x is the channel of Relay, 1 is ON, 0 is OFF)
A.Read status of one relay:Send: RELAY-READ-255,x (x is the channel of Relay)
B.Read all relays status by one command:Send: RELAY-STATE-255
Then controller will feedback the state and use "TCP IN" to read , let your LED on/off.
But i think only two way will change the relay state (1: by your software 2: by wall switch from switch terminal board)
if by way-1 , you already can deal with it. way-2, when manual control by switch terminal board, it not need you send query command, controller will auto send message to Node-Red, whick button is pressed, and now is ON or OFF.
it will feedback command like this:
RELAY-KEY-255,x,1,OK (x is the channel of Relay, 1 is ON, 0 is OFF)