11-14-2020, 10:49 AM (This post was last modified: 11-14-2020, 10:51 AM by dfi.)
I try to development software for connect and turn ON/OFF relay
I can connect with Local network
but I need to connect outside network
I have public IP server for install or config but I don't know how to config
And I develop Software with Java language
when I connect with Local network I config at attachments
now your controller ID is 192.168.43.45
if you want remote control this controller, your home or your office have public fixed IP address.
you can set port forward function in your router's setting,
let public visit port 4196 direct to 192.168.43.45
example:
your public IP is 100.100.100.100
Then set your router WAN port 4196 ->192.168.43.45
your program use IP:100.100.100.100 Port:4196 can visit the relay controller.
also we have a YouTube video link how to set: https://youtu.be/AS04KJS_o8g
if you use our phone app "kincony smart home " for remote control by internet.
if you use our phone app "KBOX" for local control by local network.
now you want to make program code by yourself, so the best soluton is write a server program on your cloud server to listen relay controller. set relay controller work mode = "TCP Client", it will auto connect to your cloud server.
A.TCP Server Version tool: In the VirCom network configuration tool, set the KC868-Hx controller “Work Mode” to “TCP Client”. At this time, the PC debugger is the server, and the KC868-Hx controller is the client. The server is in “Listening” state. After the controller is powered on, it will actively establish a socket communication connection with the server to realize data interaction. In the debugger, we demonstrate how to control the single relay switch, how to control “ALL ON”, “ALL OFF” with one button, how to control the specified relay switch, how to read the current state of one relay switch, how to read the current state of all relay switches at one time, and how to read the dry node sensor state connected at the input port of controller. The bottom left of the window is the content of “send buffer”; the bottom right of the window is the content of “receive buffer”. Before use, set the “port” value, then click the “Listen” button to listen and wait for the client controller to connection. After the connection is successful, the IP address and port number of the connected client device will be displayed in the software status bar.
This is a simple demo, if you connected well , send command can control relay and get the feedback command. that's well.
you can also use any TCP debug tool for testing.