Node-RED Cookbook
This is a collection of recipes for how to use Node-RED to solve many common programming tasks.
Each recipe addresses a specific problem and shows by example how it can be solved using the capabilities of the platform.
If you’re interested in contributing to the cookbook you are more than welcome. Join the
#docs
channel on slack and get involved.Table of Contents
Messages
- Set a message property to a fixed value
- Delete a message property
- Move a message property
- Map a property between different numeric ranges
Flow control
- Trigger a flow whenever Node-RED starts
- Trigger a flow at regular intervals
- Trigger a flow at a specific time
- Route a message based on one of its properties
- Route a message based on a context value
- Perform an operation on each element in an array
- Trigger a flow if a message isn’t received after a defined time
- Send placeholder messages when a stream stops sending
- Slow down messages passing through a flow
- Handle messages at a regular rate
- Drop messages that have not changed value
- Create a single message from separate streams of messages
Error handling
Working with data formats
- Convert to/from JSON
- Convert to/from XML
- Convert to/from YAML
- Generate CSV output
- Parse CSV input
- Extracting data from an HTML page
- Split text into one message per line
HTTP endpoints
- Create an HTTP Endpoint
- Handle query parameters passed to an HTTP endpoint
- Handle url parameters in an HTTP endpoint
- Access HTTP request headers
- Include data captured in another flow
- Serve JSON content
- Serve a local file
- Post raw data to a flow
- Post form data to a flow
- Post JSON data to a flow
- Work with cookies
HTTP requests
- Simple GET request
- Set the url of a request
- Set the url of a request using a template
- Set query string parameters
- Get a parsed JSON response
- Get a binary response
- Set a request header
沒有留言:
張貼留言