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