node-red-contrib-comparator
v1.0.4
Published
Compares two numeric values with configurable operator and outputs boolean result
Maintainers
Readme
node-red-contrib-comparator
A Node-RED node that compares two numeric values identified by msg.topic and outputs a boolean result.
Installation
npm install node-red-contrib-comparatorInputs
- payload
number: Value for input A or B (identified by msg.topic). - topic
string: Set to Topic A or Topic B name. - operator (optional)
string: Override operator: > < >= <= == != - reset (optional)
boolean: Clear stored A and B values.
Outputs
- payload
boolean: Comparison result. - comparator
object: { a, b, operator, result, tolerance }
Configuration
- Topic A/B: msg.topic identifiers (default: a / b).
- Operator: Comparison operator (default: >).
- Tolerance: Dead band for == and != comparisons (default: 0.01).
Tips
- Output fires when both A and B are known.
- Tolerance applies only to == and != operators.
License
MIT (c) sr.rpo
