Getting started with Node-RED

[et_pb_section fb_built=”1″ fullwidth=”on” _builder_version=”3.22.3″][et_pb_fullwidth_post_title date=”off” comments=”off” featured_image=”off” text_background=”on” _builder_version=”3.0.92″ title_level=”h2″ meta_text_color=”#000000″ background_image=”https://smarthome.university/wp-content/uploads/2018/03/6.png” background_position=”top_center” custom_margin=”0px|0px|0px|0px” custom_padding=”260px|0px|10px|0px”][/et_pb_fullwidth_post_title][/et_pb_section][et_pb_section fb_built=”1″ _builder_version=”3.22.3″ custom_margin=”0px|0px|0px|0px” custom_padding=”0px|0px|0px|0px”][et_pb_row custom_padding=”|0px|20px|0px” custom_margin=”||0px|” module_class=” et_pb_row_fullwidth” _builder_version=”3.22.3″ background_size=”initial” background_position=”top_left” background_repeat=”repeat” width=”100%” width_tablet=”100%” width_last_edited=”on|desktop” max_width=”100%” max_width_tablet=”100%” max_width_last_edited=”on|desktop” make_fullwidth=”on”][et_pb_column type=”4_4″ _builder_version=”3.0.47″][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto|700|on||||||” text_font_size=”18px” text_letter_spacing=”1px” custom_margin=”20px|20px|20px|20px”]So you installed Node-RED? Well done! Next step is to start with basic flows and build up your knowledge, it should not be too difficult.
[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row use_custom_gutter=”on” custom_padding=”20px|20px|20px|20px” module_class=” et_pb_row_fullwidth” _builder_version=”3.22.3″ width=”100%” width_tablet=”100%” width_last_edited=”on|desktop” max_width=”100%” max_width_tablet=”100%” max_width_last_edited=”on|desktop” make_fullwidth=”on”][et_pb_column type=”4_4″ _builder_version=”3.0.47″][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto||||||||” text_font_size=”16px”]If this is all new to you, Home Assistant is one of the most flexible and sophisticated open-source smart home platforms, and Node-RED is a visual programming tool making rule creation a walk in the park (ish).

BEFORE YOU START

Node-RED can be a bit intimidating at the beginning, but once you finish flows on this page everything will make sense. Before we start with two first flows, please have a look at a couple of tips below.

  • A basic concept of the flow is that it should start with something like inject, have logical operators between and finish with the outcome. The outcome for Home Assistant is usually an action.
  • You can test your flow using two very handy tools:
    • Debug – which allows you to see the message that leaves each of the elements in the flow
    • Inject – a basic trigger that will, for example, kick off your action if click on “inject” button
  • You can do basic commands in the window:
    • undo and redo (CTRL+ZCTRL+Y)
    • copy and paste. (CTRL+CCTRL+V)
    • delete (DEL)

Also, check our pick how you should spend first $250 on smart home, allowing you to create rules and experiment with the seven devices included.
[/et_pb_text][et_pb_video src=”https://youtu.be/9qbddDF8nPo” _builder_version=”3.0.92″ custom_margin=”30px||30px|”][/et_pb_video][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto||||||||” text_font_size=”16px”]FIRST FLOW

The video shows you how to create your first flow and it should not be complicated.

  • First, we will create a flow that will use motion sensor as a trigger and if the state changes switch on the light
  • We will then put a switch node so depending on the state change, we will switch the light on or off (you see how it is already better than YAML?)
  • And then after, we will also put a check to see if the light is already on

That is it. Nothing complicated. If you managed to do the steps above, you will be able to create the majority of automations already.

To copy the flow in the video, please use the link below to copy the text to the clipboard and in Node-RED go to the menu, import > clipboard

https://pastebin.com/3TT3vEBz

 

TO CONTINUE with Node-RED, see other tutorials:
[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row _builder_version=”3.2″ background_color=”#edf000″ global_module=”27853″][et_pb_column type=”1_4″ _builder_version=”3.0.47″][et_pb_image src=”https://smarthome.university/wp-content/uploads/2018/03/iconmonstr-save-11-240.png” url=”https://smarthome.university/home-assistant/node-red/installing-node-red-with-home-assistant/” align=”center” align_tablet=”center” align_last_edited=”on|desktop” _builder_version=”3.23″ module_alignment=”center” custom_margin=”|10px||10px”][/et_pb_image][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto||||on||||” text_font_size=”17px” text_letter_spacing=”2px” link_font=”|600|||||||” header_font=”||||on||||” text_orientation=”center” custom_margin=”|10px||10px”]

Node-RED installation

[/et_pb_text][/et_pb_column][et_pb_column type=”1_4″ _builder_version=”3.0.47″][et_pb_image src=”https://smarthome.university/wp-content/uploads/2018/03/iconmonstr-bug-10-240.png” url=”https://smarthome.university/home-assistant/node-red/getting-started-with-node-red/” align=”center” align_tablet=”center” align_last_edited=”on|desktop” _builder_version=”3.23″ custom_margin=”|10px||10px”][/et_pb_image][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto||||on||||” text_font_size=”17px” text_letter_spacing=”2px” link_font=”|700|||||||” header_font=”||||on||||” text_orientation=”center” custom_margin=”|10px||10px”]

Getting started

[/et_pb_text][/et_pb_column][et_pb_column type=”1_4″ _builder_version=”3.0.47″][et_pb_image src=”https://smarthome.university/wp-content/uploads/2018/03/iconmonstr-cube-17-240.png” url=”https://smarthome.university/home-assistant/node-red/most-common-automation-rules/” align=”center” align_tablet=”center” align_last_edited=”on|desktop” _builder_version=”3.23″ custom_margin=”|10px||10px”][/et_pb_image][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto||||on||||” text_font_size=”17px” text_letter_spacing=”2px” link_font=”|700|||||||” header_font=”||||on||||” text_orientation=”center” custom_margin=”|10px||10px”]

Most common automations

[/et_pb_text][/et_pb_column][et_pb_column type=”1_4″ _builder_version=”3.0.47″][et_pb_image src=”https://smarthome.university/wp-content/uploads/2018/03/iconmonstr-gear-11-240-1.png” url=”https://smarthome.university/home-assistant/node-red/advanced-automation-and-further-help/” align=”center” align_tablet=”center” align_last_edited=”on|desktop” _builder_version=”3.23″ custom_margin=”|10px||10px”][/et_pb_image][et_pb_text _builder_version=”3.0.92″ text_font=”Roboto|700|||on||||” text_font_size=”17px” text_letter_spacing=”2px” header_font=”||||on||||” text_orientation=”center” custom_margin=”|10px||10px”]

Advanced automation and further help

[/et_pb_text][/et_pb_column][/et_pb_row][et_pb_row use_custom_gutter=”on” custom_padding=”20px|20px|20px|20px” module_class=” et_pb_row_fullwidth” _builder_version=”3.22.3″ width=”100%” width_tablet=”100%” width_last_edited=”on|desktop” max_width=”100%” max_width_tablet=”100%” max_width_last_edited=”on|desktop” make_fullwidth=”on”][et_pb_column type=”4_4″ _builder_version=”3.0.47″][et_pb_cta title=”Can you help to improve this page? ” admin_label=”Was it helpful?” _builder_version=”3.16″ header_text_align=”left” header_text_color=”#474350″ background_color=”#f6f4f3″ border_radii=”on|5px|5px|5px|5px” border_color_all=”#474350″ text_orientation=”left” background_layout=”light” custom_margin=”30px|20px|10px|30px” custom_padding=”20px|20px|20px|20px” saved_tabs=”all” button_text_size__hover_enabled=”off” button_one_text_size__hover_enabled=”off” button_two_text_size__hover_enabled=”off” button_text_color__hover_enabled=”off” button_one_text_color__hover_enabled=”off” button_two_text_color__hover_enabled=”off” button_border_width__hover_enabled=”off” button_one_border_width__hover_enabled=”off” button_two_border_width__hover_enabled=”off” button_border_color__hover_enabled=”off” button_one_border_color__hover_enabled=”off” button_two_border_color__hover_enabled=”off” button_border_radius__hover_enabled=”off” button_one_border_radius__hover_enabled=”off” button_two_border_radius__hover_enabled=”off” button_letter_spacing__hover_enabled=”off” button_one_letter_spacing__hover_enabled=”off” button_two_letter_spacing__hover_enabled=”off” button_bg_color__hover_enabled=”off” button_one_bg_color__hover_enabled=”off” button_two_bg_color__hover_enabled=”off”]Please let me know in comments if I can update something or if I got something incorrect. I am really hoping to make this page useful and keep it relevant.
[/et_pb_cta][/et_pb_column][/et_pb_row][/et_pb_section]

0 0 votes
Article Rating
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Inline Feedbacks
View all comments
0
Would love your thoughts, please comment.x
()
x
Scroll to Top