https://github.com/arkane-systems/node-red-contrib-sum
A Node-RED node to calculate sum.
https://github.com/arkane-systems/node-red-contrib-sum
Last synced: 3 months ago
JSON representation
A Node-RED node to calculate sum.
- Host: GitHub
- URL: https://github.com/arkane-systems/node-red-contrib-sum
- Owner: arkane-systems
- License: apache-2.0
- Created: 2020-06-02T00:19:09.000Z (about 6 years ago)
- Default Branch: master
- Last Pushed: 2020-06-02T07:41:37.000Z (about 6 years ago)
- Last Synced: 2025-12-05T19:59:25.640Z (6 months ago)
- Language: HTML
- Size: 7.81 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# node-red-contrib-sum
A Node-RED node to calculate sum.
This node is based on Eisbehr's node-red-contrib-average.
## Install
Use the "Manage palette" option inside Node-RED, or within your Node-RED user directory (typically `~/.node-red`), run the command:
`npm install node-red-contrib-sum`
## Usage
Calculate the sum of incoming `msg.payload` values from across a number of different `msg.topic`.
Incoming `msg.topic` has to be used to separate and identify values. Messages not containing a valid numeric value will be rejected.
Will return the current sum of all different `msg.topic` values as `msg.payload`. Every other datum will be pushed through.
The sum can be reset with an incoming message that contains `msg.reset`. Then all stored data will be removed and the initial sum starts at zero again.
## License
This project is licensed under the Apache 2.0 license.