New Node-RED add-on

Note: This add-on is deprecated. Please see the README for migration instructions.

I’ve created a new Node-RED add-on!

You may ask, why another one when there’s already an existing add-on? I’ve been using @NotoriousBDG’s add-on for a while and it works great, but I decided to create another one for the following reasons:

  • Image size: 94MB vs 590MB
  • This add-on is based directly on the homeassistant/{arch}-base:latest image instead of ubuntu
  • This add-on has pre-built images on Docker Hub so a local build won’t be necessary
  • This add-on comes with the Home Assistant nodes installed by default

I hope someone finds it useful, and thanks to @frenk for some help along the way!

10 Likes

Great initiative! I’m getting this error on first start:

starting version 3.2.4
created default settings
cp: can't stat '/usr/lib/node_modules/node-red/settings.js': No such file or directory

And the addon stops. Any idea?

Arg! That was an oversight because of some changes to fix build issues. I’ve pushed a new version (1.2) that should fix that. Let me know if the new version doesn’t work. Thanks!

Works! Thanks!

My addon is working great, but when I restart HASSIO it come back up as stopped

This is a common issue, regardless of the HassIO addon you use. Its related to the Home Assistant module inside of Node Red. Node Red basically crashes as soon as Home Assistant comes online. You can try an automation to restart it. I use the following to restart it once Z Wave is ready. Others have used a Home Assistant ready status instead:

 - alias: Z-Wave network is ready
   trigger:
     platform: event
     event_type: zwave.network_ready
   action:
     - service: hassio.addon_start
       data:
         addon: '27e642c6_nodered'

You can get the addon title from the url while on the addon page within HassIO. I was only able to get this working with the NotoriousBDG addon though. For some reason it didn’t like the address for this addon.

1 Like

As @gregg098 said, this is a known issue. Thus far, I’ve been unable to replicate it with my config, but I’ve got some data from others and once I get some time, I’m going to see if I can fix it, either in my add-on or on the Node-RED module itself.

If you can add any useful info to this issue, that would be great!

@gregg098, the correct address for this add-on should be f16403dc_node-red. If that isn’t working for you, please let me know.

Hello @korylprince,

Recently I started playing and discovering Node-Red and it’s awesome! Thank you for developing the Add-on I haven’t tried @NotoriousBDG version.

Anyways to the point, I noticed Home-Assistant node has a available update and some other Nodes I have installed, but when I try to Update them this msg pops-up:

An update for this node is available, but it is not installed in a location that the palette manager can update.

Please refer to the documentation for how to update this node.

Thank you very much for your add-on @korylprince!

I really like to be able to use Node-RED with the smaller footprint and without having it to build locally :+1:

I’ve noticed this warning in the log when starting the add-on:

[warn] Cannot find Pi RPi.GPIO python library
[warn] ------------------------------------------------------
[warn] [rpi-gpio] Warning : Cannot find Pi RPi.GPIO python library
[warn] ------------------------------------------------------

Is this a common warning or is it tied to my installation? I’ve used Notorious’ add-on before, but did a “clean install” (removing his add-on and deleting share\node-red) before starting your version for the first time. I did transfer my old flow (using the clipboard function) though but I’m not using any RPI.GPIO related nodes in my flow.

Like @Sthope I’ve noticed some outdated node versions but as long as Node-RED can’t update used nodes while running it looks like we are dependent on you updating the nodes within the docker image, right?

Thanks again for sharing your add-ons :sunglasses:

Hi,
This add-on and its packages could use some tcl.
Like @Florian I also experience the “cannot find Pi RPi.GPIO” error,
Node-Red itself is at 0.18.8 now,
node-red-contrib-home-assistant is at 0.2.1

I’ve just pushed version 1.4 which adds the RPi GPIO libraries and allows you to update the node-red-contrib-home-assistant module.

It allows for this by moving the installation of the module to /share/node-red/node_modules. You shouldn’t need to do anything other than update the add-on and restart it.

For all of the changes, check out the changelog.

Please let me know if you have any issues with the update.

1 Like

The update works as expected. Thank you for your fast response :slight_smile:

I can’t seem to get this addon started. It installs, but when I click start the start button gets red and nothing happens. Nothing in the logs, I just see “Error grabbing logs: EOF”…

any clue what goes wrong here? I never ran the NotoriousBDG version

update: Just checked the hassio logs and I get this error:
18-02-04 10:09:45 ERROR (SyncWorker_4) [hassio.docker] Can’t start addon_f16403dc_node-red: 500 Server Error: Internal Server Error (“error while creating mount source path ‘/sys/devices/platform/soc’: mkdir /sys/devices/platform/soc: operation not permitted”)

This sounds like an issue with the Hassio supervisor. You’re not running on a Pi, are you? I’m using the GPIO option with my add-on and I think that’s the cause. Can you verify you’re on the latest version of the supervisor (0.85 currently.)

I am not running on a pi no.
supervisor is 0.85

I am experiencing the same problem. I am also not running hass.io on a Pi and supervisor is in version 0.85.

Sorry about this guys. I should have tested this better before releasing 1.4.

I’ve reverted the GPIO addition and pushed version 1.5. Please let me know if you have issues with it. I’ll create an issue on the supervisor so hopefully we can get this fixed so I can add it back.

Any idea what may be going on here? After I install, I set up a quick test automation to call a service to turn off a switch. I add the Home Assistant server information and all seems well. It populates the dropdown menus with my devices/services. (connecting through SSL)

However, as soon as I try to run the automation, it fails and then it can no longer connect to the server. All I get from here is: Cannot GET /homeassistant/services

Restarting the addon and HA don’t have any effect, and I don’t see any errors in the logs to indicate what the problem may be. Any ideas?

@HeffeD it seems like your issues are because you’re using SSL. See this thread on reddit where several other people are having the same issues.

Can you verify the SSL certificate you’re using is legit (i.e. from LetsEncrypt) and that the hostname you’re using in Node-RED matches the hostname for the certificate?

Short-term, I suggest you disable SSL on Home Assistant itself, and use http:// for the Node-RED connection. It’s really not needed between Home Assistant and the add-on because those packets never leave the device. You can use another add-on (like my Caddy add-on) to do an SSL Proxy for Home Assistant.

Long-term, please create an issue on the add-on Github page, and I can investigate this as I get time.

With the help of some posters on Reddit I did get both Node-Red and HA running through SSL, see here for details:

I am using the other Node-Red addon but hopefully it should be a similar process.

1 Like