Node Red first steps.

Node Red first steps.

Node Red first steps.

Let's see how to perform a small test with Node RedChapter by chapter we will complicate it, but first we will take some basic first steps, so that you become familiar with this system.

If you don't have it installed yet Node Red Home Assistant Here we'll explain to you how to do it.

Node Red Home Assistant

First of all we have to know that a “FLOW” and a “NODE”

Flow It is the work area where we are going to create all our maneuvers.

node red first steps

 

Right next to “Deploy” is the Node Red, where we will be able to configure appearance, import and export our Flows and Manage Palette section where we will be able to find different integrations created by developers.

node red first steps 2

Node It is the container of the entity and the maneuver that we want to perform.

 

node red first steps 1

Node Red first steps.

For example, we are going to create a timer for a light bulb, how would we do it?

First we place a node that tells us the state the light bulb is in, we will use a node called EVENTS: STATE.

node red first steps 3

Then we double click on the Node and its properties will appear.

 

node red first steps 5

Now let's see what information to fill in.

  • Name: name we want to give to the entity.
  • Server: we have to select Home Assistant.
  • Entity ID: the entity that we want to control or monitor.
  • If State: “IS” and “OFF” this says that if the kitchen LED is off the node does not continue, the automation stops, the moment the light turns on the process begins.
  • And we press DONE.

Every time a node is created or modified we have to click the DEPLOY button, this does not check if there is an error in our node.

node red first steps

Once saved, the node appears like this:

node red first steps 6

It tells us that you are now connected and ready to continue.

For example, let's do a test to see if it communicates properly. Node Red Home Assistant, we turn on the light that we have assigned to the node, in this case Kitchen Led.

node red first steps 7

We can see that it is On, which means that it communicates perfectly.

Let's continue, let's add another Node called StopTimer, it is found in the list of nodes called Function, we take it and drop it on the Flow screen.

node red first steps 8

We assign the time that we want the light bulb to be on, click twice on the node and its properties will appear.

node red first steps 9

In the timer option we put the seconds, it can also be hours, minutes or milliseconds, it can be selected in the drop-down menu, we click Done and Deploy to confirm it.

Now we link the two nodes to begin the maneuver, this is done by clicking at the exit of the node and an arrow will appear that you must release at the entrance of the next one, a picture is worth a thousand words.

node red first steps 10

 

Now we are going to tell the Kitchen Led to turn off after 5 seconds, to do this we look for another Node called “Call Service” found in the nodes section of Home Assistant and we move them to our Flow and again we enter its properties.

node red first steps 11

The data to be filled in is like that of the first node that we have added, but here we also see the “Service” option, if you click on its drop-down menu you will see some of its options, but we are left with Turn_off, which is what we want to turn off the light bulb, click Done and Deploy as always and link the Timer node with the Call Service.

node red home assistant

and with this we now have our automation finished, it is very basic, but it is a first contact with Node Red first steps and their characteristics, the most important thing is that you dealt with the nodes, since it is fun, in future tutorials, we will see how to add a presence sensor that activates a light and a time programmer for irrigation or lighting.

Leave us your comment or doubts, you can also contribute your Flow Node Red Home Assistant to be able to share it with us.

Thank you and see you soon.

node red first steps.

 

Leave your comment