Writing to a file using a file node

You can append data to a file, overwrite a file or delete a file.

When using u-control automation controllers, please also observe the manual u-control automation controller.

  1. You must insert a memory card into the controller.
  1. Open Node-RED.
  2. Add a file node from the storage category to the workspace.
  3. Double-click the file node to open the Edit file node dialogue.
  4. NOTICE

    notice

    All files are stored on a memory card. The memory card is accessible at the file path /run/media/mmcblk0p1/.

  5. In the text box Filename, specify the file you want to write to.
  6. In the drop-down list Action, select the writing operation. Choose from:
  7. append to file: The payload of the received message is appended to the end of the file (useful for logging).
  8. overwrite file: The data in the file is overwritten with the payload of the received message (useful for binary data e. g. images)
  9. delete file: The file is deleted whenever the node receives a message
  10. If you want to add a newline character after each message, select the checkbox Add newline (\n) to each payload?.
  11. If you want to write to a directory that does not yet exist, select the checkbox Create directory if it doesn't exist?.
  12. Click Done to apply your changes.
  13. Connect the file node to the node whose messages trigger the writing operation.