Folks, I have already got it working, but need a bit of help with the mechanics of what is going on.
A long time ago I bought a board that connects to the internet and has two relays on it.
They can be controlled from the net.
There are two ways of going this: TCP and UDP.
They supply an “app” to do it, but I have sort of back-engineered how it works and so now I can control it from other devices.
This is what I have on NR:
[{"id":"6efacc1a.0c2234","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"11","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3170,"wires":[["caa11367.2b1738"]]},{"id":"caa11367.2b1738","type":"udp out","z":"2d44537.f26082c","name":"","addr":"192.168.0.21","iface":"","port":"6723","ipv":"udp4","outport":"","base64":false,"multicast":"false","x":480,"y":3170,"wires":[]},{"id":"303fcdc.485b232","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"21","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3210,"wires":[["caa11367.2b1738"]]},{"id":"4b6be5c4.dd0e34","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"11*","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3130,"wires":[["caa11367.2b1738"]]},{"id":"87eb840a.c305c","type":"tcp out","z":"2d44537.f26082c","host":"192.168.0.21","port":"6722","beserver":"client","base64":false,"end":false,"name":"","x":480,"y":3330,"wires":[]},{"id":"8a3ac7d2.f423f8","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"11","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3330,"wires":[["87eb840a.c305c"]]},{"id":"c9ed75f.9075388","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"21","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3370,"wires":[["87eb840a.c305c"]]},{"id":"aaacbf9c.d03868","type":"inject","z":"2d44537.f26082c","name":"","topic":"","payload":"11*","payloadType":"str","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":100,"y":3290,"wires":[["87eb840a.c305c"]]},{"id":"5109ce29.870c98","type":"comment","z":"2d44537.f26082c","name":"Ethernet Relay control","info":"","x":450,"y":3090,"wires":[]}]
Boring, I know.
But where I am stuck is that if the app uses TCP/HTP, then I can get back the state of the relays.
Yes, I know this isn’t where they were made, but to get an idea of what the nodes do…
I can also get the information by telneting to the IP address.
I enter the “command” and I get back a series of numbers representing the state of the relays.
That is via TCP.
So I am stuck why when I put a TCP RX node and set it to monitor the channel, NR complains saying the port is already busy/used.
Yeah, for TX not RX. I know (appreciate) this is a bit off topic, but I am simply wanting to learn.
As I have the operation of the relays working with NR, I thought it wouldn’t hurt to ask.