Smart Home Automation Forum
KC868-H8b can't connect python. - 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-H8b can't connect python. (/showthread.php?tid=210)



KC868-H8b can't connect python. - sotter - 02-03-2021

I would like to know how to write python from the computer and connect it to the device. It seems that it can not connect to IP and port.


RE: KC868-H8b can't connect python. - admin - 02-03-2021

set your relay controller work as "TCP Server" work mode. Then use IP and Port TCP socket connect by Python.
Here is demo source code: https://github.com/hzkincony/8-Channel-Network-Relay-Controlled-By-Python


RE: KC868-H8b can't connect python. - js82jumper - 03-13-2021

Might be a bit late but here is something I recently did for the kc868-32. It is a class written in Python that also keeps the state of the relays. The goal was to limit the need to know the commands being sent to the kc868. Let me know if there is something that could be improved.

https://github.com/js82jumper/Shared/blob/main/control/kc868.py


RE: KC868-H8b can't connect python. - admin - 03-13-2021

ok, now the new firmware also support integrate by http command. you can chose use TCP socket connection or http command.