Unleash the Power of Node Red in Your HomeAssistant Setup

Video Statistics and Information

Video
Captions Word Cloud
Reddit Comments
Captions
welcome to Chuck builds today we're going to be talking about node red and how to install it into home assistant node red is a flow-based automation program and I personally prefer it to the built-in automations inside of Home assistant something about being able to see the flow and logic is really helpful for me for making complex automations and troubl shooting existing ones the existing home assistant automation platform is not bad I'm a visual person so using this for some automations helps but in general I like to see it um on my personal home assistant I have a bunch of flows that I can see the progress and things that are probably not best practices scratch that I know they're not best practices um repeating the same type of device and changed output there's ways to programmatically do it I'm going to preface this and say I I am not an expert at node red that being said I do think this is worth your time to learn um learn how to use it you don't have to be an expert but I've been able to do more with this than I would have been able to do with this before we dive in I am not an expert at node red there's tons of people online that know a lot more than I do if you have a automation that you need help with go to the forms go to Reddit um go somewhere else I will not be able to help you troubleshoot your node red flows very well but it's really useful I really do prefer it over this type of Automation and it's just another option you can use both you can mix and match you can use all of One all of the other you can skip this video entirely but my next videos we'll be showing you some of my node red flows for more advanced automations or what I would consider Advanced what some people probably would not but if you're watching this video it might be Advanced for you too and I think is helpful to see everything that's going on before we cover the installation you should know that there are many options for installation you could run node red separately on a Docker container anywhere um on a Raspberry Pi in a VM wherever and then call into that into home assistant but for the purposes of this video we'll be installing it inside of Home assistant operating system that's what I've been sticking to for all my other videos I like having my add-ons in one place and I like that my backups capture my automations at the same time you can separate it if you need to but I would recommend doing it inside of Home assistant operating system if you can to install node red we'll go into home assistant settings add-ons and then the add-on store and we can search for it here it should be included with the home assistant Community add-ons not require an additional repository so it should pop right up and we'll click install before we launch it we'll go to configuration and we need to create a credential secret so I've got one that I pre-made in my bitw and wallet and then I'm also going to turn off SSL just because I don't have certificate handy for that I'll click save info and start Ander service is now running and I'm going to go ahead and click Watch Dog which will restart the add-on if it crashes so just make sure that your automations never not work if there's a restart or anything um auto update just not worry about it and then show in sidebar because we'll be accessing it often so we'll go to the web UI now that we're inside of node red we are going to create our first flow before we really dive into that I want to just kind of describe what we have going on when you get support online online it's going to help to use the right terminology so these things in the left here are called nodes and these nodes are kind of your tie into to a function a service or a physical item like a motion sensor you would um check on this via these home assistant nodes the uh probably two most important ones or nodes that you'll be using inside of node red is going to be the inject and the debug and so you just click and drag these nodes over to create them you can select them and press delete to get rid of them and these little blue dots are indicating that there's a change that has not been saved the way that you save is you go up here to deploy and just click deploy and we got a little warning that there's unused nodes here but that's fine so now that the blue dots are gone if I were to close out of node Red by going to the overview and then coming back inside of node red and let it start up again they're still there but if I didn't click deploy they wouldn't still be there so if I were to make this connection not deploy it go away and come back it's not saved so you need to make a habit of just hitting that deploy button all the time every change you make now I'll talk about these two nodes that we have here the timestamp node and the debug node and why I think they're probably the most important nodes that you'll be using the debug node is how you know what's going on we're going to go up to this little debug option right here this little bug and that will output anything going into a debug node with the label debug one the timestamp node why that's important is when I click this little button here it is going to like inject or start the flow process manually whereas if I were to do something like a state node when motion is detected then send me a message I don't want to have to get up and go trigger that motion detection each time to make sure that it's doing every ABC and D that I want it to do I hope that makes sense maybe it'll help if we see it uh so we're just going to click this button right here we're going to inject timestamp and we get to see here on the right our node debug one inside of flow one gave us a payload number which is a date time format and we can click on it to see all the different formatting options so I clicked that just now I can click it a bunch of times and it pops up really fast um so that's really important to know how to use this and see what you're expecting to get out of your Flow versus what is actually being put into the system for an example inside of Home assistant using our home assistant entities I'll be using the zigg motion sensor that I set up in a previous video and I'll also be using the taso of smart plug that we set up in a previous video um so it's good to know the names of them make sure they're on and working before you get into node red and the first thing I'll do is grab an event State node and we'll just rename this to motion sensor and then for the entities this will list every entity in your home assistant uh server so you could scroll through it but if you have a lot get in the habit of searching a keyword such as motion and then we can see we have builds motion sensor the battery motion temperature illuminance or power outage we're going to be using motion and we can also see occupancy as the actual entity and this is a binary sensor so it'll be a yes or a no um or some variation of that and we'll just go ahead and click done and we can move our debug here because we'll be using this and let's get rid of this Tim stamp and draw a new connection between the two and then click deploy and let's go over to our debug menu and I want to see if I move the motion sensor if it detects it might have already been saying that the room was occupied so I'll turn it away from me and we'll see if that gives us an unoccupied reading here shortly so while we're waiting on that to turn over and and this is a prime example of why time stamp would be useful we can work on the rest of our automation so while we're waiting on our motion sensor to clear out work on the rest of the Automation and that will be a call service which I like to think about as asking home assistant to do something or hitting an a button on the app on your phone or in the web view um call service is really anything that you are doing and then call state is like reading um so there's an action and then there's an observation and the call service is the action so we will click on this and call this turn on plug um we're going to need a domain and this is a switch so we will get the switch domain the service options we have available to us are toggle off or on we'll do toggle um area is just where this is I don't think I actually set that so I'll skip that device can help if you have a ton of entities but not that many devices and then entity is what we're specifically calling so we will type in Chuck because I believe it is called Chuck Bild tasmota S31 and we'll click done and deploy so deploy is like your save and then I'll click on this timestamp and the plug turned on and then it turned off because we used a toggle here if we were to switch it to just on so that error was I think I went too quick from deploy to um calling the service for turn on plug but when you click the timestamp it's already on so it stays on I'm going to set this to toggle though deploy to save and then I'm going to also put our motion sensor on this and then make sure our debug is on and then click deploy and so I'm going to reach from a motion sensor and it's going to detect motion and then a person is here and so we can see here the motion sensor detected my motion uh turned on the debug read that the message we received was on and then the plug was also talk at the same time that's a very simple flow this would have been easy to do in a Automation and home assistant but these visual aspects of it really help me out and being able to see what's going on here helps me as well so I recorded some Advanced example flows but I think I'm going to leave them out of this video we're at the 10-minute Mark and it's going to be another eight to get through a kind of dumb practice flow that I just threw together and my pacing was all off um so I'm going to try again on that in a future video and thought I'd just call it here but it's an Abrupt ending um hopefully you've installed node red you've made a little test flow with me seeing how to place a node and how they interact and how to debug um there's tons of examples online I'd encourage you to check out and I plan on covering quite a few more automations on my channel thanks for watching
Info
Channel: ChuckBuilds
Views: 1,988
Rating: undefined out of 5
Keywords: alexa node red, esp32 home assistant, esphome, google home assistant, home assistant, home assistant alexa, home assistant dashboard, home assistant esp32, home assistant node red, home assistant node red tutorial, home assistant tasmota, home assistant yellow, home server rack, homeassistant, homeassistant green, ihost, node red, node red home assistant, node red home assistant tutorial, node-red, node-red home assistant
Id: So3FAPh8lQU
Channel Id: undefined
Length: 11min 22sec (682 seconds)
Published: Fri Oct 13 2023
Related Videos
Note
Please note that this website is currently a work in progress! Lots of interesting data and statistics to come.