We'll set up Node-RED on the Raspberry Pi. So the first thing we can do is SSH into the Raspberry Pi using the .local address. The first time you do that you'll be prompted to save that into the SSH known hosts file. Enter the default password, which is raspberry, for the Pi user, and until you change that you'll be prompted to change the password, so it's a good idea to do it from the beginning for security reasons. So you can use the password command to enter the old password which is raspberry and enter the new password and confirm to set the new password. And, once you've done that, you'll be ready to start running Node-RED. So there are a number of different commands on the Raspberry Pi that are related to Node-RED. If you type in node-red at the command line, and hit tab a couple of times, you'll see the different commands...you can see node-red-pi, node-red-start, node-red-stop...you can use node-red-start to manually start Node-RED. And when you do that it'll print some information about Node-RED to the terminal so you can see some of the different commands ...different ways that you can start it. And most importantly, you'll see the IP address, server address, and port. So this is how you'd access Node-RED from your PC or your Mac. But before we go any further, let's cancel out of that, hit Ctrl+C, and we'll update Node-RED, and node, and npm, using the update-node-red command. So you'll see what it's going to do...it's going to remove the old versions and replace them with the latest versions of node, and npm, and Node-RED from the npm repository. So, that takes a little while to run, come back in a couple of minutes when that's done. Ok, now that it's upgraded node and Node-RED, we can run the node-red-start command and you'll see that the version of node and of Node-RED has updated. So that's going to print out in the informational message that gets displayed when you start Node-RED. Right there. Now the other thing we can do is we can grab the URL and port for our Node-RED service from that message and we can copy that into a web browser. and for this it is best to use Firefox or Chrome. Here's Chrome, we'll just copy that address in to access Node-RED. So here's the Node-RED user interface. You can see you've got nodes down the side that you can use to program your IoT flows. So, inputs and outputs and functions. And if you scroll down you'll see that there are a number of nodes that are specifically designed for the Raspberry Pi. So these here. you can see the Raspberry Pi GPIO nodes that are particularly useful when you want to control or read from components that are attached to the GPIO pins on the Raspberry Pi. So, this one is for sensors, and this one is for outputs, like actuators. And you can see there are a number of other nodes there that are relating to things like SenseHat on the Raspberry Pi. Now, all of these nodes have been installed from npm modules. So if we go up to the menu and go to Manage Pallette. We can see exactly where each of these nodes have come from. So, for the built-in nodes, we can see a list of nodes there that come from the node-red package. And we can see some of the other packages that are installed, like IBM Watson IoT provides these nodes. So there are a number of different nodes that are installed by default when you install Raspian Jesse. But you can also add contributed modules for additional nodes. So, go to the Install tab. And if we want to search for home automation packages, we could type home and do a search, and we'd see a number of different modules available. So, Alexa home skill module, for example; we've got line controller modules; we've got modules that are related to various other home automation frameworks; MQTT. The one that I'm particularly interested in is this home kit module which is for Apple Home Kit devices. If we click on install, we can see some more information, you can click through to the website for the module. And it's a good idea to do this before you install, because you'll see if there are any dependencies required to get that node module up and running. So, in this case there are. We need to install these libraries to make sure we have Bonjour support running on our Raspberry Pi. So if we copy that sudo [advocate?] install command in that list of dependencies there, we can go back to the command line. And we can install them. So hit Ctrl+C to cancel out of Node-RED, and run that command to install those packages. So, that should only take about a minute to install. We just need to confirm that yes we want to install all those packages. And once we've done that then we'll be able to install the node-red module either from npm via the command line or go back to the Node-RED user interface and install it by the graphical user interface. So you can see it has installed a number of different packages there. And now we are ready to run Node-RED again. But instead of running it manually this time using node-red-start, let's set it up so that we can run it using system control as a service. So sudo system control....and, we need to enable the Node-RED service. If you're not sure what the name of the service is, you can go back and look at the history where we started Node-RED, and you'll see the exact name of the service there, so its nodered all one word service. So, system control enable nodered service. And now that service is available, so we can run sudo service nodered start, to start that service, we can start it up on boot. And if wanted to stop the service we can run sudo service nodered stop. So now we can go and install this home kit module from the command line or we can go back to Node-RED and simply hit install. So that takes a little while, and once it's done, we'll see it has installed and we can see it now in our list of nodes, and there are two nodes available.