Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including node-red-contrib-power-monitor with all npm packages installed. Try it out:

node-red-contrib-power-monitor lists no main file and has no index.js, so it can't be directly required. If this is a mistake, please let us know. It may however contain internal files that you can require manually:

// require("node-red-contrib-power-monitor/[??]")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

node-red-contrib-power-monitor v0.1.2

A Node-RED node to monitor home appliances based on their power consumption.

node-red-contrib-power-monitor

GitHub version NPM version Dependencies Status
donate twitter

A Node-RED node to monitor home appliances based on their power consumption.


Table of Contents


Install

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

npm install node-red-contrib-power-monitor

Usage

Feed the node regularly with a real number as payload representing the average consumption in Watts since the last message. The node will trigger events based on the start and stop conditions with additional information like the total energy consumption for the last cycle.

Configuration

  • Name: Name of the appliance. Will be attached to the output object.
  • Power threshold: Value (in watts) to tell whether the appliance is running or not, an ideal value would be 0 (0W if not running).
  • Start after: Number of messages with readings over the threshold to trigger a start event.
  • Stop after: Number of messages with readings below the threshold to trigger a stop event.

Output

The output will be a JSON object with the appliance name and the event type. In case the event is a stop event it will also report the total time (in seconds) and the energy consumption of the cycle (in kWh). Examples:

{ "name": "washer", "event": "start" }

{ "name": "washer", "event": "stop", "time": 8800, "energy": 0.14 }

Contribute

There are several ways to contribute to this project. You can report bugs or ask for new features directly on GitHub. You can also submit your own new features of bug fixes via a pull request.

And of course you can always buy me a beer, coffee, tea,... via the donation button below.

donate

License

This project is licensed under Apache 2.0 license.

RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free