1.1.0 • Published 5 months ago

node-red-contrib-payload-regulator v1.1.0

Weekly downloads
-
License
MIT
Repository
-
Last release
5 months ago

PayloadRegulator Node

Overview

PayloadRegulator Node is a custom Node-RED node designed to filter and control the flow of repeated payloads. It allows users to configure how many times a repeated payload should be allowed before it gets ignored for a certain number of times. This helps manage redundant data in a flow.

Features

Ignore Count:

Specifies how many times a repeated payload should be ignored.

Repeat Count:

Specifies how many times a repeated payload should be allowed before switching to the ignore phase.

Persistent State:

Keeps track of seen inputs using Node-RED's global context, ensuring consistency even across multiple messages.

Ensures Efficient Data Flow:

Prevents excessive duplicate messages while still allowing controlled repetition.

Installation

To install this node, use:

npm install node-red-contrib-payload-regulator

Alternatively, you can place the node files in the ~/.node-red/nodes directory and restart Node-RED.

Updation

To update this node, use:

npm update node-red-contrib-payload-regulator

Alternatively, you can place the node files in the ~/.node-red/nodes directory and restart Node-RED.

Usage

flow-image

Configuration of node

Node Configuration

When adding PayloadRegulator to your flow, you can configure:

  • Name: (Optional) A custom label for the node.
  • Ignore Count: Number of times to ignore the same consecutive payload.
  • Repeat Count: Number of times to allow the same payload before it enters the ignore phase.

Node Details

Input

  • msg.payload (Any data type): The incoming payload to be filtered.

Output

  • msg.payload: The processed payload based on the configured repeat and ignore rules.

License

This project is licensed under the MIT License.

1.1.0

5 months ago

1.0.1

5 months ago

1.0.0

5 months ago

1.0.2

5 months ago