Adds hysteresis function to node-red
npm install @stefa168/node-red-hysteresis
!GitHub
!npm
Provides a hysteresis or deadband function.
> Note: this fork is currently being re-written, so the documentation below may not be accurate.
> Currently, only the fixed threshold mode is supported.
>
> The main new feature is the ability to specify the payload path to use for the hysteresis value.
This node implements a hysteresis or deadband function, effectively managing signal fluctuations within a defined range.
Upon receiving a message, the node compares the value of the specified property path with the defined thresholds.
Depending on the value, the node may emit the received message.
The following cases are possible:
* The value is above the upper threshold: the node will emit the received message.
* The value is below the lower threshold: the node will emit the received message.
* The value is between the upper and lower threshold: the node will not emit the received message.
Some exceptions to the above cases are possible, depending on the node settings:
* If the Send initial message option is enabled, the node will emit the received message regardless of the value,
but only once, when the flow is started.
* If the Re-send message if still in High-Band option is enabled, the node will emit the received message if the
value is still above the upper threshold.
* If the Re-send message if still in Low-Band option is enabled, the node will emit the received message if the
value is still below the lower threshold.
* When the flow is first started, the node won't have any previous value to compare with, so the node will emit the
received message regardless of the value. This behaviour can be disabled by unchecking the Send initial message
option.