I managed to use the IFTTT on the KC868-COL logical controller. A very simple test where if the Temperature shows above 33degC Relay 1 turns on at the KC868-H32 relay board's. Both KC868-H32 relay board's and KC868-COL logical controller are connected via a RS232 cable.
How do show the status of Relay 1 on the KC868-H32 relay board's using a LED on the NodeRed to indicate it's turned "ON"? i don't want to use a Digital in as its a waste of resource. Just a LED on NodeRED reading from the "Function" Node where when its "ON" Led lights up on the NodeRed Screen and when "OFF", LED turns off.
As per my above request, is there away to get the Relay Status back in real time and display that on NodeRed?
What Nodes should i use to get the status displayed?
(10-30-2020, 08:19 AM)admin Wrote: Do you means use wall switch for manual control, need update the relay state for Node-Red?
Dear Sir.
let me give an example.
If my KC868-H32 relay board is 100meters away and I am in the office. On my NodeRed interface, I have a screen that is showing the Relay buttons. When I click the button 1 it then turn "ON" relay 1. But, how do I know that the relay is actually turned "ON"?
Is there a way to find out the status of the KC868-H32 relay board to which relay is turned on? If I physically walk 100 meters to the relay board controller then I can see the "Red" light where then I know its turned "ON" but walking 100 meters there to verify if the relay 1 is "ON" is un-logic.
OK, i see. There are two way to read the relay state.
1: Send read relay state to KC868 relay controller by "TCP OUT" node. Then will return the state string, you can use "TCP IN" node analysis relay is ON/OFF, then make an LED ON/OFF in Node-Red.
2: Way-1 is use software query mode, if you want physically read relay state, that need put wire from relay output back to your office, that need 100 meter line, I think it's hard to do it.
2.Read status of one relay:
Send: RELAY-READ-255,x (x is the channel of Relay)
Feedback: RELAY-READ-255,x (x is the channel of Relay), y ( status 0 / 1), OK/ERROR
5.Read all relays status by one command:
Send: RELAY-STATE-255
Feedback:RELAY-STATE-255,D3,D2,D1,D0,OK/ERROR
2.Read status of one relay:
Send: RELAY-READ-255,x (x is the channel of Relay)
Feedback: RELAY-READ-255,x (x is the channel of Relay), y ( status 0 / 1), OK/ERROR
5.Read all relays status by one command:
Send: RELAY-STATE-255
Feedback:RELAY-STATE-255,D3,D2,D1,D0,OK/ERROR
2.Read status of one relay:
Send: RELAY-READ-255,x (x is the channel of Relay)
Feedback: RELAY-READ-255,x (x is the channel of Relay), y ( status 0 / 1), OK/ERROR
5.Read all relays status by one command:
Send: RELAY-STATE-255
Feedback:RELAY-STATE-255,D3,D2,D1,D0,OK/ERROR
Dear Admin.
Thank you for your feedback. i will try this.
Dear Admin
i am having some issue.
How to i make the LED light turn "ON" or "OFF" to show the status of the relay?
i have tried using the "TCP IN" Node and i can get the status of the relay if its turn ON or OFF as per my screen shot attached.
But. how can i turn that LED ON to show the ON status of the relay and LED OFF to show the OFF status of the relay? i am not sure which node to use?
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)