Skip to content

Commit

Permalink
Merge pull request #5 from Sineos/status_update
Browse files Browse the repository at this point in the history
Improve Dyn Threshold
  • Loading branch information
Sineos authored Oct 25, 2020
2 parents 0538e1f + 72d255d commit 469b841
Show file tree
Hide file tree
Showing 6 changed files with 838 additions and 16 deletions.
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,10 @@ Dynamic thresholds expect following settings:
* `Topic Current` specifies a message topic under which the current values are send. This values are then matched against the respective thresholds.
* `Hysteresis+` is the upper delta for the triggering point. The `msg.payload` from `Threshold Topic` plus the `Hysteresis+` value equals the `Upper Threshold`.
* `Hysteresis-` is the lower delta for the triggering point. The `msg.payload` from `Threshold Topic` minus the `Hysteresis-` value equals the `Lower Threshold`.
* `Raise error on missing threshold` will create an error object in case the threshold is missing and `Topic Current` value arrives. This can be handled via a `Catch` node. Also see the included examples

**Note:** The values set in dynamic mode will not survive a node-red deploy or restart.
**Note:**
The values set in dynamic mode will typically not survive a node-red deploy or restart. With version **0.3.0** the node will save all relevant settings as context. Using a persistent context store, e.g. file, will allow the node to recover these values and continue from there.

## Send initial message

Expand All @@ -40,6 +42,9 @@ After starting node-red or deploying the flow, the hysteresis node does not know

In the node Output settings either `Original Payload / Topic` or custom values can be specified.

## Node Status
The node makes extensive use of status information. These can be used to react on status changes with the `Status` node. Also see the included examples for a how-to.

## Use cases

In control systems, hysteresis can be used to filter signals so that the output reacts less rapidly than it otherwise would, by taking recent history into account. For example, a thermostat controlling a heater may switch the heater on when the temperature drops below A, but not turn it off until the temperature rises above B. For instance, if one wishes to maintain a temperature of 20 °C then one might set the thermostat to turn the heater on when the temperature drops to below 18 °C and off when the temperature exceeds 22 °C.
Expand Down
Loading

0 comments on commit 469b841

Please sign in to comment.