@mschaeffler/node-red-hourmeter
v1.0.0
Published
A working hour meter for NodeRed.
Readme
hour meter
A working hour meter for NodeRed.

Install
$ npm install @mschaeffler/node-red-hourmeterUsage
The counter is started / stopped according to the value of the payload:
|type|value|counter is| |:---|:----|:--------------| |bool|false|stopped| ||true|started| |number|0|stopped| ||1|started| |string|false|stopped| ||0|stopped| ||off|stopped| ||stop|stopped| ||true|started| ||1|started| ||on|started| ||start|started|
A local filesystem context store is needed to store the internal data.
Input
|msg. | type | description |
|:-------|:-------|:----------------------------------|
|payload | | Starts or stopps the counting. |
|reset |boolean |If true, resets the counter to 0.|
|set |boolean |If true, sets the counter to payload.|
|query |boolean |If true, just querries the state of the counter.|
Outputs
boolean value
|msg. | type | description | |:-------|:-------|:----------------------------------| |payload | boolean| Is counting active?| |reason | string | Reason of the message output.|
hour counter
|msg. | type | description | |:-------|:-------|:----------------------------------| |payload | number | Value of the hour counter.| |reason | string | Reason of the message output.|
Parameters
|config| type | description | |:-----|:-------|:----------------------------------| |topic| string | Topic to send output values with.| |cycle| number |Cyclic time of output; 0 is only at state change.| |Contextstore|context store| context store for storing the values.| |Status|boolean| the actual value as a node status.|
Example Flow
Author
License
LGPL-2.1
