Community Hass.io Add-on: Node-RED

Tags: #<Tag:0x00007fa740fcd638> #<Tag:0x00007fa740fcd480>

This add-on is provided by the Community Hass.io Add-ons project.

GitHub Release GitLab CI Project Stage Project Maintenance

Supports armhf Architecture Supports armv7 Architecture Supports aarch64 Architecture Supports amd64 Architecture Supports i386 Architecture

About


Flow-based programming for the Internet of Things.

Node-RED is a programming tool for wiring together hardware devices, APIs and online services in new and interesting ways.

It provides a browser-based editor that makes it easy to wire together flows using the wide range of nodes in the palette that can be deployed to its runtime in a single click.

Installation


The installation of this add-on is pretty straightforward and not different in comparison to installing any other Hass.io add-on.

  1. Add our Hass.io add-ons repository to your Hass.io instance.
    Add the following URL: https://github.com/hassio-addons/repository
  2. Set a credential_secret, which is used to encrypt sensitive data.
    This is just a “password”, which you should save on a secondary location.
  3. If you do NOT use SSL, be sure to set the ssl option to false.
  4. Start the “Node-RED” add-on.
  5. Check the logs of “Node-RED” to see if everything went well.
  6. Log in with your Home Assistant username/password.
  7. The add-on works straight out the box! No need to configure a server!

Note: The add-on is pre-configured out of the box! There is no need
to add/change/update the server connection settings!

Support


You can always try to get support from the community here at the Home Assistant community forums, join the conversation!

Questions? You have several options to get them answered:

You could also open an issue on GitHub, in case you ran into a bug, or maybe you have an idea on improving the addon:

:information_source: At this moment our Community Hass.io Add-ons Discord chat server and GitHub are our only official support channels. All others rely on community effort.

Repository on GitHub


Looking for more add-ons?


The primary goal of our add-ons project is to provide you (as an Hassio / Home Assistant user) with additional, high quality, add-ons that allow you to take your automated home to the next level.

Check out some of our other add-ons in our Community Hass.io Add-ons project.

7 Likes

About the author of this add-on

Hi there!

I am Franck Nijhof, and I have 30 years of programming experience, in many languages. I am using this experience to work on the Home Assistant project by giving back my knowledge and time to the open source community.

The add-on you are currently looking at right now was developed/packaged by me. It is not the only add-on I have created; there are many many more :wink:

However, I have a problem… I am an addict. A :coffee: addict that is. Lucky for you, I turn that C8H10N4O2 (caffeine molecule) into code (and add-ons)!

If you want to show your appreciation, consider buying me a cup of high octane wakey juice by clicking on the “By me a coffee” image below! :heart:

Buy me a coffee

Or, become a Patron and support my work!

Support my work on Patreon

Enjoy your add-on, while I enjoy the brain juice. :coffee:

Thanks for all the :two_hearts:

…/Frenck

Join our Discord server Follow me on Twitter Flollow me on Instragram Follow me on GitHub Follow me on YouTube Follow me on Twitch patreon-icon

P.S.: In case you want to ask me a question: AMA (Ask Me Anything). Most of the time I am online at the Discord chat. (I go by @Frenck in there as well).

Hi,

Thanks for adding yet another addon to the old developer belt. I’m having an issue when trying to start Node-Red for the first time. This is the output from the log:

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] 00-banner.sh: executing... 
-----------------------------------------------------------
 Hass.io Add-on: Node-RED v0.1.1
 Flow-based programming for the Internet of Things
 From: Community Hass.io Add-ons
 By: Franck Nijhof <[email protected]>
-----------------------------------------------------------
[cont-init.d] 00-banner.sh: exited 0.
[cont-init.d] 01-log-level.sh: executing... 
Log level is set to INFO
[cont-init.d] 01-log-level.sh: exited 0.
[cont-init.d] 02-updates.sh: executing... 
INFO: You are running the latest version of this add-on
[cont-init.d] 02-updates.sh: exited 0.
[cont-init.d] 10-requirements.sh: executing... 
FATAL: Setting a credential_secret is REQUIRED!
[cont-init.d] 10-requirements.sh: exited 1.
[cont-finish.d] executing container finish scripts...
[cont-finish.d] 99-message.sh: executing... 
-----------------------------------------------------------
                Oops! Something went wrong.
 
 We are so sorry, but something went terribly wrong when
 starting or running this add-on.
 
 Be sure to check the log above, line by line, for hints.
-----------------------------------------------------------
[cont-finish.d] 99-message.sh: exited 0.
[cont-finish.d] done.
[s6-finish] syncing disks.
[s6-finish] sending all processes the TERM signal.

FATAL: Setting a credential_secret is REQUIRED!

Looks like you have not set a credential secret. Which is required. And is fatal. :grinning:

@derrick1985 Please be sure to follow the installation steps:

1 Like

How is this different from the node red add-on I’ve been using the past couple of months?

1 Like

I’ve had the same question on Reddit and answered it extensively:

3 Likes

Fantastic!!!

Only this warn:
2 Jun 22:26:40 - [warn] Cannot find Pi RPi.GPIO python library
2 Jun 22:26:44 - [warn] ------------------------------------------------------
2 Jun 22:26:44 - [warn] [node-red/rpi-gpio] Warning : Cannot find Pi RPi.GPIO python library

I do see the same errors in my logs as well,

I’ve added a “Known issues and limitations” section to the add-on documentation to address this:

Running this add-on on a Raspberry Pi, will show the following warning: [warn] [node-red/rpi-gpio] Warning : Cannot find Pi RPi.GPIO python library. This warning can be ignored and is caused by the lack of GPIO Pins support, which we are planning to add in future versions of the add-on.

I hope that clarifies the warnings.

2 Likes

I am having some trouble with Node-Red programming. The addon works perfectly, its just my stupidity in trying to make my first flows. I have attached a pic here: https://i.imgur.com/2HI5Njl.png

I think you can see what I am trying to accomplish. Notify and Window Lights On trigger at Sunset just like I want. However, then they keep triggering every few hours throughout the night. Bedroom Lights On never triggers so I guess my 6:30AM node is wrong. Any help would be appreciated.

@frenck If i already have another node red addon installed how do i migrate my configs and settings over to this one.

Looks really interesting but the explanations to get it up and running seems lacking, for example;

“Set a credential_secret, which is used to encrypt sensitive data.”

Where or how is this set? There is no explanation, is it in a file/folder somewhere or in the configuration.YAML file or do you fill it in the config box in the add on details page, if you fill it in there does it save it elsewhere on the install?

Edited as I read the username / password info now. Still like to know about the above

This is an add-on setting, documented here:

(this is an subsection of the add-on configuration options list, a example is provided at the beginning of the chapter).

I’ve got a few issues.

  1. Addon nodes cannot be updated. It shows the error “node not installed locally”
  2. Timer nodes are acting crazy. They are all using minutely output regardless of the setting. I thought it might be an issue with my favorite timer “light-scheduler”, but I switched all my automations to use bigtimer and they had the same issue… minutely output even from the one-off output.

For nodes that are shipped with the add-on, that is correct. Docker containers do not persist between reboots. So updating would be kinda useless. I’m currently putting a release method in place for this, which I expect to ship this week.

That is interesting, could you create an GitHub issue for that? :+1:

I am having some trouble with Node-Red programming. The addon works perfectly, its just my stupidity in trying to make my first flows. I have attached a pic here: https://i.imgur.com/2HI5Njl.png

I think you can see what I am trying to accomplish. Notify and Window Lights On trigger at Sunset just like I want. However, then they keep triggering every few hours throughout the night. Bedroom Lights On never triggers so I guess my 6:30AM node is wrong. Any help would be appreciated.

Hi
[Warning: newbie question ahead]
I already have a node-red instance running independantly on the same raspi as the HA.
Is there any particular benefit of using an addon to a node-red instead of my setup? (besides using the same login credentials)

I’m having trouble with the file nodes, presumably because the add-on runs in a docker container. I can’t read from files that I put onto my Pi’s SD card, nor can I access files created by node red (which also don’t persist across a reboot). Is there any way to grant the add on access to local files on the SD card?

There a couple of paths that persist between reboots.

  • /config
  • /data

Note: I just realized I should add the /share folder as well. It will be in the next release.