As an experiment, I
- did a fresh install of Node-RED
- moved my existing
$HOME/.node-red
directory aside - started Node-RED
- copied the flow at the bottom of the Creating your first flow tutorial
- imported the flow in Node-RED
- deployed
When I then clicked on the button of the inject node, the debug view shows "Invalid Date" as message payload.
On a whim (having read about similar fixes), I double-clicked the function node and clicked 'DONE' (without making any changes in the code editor) and deployed again: still the same result, "Invalid Date".
Next, I double-clicked the inject node and clicked 'DONE' (again without making any changes) and deployed again: succes! Now I get the full textual date as debug output:
Later, it occurred to me I could add another debug node and wire it directly to the inject node to see what message payload it was outputting:
The inject node in the mported flow appeared to output a message with an empty string as payload, not a timestamp.
After 'fixing' the inject node, it appeared to output a timestamp as expected.
My setup:
OS: Void Linux (x86_64, rolling release)
Node-RED version: v2.0.6 (installed using npm install -g node-red
)
Some questions:
- Could this issue be caused by the flow that I copied and imported being for an older version of Node-RED?
- I seem to have 'fixed' it by editing some node properties without actually changing anything, wouldn't it be nice if this could be automated somehow?
EDIT: Added a screenshot showing the payload output by the imported, un'fixed' inject node