- Update all submodule URLs from gitea.centraal.wbd-rd.nl to gitea.wbd-rd.nl - Add settler as proper submodule in .gitmodules - Add agent skills, function anchors, decisions, and improvements - Add Docker configuration and scripts - Add manuals and third_party docs - Update .gitignore with secrets and build artifacts - Remove stale .tgz build artifact Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1006 B
1006 B
Node-RED Function Node Patterns (EVOLV Summary)
Based on: https://nodered.org/docs/user-guide/writing-functions
Return Semantics
return msg;sends to output 1.return [msg1, msg2, ...];sends one message per output position.- Use
nullfor outputs that should not emit.
Examples:
return [msg, null, null];-> output 1 onlyreturn [null, msg, null];-> output 2 only
Message Mutation Pattern
- Start with the incoming
msg, set fields (msg.topic,msg.payload), then return/send. - This preserves message context unless there is a deliberate reason to create a new object.
Async Function Pattern
- For asynchronous work, call
node.send(...)and thennode.done(). - Avoid returning a message when output is sent asynchronously.
EVOLV Practical Rule
- In example flows (including parsers), always align return-array position with downstream wiring.
- For dashboard parser functions, keep one stable output mapping per metric to avoid wire-level regressions.