Smart Home Automation Forum
KC868-H16B Status over TCP - Printable Version

+- Smart Home Automation Forum (https://www.kincony.com/forum)
+-- Forum: Technical Support (https://www.kincony.com/forum/forumdisplay.php?fid=1)
+--- Forum: KC868-HxB series Smart Controller (https://www.kincony.com/forum/forumdisplay.php?fid=2)
+--- Thread: KC868-H16B Status over TCP (/showthread.php?tid=2565)



KC868-H16B Status over TCP - v1rtus - 02-11-2023

I have a KC868-H16B relay controller, the mode is TCP Server.
I am trying to achieve that the controller will send it's status to the server that is put in Ethernet Setting. Does it work like that in the TCP Server mode and how to get the value for example using Nodered?

Thank you in advance!
Vladimir


RE: KC868-H16B Status over TCP - admin - 02-12-2023

when using in TCP Server mode. if H16B relay have changed state by switch terminal board. will auto feedback some STRING information tell you to update.
but if you use by Node-Red, we strongly recommend use by "MQTT" work mode for KC868-H16B, that will be very easy to update state.
here is mqtt protocol document: https://www.kincony.com/download/KC868-H32B-http-command.pdf
here is video tour how to integrate to Node-Red: https://youtu.be/841Hv7iPdk8 the video is based on H32B, but H16B is same.


RE: KC868-H16B Status over TCP - v1rtus - 02-12-2023

Thank you for your answer, unfortunately MQTT does not suit well in my case.

Could you please help how to get this status string from the controller?


RE: KC868-H16B Status over TCP - admin - 02-12-2023

2 ways:

a. when using in TCP Server mode. if H16B relay have changed state by switch terminal board. will auto feedback some STRING information tell you to update. STRING is Feedback:RELAY-KEY-255,x,1,OK (x is the channel of Relay)
change the status of one relay, such as your relay is ON, when send this command , relay will be OFF. if your relay is OFF, when send this command , relay will be ON.

b. send read relay state command
5.Read all relays status by one command:

Send: RELAY-STATE-255

Feedback:

KC868-H2,KC868-H4,KC868-H8: RELAY-STATE-255,D0,OK/ERROR
KC868-H16:RELAY-STATE-255,D1,D0,OK/ERROR
KC868-H32:RELAY-STATE-255,D3,D2,D1,D0,OK/ERROR

here is protocol details: https://www.kincony.com/smart-controller-development-protocol.html