Sending information between two separate clusters
Separate Vertex clusters are two different lighting systems, but you are still able to send information between them. For example, turning on a luminaire group that is placed in a different cluster than the wall panel or a sensor. For this purpose, we use the TCP/IP protocol and dedicated Node-RED nodes (TCP).
Prerequisites
Vertex clusters must be physically within the same LAN network
Vertex controllers still must be in the same network e.g. Vertex IPs should be 10.0.6.XX.
Example: You want to send a command from Vertex 2 which is in cluster 1 to Vertex 3 which is in Cluster 2. You should set IPs e.g. 10.0.6.50 for Vertex 2 and 10.0.6.85 for Vertex 3.
Flow
Sending messages via TCP
[{"id":"a4cf968d.6ffd3","type":"tcp out","z":"7f5faf37.f5792","host":"10.0.6.50","port":"4700","beserver":"client","base64":false,"end":false,"name":"","x":670,"y":260,"wires":[]},{"id":"e4a930e4.fc40b","type":"inject","z":"7f5faf37.f5792","name":"","topic":"","payload":"100","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":260,"wires":[["a4cf968d.6ffd3"]]},{"id":"a05052d2.74551","type":"inject","z":"7f5faf37.f5792","name":"","topic":"","payload":"0","payloadType":"num","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":240,"y":300,"wires":[["a4cf968d.6ffd3"]]}]
Receiving messages via TCP
[{"id":"1100c93d.3afbc7","type":"tcp in","z":"fd4e3895.5784f8","name":"","server":"server","host":"","port":"4700","datamode":"stream","datatype":"utf8","newline":"","topic":"","base64":false,"x":180,"y":480,"wires":[["58b48c45.9aae4c","fbb070f0.34c948"]]},{"id":"58b48c45.9aae4c","type":"debug","z":"fd4e3895.5784f8","name":"","active":true,"tosidebar":true,"console":false,"tostatus":false,"complete":"false","statusVal":"","statusType":"auto","x":380,"y":540,"wires":[]},{"id":"fbb070f0.34c948","type":"vertex action","z":"fd4e3895.5784f8","name":"","typeButton":"directv","bPayload":{"action":"setbrightness","group":"99b17e88a1df372900ab36b205b10059","param":0,"priority":"254"},"bState":"","defaultpriority":true,"x":550,"y":480,"wires":[["76a1a1a4.fcbf88"]]},{"id":"76a1a1a4.fcbf88","type":"vertex cluster","z":"fd4e3895.5784f8","userouting":false,"rate":5,"x":810,"y":480,"wires":[]}]
Instructions
Configure the TCP connection - sending messages
Open the Node-RED for the Vertex that will be sending data to another cluster.
In the Node Palette, find the TCP out node.
Â
Enter the node and select Type as Connect to and select port e.g. 4700. As a host, enter the Vertex IP which receives information.
Ports in the range 1024-49151 are called user or registered ports. Check them and make sure that the TCP port is vacant and ready to use. We use 4700 because no other application uses that port.
4. Connect two inject nodes to the tcp out node for sending two different messages to the other cluster.
You can send various messages via TCP eg. from the dali2devs common node, dashboard nodes like slider, light scheduler etc.
Configure the TCP connection - receiving messages
In the Node Palette, find the TCP in node.
Enter the node and select Type as Listen on port 4700. Then, select Output as a stream of String payload(s).
3. Add the debug node and connect it with the output of tcp in node. By doing so, you will see the messages flowing from the other cluster.
4. Add vertex action and vertex cluster nodes. Configure vertex action e.g. set Direct value mode and action as Set brightness (scale percent).
Test the connection
Send payload to the other cluster by clicking the button in the inject node. Then notice the messages caught by the debug node.
2. Observe the luminaire group which you wanted to trigger. Does the light turn on/off?
3. Try to send messages from other nodes e.g. dali2devs common.