Hi all. I’ve been running Node-Red for about 2 months, but in the past few weeks it keeps failing, requiring me to restart it from HassIO. It will then run for another day / few hours before failing again.
My setup is this:
HassIO running on Raspberry Pi3
DuckDNS running with LetsEncrypt
Dnsmasq to make requests to my DuckDNS url to resolve to the local IP of my Pi3
As I type this, it’s currently in the ‘failed’ state, where none of my home automations are working. If I go in to Node-RED web interface, the HA nodes still say connected. And from looking at the log, it is still connected to HA in some way because it is triggering events, but for some reason, is unable to act on them. Here is the most recent log which was detecting movement on my hallway sensor, and trying to turn on a scene:
8 Oct 13:00:06 - [warn] [api-call-service:Upstairs Hallway Lights On (Bright)] Error calling service, home assistant api error 8 Oct 13:00:06 - [error] [api-call-service:Upstairs Hallway Lights On (Bright)] Error calling service, home assistant api error
I’ve just clicked Restart, and suddenly, everything is working again. At least for a few hours. Given that this is not a constant issue i.e. it is still connected to Home Assistant, and does work some of the time, I’m not sure how to debug this. Any ideas?
This is known issue with the node that comes with the addon “node-red-contrib-home-assistant”.
I would suggest trying the fork “node-red-contrib-home-assistant-websocket”
I’ve installed the package “node-red-contrib-home-assistant-websocket”, but I can’t seem to disable the default one. How do I make sure I’m using the new nodes instead?
I never was able to uninstall the default HA node. Instead I exported all of my flows unistalled Node-Red and used the https://github.com/notoriousbdg/hassio-addons version which allows you to choose which node you want to use.
I’m using node-red-contrib-home-assistant-websocket and I also had this issue happen twice in a month. Node-RED continues to be able to call services on HA, but does not react to events from HA. Probably some websocket issue.
It always happen after rebooting HA a few times.
Usually this happens if you restart HA a lot OR if you are flooding the websocket connection using nodes like “events:all” and such. How many flows/nodes are you using in NR to HA?