Likely new user error, but I haven't yet been able to find an answer yet. I used the recommended install script on a Rasberry Pi 4 and I have had no luck creating the a file with the "write file" node.
I have tried /home/XXX/event.log, ~/event.log, event.log
to no avail.
In each case I have done a full filesystem search for event.log with no results. I can see that data is coming into the node with the debug
If found that if I put a debug node after the write-file node, nothing is logged, if I "fork" the input to both the write to file and to a separate debug node, the parallel debug not logs but not the one following the write-file node.
I have several questions:
Any ideas why this isn't working?
Is there any logging were I could see a "node failed" info/error message? It can find a log with journalctl -u nodered.service but don't see any pertinent info to a failing node process.
Along these lines, maybe there is a pointer to a good set of debug strategies?
I am logging outputs from my hubitat. This is a temporary step as I am want to setup a logging database and I am trying to get a feel for all message types that my system will be generating, so I am planning to dump for ~24 hours then find all unique message types. I am doing some work on the house soon and I would like to, for example see how it impact the cycle rate of my HVAC system.
Presumably you are looking for event.log on the Pi not on the browser machine.
Since you say you installed with the standard script, I don't see any explanation for seeing neither the debug output nor an error message.
Try restarting Node-red, rebooting the Pi, clearing the browser cache and finally reinstalling Node-red.
If you have already done a lot of work, take a backup first, though the install script does not usually result in lost data.
Ok, so I found the problem(s). (After trying all your steps of course, but they were easy and nothing was lost)
All new user errors.
1: apparently Debug 1 was complete message and Debug 3 was msg.payload
2: The hubitat connection messages don't seem to contain a payload!
The debug that cracked the nut for me was "let's try the stupidest possible chain"
inject timestamp -> write -> debug
And of course this worked immediately, and I then noticed that the debug output there explicitly contained "payload" which was missing from the other debug outputs.
Thank you for your help. Could you point me to how to move the object from the "websocket in" into a msg.payload?
Also I recommend watching this playlist: Node-RED Essentials. The videos are done by the developers of node-red. They're nice & short and to the point. You will understand a whole lot more in about 1 hour. A small investment for a lot of gain.
Thanks, I think it's a good time to re-watch those videos. I suspect a lot of the issues I ran into were in the tutorials but I didn't quite internalize the implications and how they would impact flows. I'm still building my mental model of the system. I appreciate all the pointers and help trying to figure out these kind of beginner issues!