npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@bendenoz/node-red-smartcharge-monitor

v1.0.7

Published

Node-RED custom node for monitoring and optimizing battery charging. Charge your bike and power bank up to 85%.

Readme

Node-RED SmartCharge Monitor

Node-RED custom node for monitoring and optimizing battery charging. Charge your bike and power bank up to 85%.
This node aims to bring smart charging capabilities to non-smart lithium-based battery devices that typically lack such features, including electrical bikes, scooters, drones, power tools, vacuum cleaners, wireless mice, gaming controllers, portable speakers, power banks, and more. While many phones and laptops now have built-in battery management systems, this node fills the gap for other devices by detecting the exponential decay of the saturation stage in the charging cycle through real-time monitoring of power consumption.

The idea is to prevent overcharging, extend battery life, and minimize energy waste.

For more information on charging cycles, refer to Battery University.

Requirements: A connected power plug with power reading capability.
Tested With: Primarily tested with the Meross smart plug (MSS310 / MSS315), but should be compatible with other smart plugs that support power monitoring.

⚠️ Multi-cell batteries (e.g., those in electric bikes, scooters, and drones) should still be fully charged every few weeks or months to ensure proper cell balancing by the BMS. Additionally, this node will usually not work on smartphones unless they are switched off, as the phone's operating system consumption interferes with the power readings.

📦 Installation

To install the node, use the following command in your Node-RED user directory (typically ~/.node-red):

npm install @bendenoz/node-red-smartcharge-monitor

Usage

  1. Drag the smartcharge-monitor node into your Node-RED flow.
  2. Configure the node with the desired parameters, such as cutoff charge percentage.
  3. Set up an inject timer at 20-second intervals to retrieve the power from your charger, and feed the numerical power data into the node's input.
  4. Connect the third output of the node to the OFF command of your connected power plug.
  5. Optionally use the first and second outputs to plot the charging power and rate of change for a detailed view of the charging process.

Charge Graph

📊 Example Flow

Below is an example flow demonstrating how to integrate the smartcharge-monitor node:

Example Flow

Configuration

  • Cutoff: The target charge percentage to stop charging. Typically 85%, you can go down to ~82% but you may get false positives.
  • Charger Efficiency: Specifies the efficiency of the charger. Used primarily to estimate the actual available power after charging.
  • Peak Charge: Defines the battery state of charge from which the exponential decay phase becomes noticeable. 80% is a good start.

How It Works

The smartcharge-monitor node uses a Kalman filter to refine power consumption data and accurately detect the characteristic time constant of the exponential decay phase. When this time constant is within a valid range (typically around 1 hour), the node then waits for the power level to drop below the specified threshold before stopping the charging process.

Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

License

This project is licensed under the MIT License.