Now from a computer on the same network as the PI we can open a web browser and enter in the PI's ip address followed by :1880 (e.g. 192.168.1.10:1880). This should open the Node-Red web interface.

The first thing you want to do is drag an inject node from the options on the left to center of the screen. Double click on this node

This will pop up a screen as shown in the second picture, for the payload option you want to click the drop down arrow and change it to String, in the text box you need to type =rainbow this will eventually send the command to start the rainbow animation to the Arduino. To see a full list of commands available check out the McLighting github page here. We also want to name node something meaningful in the Name field and click Done

Next we want to select a websocket node from the output options and drag it to the right of out inject node. Again we want to double click on this to edit it.

Under the Path option, select Add new websocket listner and click the edit button beside it (the pencil)

In this screen we want to type the following into the path option:

ws://192.168.1.X:81/ (X should be replaced with the actual IP address of your device.)

Click the Add button

Now give the node a name that is meaningful for being able to identify this light (I just numbered them 1 - 9) and click Done.

Now we just need to connect the output of the Make Rainbow node to the input of our new websocket node. When you have them connected with a line, click the Deloy button up the top right of the screen. You should see a connected status message under the websocket. Now if you click the Make rainbow button (the blue square to the left of the node) you should see your light change colour!

Now you just need to repeat the step of created the websocket node for each light, you can connect each of the inputs to these to the output of make rainbow, this will create the effect of them all changing at the same time.

Play around with the different options in node red to create different sequences etc! A nice simple one is to add a delay to before the input of each one to offset when they change