node-red-contrib-rpo-change-detect
v1.0.4
Published
Forwards messages only when the value has changed (supports tolerance for numbers)
Downloads
711
Maintainers
Readme
node-red-contrib-change-detect
A Node-RED node that forwards messages only when the value has changed. Supports numbers, booleans, strings, and objects.
Installation
npm install node-red-contrib-change-detectInputs
- payload
any: Value to check. - reset (optional)
boolean: Clear last value; next message is always forwarded.
Outputs
- payload
any: Original value, forwarded only when changed. - changeDetect
object: { previous, current, changed, type, tolerance }
Configuration
- Tolerance: Minimum numeric difference to trigger output (0 = any change).
- Initial Value: Optional: pre-set the last value on deploy.
Tips
- First message is always forwarded (no previous value to compare).
- Objects and arrays are compared via deep JSON comparison.
- Tolerance only applies to numeric values.
License
MIT (c) sr.rpo
