I’ve just started using node red and I can already see some definite advantages to using it. I successfully converted several of my previous yaml automations to node red. But I had one issue that caused concern. I had a mis-configured node red flow that was arming my alarm system to away while we slept. Tracking it down in the logbook was a little tricky because it doesn’t look like node red reports to the logbook. I eventually found out what the issue was and fixed it but that raises the question.
For those of you that are using node red, are any of you using it exclusively for your automations?
When deploying a new one, I usually insert a few notification nodes (Telegram mostly, in a specific channel) that help me track when the flow is triggered, what the output is and so on …
Once the flow is stable, I delete some or all the notifictations and move the remaining one to my main channel.
You can obtain pretty good results with that method in my opinion.
This is what I’ve been doing with the debug and insert nodes. So much better than yaml. But using notification nodes is a good idea too.
Blockquote
Because Node-Red and Home Assistant are 2 separate applications. You should be using the DEBUG node in Node-Red to troubleshoot Node-Red.
Debug is real time. What about history? The issue I had was the alarm was arming while I was asleep so I had to use the logbook to track down the issue. The log shows if an automation was run (in yaml) but it doesn’t show if a node red flow was run. From what I can tell there is no historical data in node red except the time stamps that appear under some of the nodes.
I understand that it’s separate from HA and wasn’t expecting it to appear in the logs. Just stating the fact that I can’t look for node red data there like the HA automations. Thats a useful troubleshooting tool.
A database or the system log sounds promising. Do you mean collecting data in a database or system log that is external to HA or Node Red?
Congrats. Now you can enjoy tweaking them with no restarts.
I suppose that depends how much you have it doing. I was bought a couple of RPI’s for xmas and had seen the odd delay so decided to split out across the 2
I know there’s a lot of people who have NUC’s but I wanted to keep the power consumption low and keep the simplicity of HASSIO install.
It’s easy enough migrate so I wouldn’t bother investing in more hardware unless you know your going to get performance issues. Im very happy with my setup but it’s certainly worth considering a NUC given the number of people who seem to be using them.
The inject and debug nodes are probably the biggest reason to switch over to node red. Giving you the ability to tweak and test repeatedly without system restarts.
Not a bad idea. But ideally I would like to have them in the logbook so I can follow the sequence of events all in one linear log. But MQTT may be another avenue if this doesn’t work.
They run mostly asynchronous, so there’s not much reason to log them together.
When I am debugging a flow. I sometimes make my own log file using the file node.
[{"id":"996a6cc6.45073","type":"inject","z":"5eb3594f.d294b8","name":"","topic":"","payload":"","payloadType":"date","repeat":"","crontab":"","once":false,"onceDelay":0.1,"x":780,"y":1712,"wires":[["3e231ef5.6446d2"]]},{"id":"3e231ef5.6446d2","type":"api-call-service","z":"5eb3594f.d294b8","name":"","server":"ef067c6f.620e6","service_domain":"logbook","service":"log","data":"{\"name\":\"Kitchen\",\"message\":\"is being used\",\"entity_id\":\"light.kitchen\",\"domain\":\"light\"}","mergecontext":"","output_location":"","output_location_type":"none","x":956,"y":1712,"wires":[[]]}]