Repository: NotoriousBDG Add-Ons (Node-RED, HA Bridge, and Gogs)

I’ve added support for enabling the new Projects feature in the Node-RED addon options. It’s disabled by default, but can be enabled by setting projects to true in the addon options.

On a related note, the Projects feature works well with the Gogs addon in my repository if you want to use a local Git repository.

Hey there

I am new to Home assistant and node red.
Got problems with the addon for Home Assistant.

I have installed it over the node red web interface. But i dont get any nodes.
they are just grey.

It’s hard to tell based on your description. Can you post a screenshot showing what’s greyed out?

This has been discussed in the node-red-home-contrib-home-assistant repo (https://github.com/AYapejian/node-red-contrib-home-assistant/issues/38) as well. It seems that the newest release (0.3.0) uses ES features only available in nodejs 8.x (latest LTS). Since this addon is still using nodejs 6.11 is breaks the palette.

I’m guessing this addon is using the node-red-docker? It looks like they are currently considering moving to node 8 (https://github.com/node-red/node-red-docker/issues/62).

Yes, the addon is based on the official nodered/node-red-docker image. As a workaround to this issue, I’ve updated the addon so it upgrades node when building the image. It seems to be working ok on my system now.

I just committed another change to the Node-RED addon which allows access to serial devices in Node-RED as requested by @cameron in Node-red-contrib-rfxcom on Hassio.

I’ve been using the Node-red add-on for awhile now and it’s been great.

Just wondering what the best way is to keep regular backups of your flows?

Cheers.

1 Like

I’ve been using Hassio 0.61 Snapshot Service - #3 by NotoriousBDG for a while now. Now that Node-RED 0.18.x supports projects, I’m also using a project linked with a repo in my Gogs addon to provide version control.

Thanks. Will check them out.

My Node-RED add-on on tends to stop every now and then. I’m running the latest version. Does anyone else have this issue? I can’t rely on my Node-red automations.

I’m considering adding an automation to restart Node-RED regularly to get around this.

Mine has been pretty stable. Can you check logs at http://hassio.local:8123/hassio/addon/27e642c6_nodered?

I cant get the payload to set values like msg.payload.service = switch
i can set msg.service = switch
anyone know what im doing wrong?

function:

msg.payload.domain = "switch";
msg.payload.service = "toggle";
msg.payload.data = { "entity_id":"switch.stue_spisebord" };
return msg;

get this: test : msg.payload.domain : undefined

Mine has been pretty stable. Can you check logs at http://hassio.local:8123/hassio/addon/27e642c6_nodered5?

The error that was causing mine to crash all the time is

TypeError: Cannot read property 'state' of null node-red homeassistant

This error was a known bug in an older version. You may want to hit the rebuild button in the HassIO addons page. It will take awhile, but should update everything to a stable version that doesn’t crash. Mine has been rock solid for a good month or so but that is the error I used to get all the time.

Getting this when trying to install the node-red addon

18-03-07 17:43:26 INFO (MainThread) [hassio.addons.addon] Create Home-Assistant addon data folder /data/addons/data/27e642c6_nodered
18-03-07 17:43:26 INFO (SyncWorker_10) [hassio.docker.addon] Start build 27e642c6/armhf-addon-nodered:0.1.10
18-03-07 17:43:29 ERROR (SyncWorker_10) [hassio.docker.addon] Can't build 27e642c6/armhf-addon-nodered:0.1.10: failed to register layer: open /var/lib/docker/aufs/layers/93391cc4d5ff221db4772c35d9c34acf57ab188883e0810e1605dc9822c3eca6: no such file or directory

Anything I should be looking for?

Edit: In Hassio with Host OS 1.2 it installed fine. Seems to be when installing on Host 1.3

I’m using the Node-RED add-on and want to use the rpi-keyboard node but it’s not detecting my keyboard.

The keyboard it correctly getting detected by the host system and showing up when I run

➜  ~ hassio host hardware
{
"result": "ok",
"data": {
    "serial": [
        "/dev/ttyAMA0"
    ],
    "input": [
        "Logitech M325"
    ],
    "disk": [],
    "gpio": [
        "gpiochip0",
        "gpiochip100"
    ],
    "audio": {
        "0": {
            "name": "bcm2835 - bcm2835 ALSA",
            "type": "ALSA",
            "devices": {
                "0": "digital audio playback",
                "1": "digital audio playback"
            }
        }
    }
}
}

I think something needs to be added to the config.json so it gets passed through the the docker container but nothing there mentions how to do that with input devices.

Thanks

I just tested this on a PI with host OS 1.3 and it built fine. Perhaps there is an issue with your sdcard or maybe it’s full?

You’ll need to add something like this to config.json:

  "devices": [
    "/dev/blah:/dev/blah:rwm"
  ],

There is no way to expose that in the UI. It’s not something that I can do in the addon because the addon will fail to start if that device doesn’t exist. You’ll have to create your own local copy of the addon with the modifications.

I have a very similar (or the same) problem.

10 Mar 21:44:04 - [red] Uncaught Exception:
10 Mar 21:44:04 - TypeError: Cannot read property 'state' of null
    at ServerStateChangedNode.onHaEventsStateChanged (/share/node-red/node_modules/node-red-contrib-home-assistant/nodes/server-events-state-changed/server-events-state-changed.js:38:42)
    at HaEvents.emit (events.js:132:15)
    at HaEvents.onClientMessage (/share/node-red/node_modules/node-home-assistant/lib/ha-events.js:59:22)
    at EventSource.client.on (/share/node-red/node_modules/node-home-assistant/lib/ha-events.js:27:49)
    at EventSource.emit (events.js:127:13)
    at _emit (/share/node-red/node_modules/eventsource/lib/eventsource.js:222:17)
    at parseEventStreamLine (/share/node-red/node_modules/eventsource/lib/eventsource.js:237:9)
    at IncomingMessage.<anonymous> (/share/node-red/node_modules/eventsource/lib/eventsource.js:200:11)
    at IncomingMessage.emit (events.js:127:13)
    at addChunk (_stream_readable.js:269:12)

The problem has been reported to node-red-contrib-home-assistant here: https://github.com/AYapejian/node-red-contrib-home-assistant/issues/44.

event.new_state seems to be null.

I’m not sure where to fix this problem. (In home assisant, the hass.io add-on or the node red module).

Hi Am trying to install node-red on Homeassistant and have been unsuccessful.
Installing on a Raspberry P3
HA Version 0.65.5
I have added the repository,
Clicked on install Link
It spins as if it is installing
The Installer link turns “Red” and then nothing changes.
Any assistance or direction will be greatly appreciated.

I got it to install by clearing the cache.
I have change SSL to true
clicked on the “open web ui” link…This site can’t be reached
I tried the IP address with port 1880… no change.
Once again any assistance will be greatly appreciated.