node-red-contrib-message-counter 1.0.1

Message counting node for node-red

npm install node-red-contrib-message-counter

Message Counter Node

Counts messages within given interval.

The node has two outputs. Output 1 will generate summary message on every interval. Output 2 will repeat incoming (non-control) messages. It can be used to continue your flow. Messages are counted on regular intervals when a measuring message arrives. You can choose between two types of measuring message generators:

INTERNAL: uses built-in generator. You can specify interval and units (seconds / minutes / hours). Intervals can be aligned to the system clock EXTERNAL: in this case you are responsible of generating measuring messages. The topic should be "mc-control" and the payload should be "measure".

In case you want information about current message count without resetting the counter, then send message with topic "mc-control" and payload "report". To distinguish between measure and report messages you can use msg.isReset property. This can be useful for displaying message count to a graph.

Node Info

Version: 1.0.1
Updated 8 months ago
License: MIT

Downloads

2 in the last day
27 in the last week
393 in the last month

Nodes

  • Message Counter

Keywords

  • node-red
  • message-counter
  • pulse counter

Maintainers

  • pkgeorgiev