Outputting file changes using a tail node

You can monitor files for changes. Whenever a monitored file changes, a message containing the changes is injected into the flow.

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 tail node from the storage category to the workspace.
  3. Double-click the tail node to open the Edit tail 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 path to the file that you want to monitor.
  6. In the drop-down list File type, select whether you want to monitor a text file or a binary file.
  7. NOTICE

    notice

    The output of a tail node depends on the type of file. Changes to a text file are output as strings. Changes to a binary file are output as buffer objects.

  8. If you are monitoring a text file and want to replace \n by line breaks in the output , select the check box Split lines on \n?.
  9. Click Done to apply your changes.
  10. Add more nodes to the workspace and connect them to a flow with the tail node being the first node.