1
0
mirror of https://github.com/node-red/node-red-nodes.git synced 2023-10-10 13:36:58 +02:00
node-red-nodes/function/smooth
Sam Machin 2d28a2304f
Update package.jsons for mono-repo (#851)
Update the package.json for each node to point to the directory within the repo that hosts the code for the package in question.  as per https://docs.npmjs.com/cli/v7/configuring-npm/package-json#repository
2021-11-02 15:22:30 +00:00
..
icons Move Smooth node to function folder to better reflect it's category. 2014-09-21 11:14:57 +01:00
locales/en-US added i18n help files (#766) 2021-03-12 13:17:23 +00:00
17-smooth.html added i18n help files (#766) 2021-03-12 13:17:23 +00:00
17-smooth.js Added "reduce" option to the Smooth function node (#577) 2019-09-19 09:11:23 +01:00
LICENSE Update licenses and packages for all nodes 2016-11-06 20:26:19 +00:00
package.json Update package.jsons for mono-repo (#851) 2021-11-02 15:22:30 +00:00
README.md Allow Smooth node to be reset by msg.reset 2017-02-07 21:41:18 +00:00

node-red-node-smooth

A Node-RED node that provides several simple smoothing algorithms for incoming data values. These include

  • Minimum
  • Maximum
  • Mean
  • Standard Deviation
  • High Pass Smoothing
  • Low Pass Smoothing

Install

Run the following command in your Node-RED user directory - typically ~/.node-red

npm install node-red-node-smooth

Usage

A simple node to provide various functions across several previous values, including max, min, mean, standard deviation, high and low pass filters.

Max, Min, Mean and Standard Deviation work over a rolling window, based on a specified number of previous values.

The High and Low pass filters use a smoothing factor. The higher the number the more the smoothing. E.g. a value of 10 is similar to an α of 0.1. It is analogous to an RC time constant - but there is no time component to this as the code is based on events arriving.

If msg.reset is received (with any value), all the counters and intermediate values are reset to an initial state.

Note: This node only operates on numbers. Anything else will try to be made into a number and rejected if that fails.