Use the tail node to monitor files
masternode-red-node-tail node allows you to tail a specific file and inject its new contents into a Node-RED flow whenever the file is updated.repository·master·Indexed 21 days ago
https://github.com/node-red/node-red-nodesA collection of official and community-contributed nodes for the Node-RED flow-based programming environment. This repository includes documentation for various utility nodes, including sentiment analysis (node-red-node-sentiment, node-red-node-multilang-sentiment), text filtering (node-red-node-badwords), part-of-speech analysis (node-red-node-wordpos), data generation (node-red-node-data-generator), PID control (node-red-node-pidcontrol), random number generation (node-red-node-random), and Report-By-Exception filtering (node-red-node-rbe).
node-red-node-tail node allows you to tail a specific file and inject its new contents into a Node-RED flow whenever the file is updated.Input nodes allow you to execute MongoDB collection methods. The results are returned in msg.payload.
msg.payload as the query statement. You can optionally control the result set using:msg.projection: An object to constrain returned fields.msg.sort: An object for sorting.msg.limit: A number to limit results.msg.skip: A number to skip results.msg.payload.msg.payload as the pipeline array.You can specify the collection name in the node configuration or dynamically via msg.collection. The node configuration takes precedence and will override msg.collection.
The Output node sends an email using the following message properties:
Core Properties:
msg.payload: The email body. Can be HTML. If it is a binary buffer, it will be sent as an attachment.msg.topic: The email subject.msg.to: The recipient (if not configured in the node settings).Additional Routing & Formatting:
msg.cc, msg.bcc, msg.replyTo, msg.inReplyTo, msg.references, msg.headers, msg.priority.msg.from: The sender address. Note: Many services require this to be a valid user ID/email associated with the account.msg.plaintext: Used to provide a plain text version if msg.payload is HTML.Attachments:
msg.filename: The name of the attachment.msg.description: Optional body text for the attachment.msg.attachments: An array of attachments in Nodemailer format.Connection Settings:
STARTTLS extension. Recommended for ports 587 or 25.The Input node fetches emails from an IMAP or POP3 server and forwards them as messages if they haven't been seen before.
Message Properties Emitted:
msg.topic: The email subject.msg.payload: The plain text body of the email.msg.html: The HTML body (if available).msg.from: The sender's email address.msg.date: The email date.msg.header: A complete header object containing properties like to, cc, etc.Authentication Note: Modern authentication via OAuth2.0 is supported but must be triggered by an incoming access token from upstream nodes.
In RBE mode, the node only sends an output if the incoming msg.payload is different from the previous one. This mode works with both numbers and strings and is useful for saving bandwidth by filtering out repeated messages with the same value.
Note that the node operates on a per msg.topic basis, meaning a single RBE node can track and filter multiple topics simultaneously.
The junction node type was introduced in Node-RED 3.0.0. If you need to run flows that contain these junctions on older versions of Node-RED (version 2 or older), you can install the node-red-node-junction module.
This module automatically detects the Node-RED version it is loaded into. It will only register the junction node type if it detects that it is running on Node-RED version 2 or older; on newer versions, it remains inactive to avoid conflicts with the core node.
The Input Node emits sensor readings from the Sense HAT. Data is grouped into three distinct event types, each identified by a specific topic and payload structure.
motionacceleration.x/y/z: Acceleration intensity in Gsgyroscope.x/y/z: Rotational intensity in radians/sorientation.roll/pitch/yaw: Axis angle in degreescompass: North direction in degreesenvironmenttemperature: Degrees Celsiushumidity: Percentage of relative humiditypressure: Millibarsjoystickkey: One of UP, DOWN, LEFT, RIGHT, ENTERstate: 0 (released), 1 (pressed), or 2 (held down)node-red-node-pi-gpio package is not recommended for precise servo timing. If you need to drive servos, use the node-red-node-pi-gpiod node instead, as it provides much more accurate timing.The Unicorn HAT node uses msg.payload and msg.topic to manipulate pixels and independent 'sprites'.
Set msg.payload to a CSV string in the format x,y,r,g,b.
x and y can be a single pixel (0 to 7), a range (e.g., 2-5), or * for a whole line.x1,y1,r1,g1,b1,x2,y2,r2,g2,b2,....A 'sprite' is a group of pixels that can be moved independently of the background.
msg.topic to name the sprite.msg.payload to 0 for the sprite identified by msg.topic.msg.payload to DEL (leaves the background intact).msg.payload to CLS to turn off the display and delete all sprites.# Example pixel payload: x,y,r,g,b
"0,0,255,0,0"
# Example multiple pixel payload
"0,0,255,0,0,1,1,0,255,0"The Input Node emits sensor readings grouped into three event types. Note that Motion events are currently not supported by the simulator.
Sent at approximately 1 per second. msg.topic is set to environment.
Payload object keys:
temperature: degrees Celsiushumidity: percentage of relative humiditypressure: MillibarsSent when the joystick is interacted with. msg.topic is set to joystick.
Payload object keys:
key: UP, DOWN, LEFT, RIGHT, or ENTERstate: 0 (released), 1 (pressed), or 2 (held down)Deadband and Narrowband modes are used to filter numeric data based on a specified threshold (band gap). The incoming msg.payload must be a number or a parseable string (e.g., "18.4 C" or "$500").
You can choose how the node compares the current value to previous values:
The band gap can be defined in two ways:
100 and the deadband is set to 10%, the next value must be at least 110 to pass. The subsequent value must then be at least 121 (110 + 10%) to pass.