Home Assistant Community

Community Hass.io Add-on: Node-RED

hassio-repository
hassio-addon
Tags: #<Tag:0x00007fcf4d9c0760> #<Tag:0x00007fcf4d9c05d0>
#326

I’m certain at this point I can use any hassio version I want. I think I upgraded a week hassio or so ago.
Where does the hassio version even show up? I dont’ remember :slight_smile:

I have no idea why, but when they were are the same pi there was something causing the communication problem that goes away when you put node red on a different pi.

#327

OK, I upgraded tonight to the latest verion, 77.3, and connection is fine, no problems upgrading at all. I had been running 76.2, which probably would have caused me problems if running NR through hassio.

There must be a connection difference. I connect through http, and with hassio I have no idea how it is connecting.

BTW, for “kicks”, I stopped NR on the pi, and reinstalled hassio NR and tried that. Started it, but it complained about passwords and certs. It did come up, and the HA nodes said connected, but they didn’t act like they were connected, no response. And everything is much slower running like this. I tried to delete and make a HA node again, but it crashed my pi when I deployed this. I restarted the PI, HA and NR, but couldn’t get NR to talk to HA even though I didn’t get any connection error messages.

After about an hour of “fun”, I gave up. Restarted HA and uninstalled NR from HA, then restarted NR in the other pi. Everything works again, back to normal.

With that, I will stop talking about using another pi for NR, the horse is dead.

Randy

#328

I ran in to an issue with connecting and I cannot find anything on this issue. Sounds similar with NR 0.6.1 with Supervisor 130 and HA 0.77.3. Well two things. First, I can longer resolve the api.pwnedpasswords.com which isn’t the end of the world but it seems strange. I have pihole running but it wouldn’t block that site, I whitelisted it anyway and still exists. That is probably something I can figure out though but if have suggestions I’d appreciate it.

Second, I can’t get NR running at all. I have all of my user/passwords and even a different one for each in the configuration. The error really doesn’t seem obvious like others I’ve seen. Hopefully someone else can see something familiar.

curl: (6) Could not resolve host: api.pwnedpasswords.com
DEBUG:
000
ERROR: Something went wrong contacting the HIBP API
WARNING: Could not check password, assuming it is safe.
[cont-init.d] 10-requirements.sh: exited 0.
[cont-init.d] 11-warning.sh: executing…
[cont-init.d] 11-warning.sh: exited 0.
[cont-init.d] 20-config.sh: executing…
[cont-init.d] 20-config.sh: exited 0.
[cont-init.d] 30-auto-api-token.sh: executing…
parse error: Unfinished string at EOF at line 1, column 24576
[cont-init.d] 30-auto-api-token.sh: exited 4.
[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.

The first line is the reference to failing the pwned checks. At “Oops!” I can’t figure out what the error is at all. API Token related maybe? Thanks for any help or ideas.

#329

Regarding the “Could not resolve host:”, that’s a known ‘issue’. Do you happen to have set that dns server on your router?
Other add-ons can’t use the Pi-hole add-on as dns server. You’ll need to set a different dns server on your Hass.io install.
Info on how to do it can be found here: https://github.com/home-assistant/hassos/blob/master/Documentation/network.md

It could be fixed by going into the PiHole Settings - - > DNS tab and select "Listen on all interfaces, permit all origins. Not tested it myself so might not work.

#330

That makes perfect sense now. That issue resolved. The 30-auto-api-token.sh parse error is the only issue. Is this the best place to post for assistance on this issue?

#331

Guys, when you are getting this problem with “password redacted” its properly because you are using the inbuild git projects that node-red haves, you need to disable that, because it breaks the API handling, so go to your Node-RED settings.js file and change the following settings, last in the file from:

editorTheme: {
       projects: {
           enabled: **true**
       }
   },

to

  editorTheme: {
       projects: {
           enabled: **false**
       }
   },

as im running hassio as generic installed, my file was located following path, i think you RPI guys can find it with the samba share

/usr/share/hassio/homeassistant/node-red/settings.json

1 Like
How to recall existing flows
#332

Fixed your code blocks :wink:

For normal users the file is in /config/node-red/setting.json.

When using the Node-RED git/project features, the add-on won’t be able to update the API token.
So disabling that feature, will indeed allow the add-on to work.

So in short, if someone is having connection issues, ensure the following:

  • Node-RED must have 1 server connection configured.
  • Node-RED must use http://hassio/homeassistant as the url.
  • Node-RED must not use the projects/git feature.

If you did need to make any changes because of the list above, be sure to deploy your workflow and to restart the add-on after making those changes.

:information_source: The projects/git feature will return soon.

4 Likes
Can't connect to ha
#333

Checked my hass.io setting.json but this the property was already set to false ?

#334

Please read my post:

1 Like
#335

Hi. Some time ago my nodered addon is giving me api errors when I restart home assistant. It works ok when I restart addon. Is there any way to automate the process , so when nodered hangs on error homeassistant would restart addon??

Thank You.

#336

This may help.

#337

It doesn’t help :pensive:

#338

First of all, @frenck thank you so much for this addon. This is great!

But, I have a problem that I need to restart Node-RED every time after Home Assistant have been restarted. The log under Node-RED only shows messages from previous restart. And yes, I have reloaded Chrome and I have also tried with Microsoft Edge. Cannot find anything in logfiles pointing to this problem. Any advice?

My system: HassOS 1.10, HA 0.78.3, Supervisor 131, Node-RED 0.6.1, RPi3, New Auth (with legacy_api_password support)

#339

Confirmed. I have watch dog also implemented, but it doesn’t work as it’s logic is based on HA going from working to unknown.

This works if for some reason node-red fails while HA is up, but when HA is rebooted, node red “starts” in HA as an unknown state (post HA restart).

I added a hassio.addon.restart automation that runs 1 minute after HA starts to work around this issue.

2 Likes
#340

That’s good idea to restart addon after HA boot. I will do that. Thanks!

#341

:tada: Release v0.7.0

Full Changelog

Added

  • Adds Hassio API role to configuration

Fixed

  • Fixes typo in README

Changed

  • Updates node-red-contrib-bigtimer to version 2.0.2 (#26)
  • Upgrades node-red to version 0.19.4 (#31)
  • Updates node-red-contrib-moment to version 3.0.0 (#35)
  • Updates node-red-node-random to version 0.1.2 (#37)
  • Upgrades base image to v2.3.0

Questions? Join our Discord server! https://discord.me/hassioaddons
Enjoying my add-ons? Consider supporting my work: https://patreon.com/frenck

4 Likes
#342

What is exactly “Adds Hassio API role to configuration” ?

#343

Upcoming releases of the Hassio Supervisor (more known as just Hass.io) will add a new role-based security layer. Add-ons will be required to have a requested access level in the add-on metadata. This change prepares the add-on for that change.

1 Like
#344

I set up the node-red watchdog automations described in this video. (It’s been linked here before)

it’s helped me. Might try it out. but if you’re having to restart node-red every time, might be something else going on.

the only variation I added was to make the Home Assistant automation repeat every 5 minutes where the condition is that the node-red sensor is ‘unknown’. I was having issues where node-red would be disconnected from Hass.io after a Hass.io update, requiring node-red restart or at least going in and republishing the flows. For some reason the automation as written from the video wouldn’t catch it every time until I forced it to recheck the sensor.

- id: '1534662494492'
  alias: Restart NodeRed Watchdog
  trigger:
  - entity_id: sensor.node_red
    from: OK
    platform: state
    to: unknown
  - minutes: /5
    platform: time
    seconds: 0
  condition:
  - condition: state
    entity_id: sensor.node_red
    state: unknown
  action:
  - data:
      addon: a0d7b954_nodered
    service: hassio.addon_restart
#345

I had the same issue as you described.
I fixed it by editing the yaml and adding single quotes to the states.

from: ‘OK’ etc.

For some reason the automation dialog doesn’t add them to strings…