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

node-red-contrib-sma-sunspec

v1.1.0

Published

Node-RED nodes for reading and writing SMA inverters and smart meters via SunSpec Modbus TCP

Readme

node-red-contrib-sma-sunspec

Node-RED nodes for reading and writing SMA solar inverters and smart meters via SunSpec Modbus TCP.

No license keys, no cloud dependencies — just direct Modbus TCP to your SMA hardware.

Nodes

sma-inverter-read

Polls an SMA inverter or smart meter on a configurable interval and outputs structured data.

  • Auto-discovery — finds the SunSpec base register and scans the model table automatically
  • Device detection — editor probe button identifies the device type, unit ID, and available models
  • Flexible output — full SunSpec envelope or selected individual fields
  • Exponential backoff — retries with increasing delay on communication errors

Supported SunSpec models:

| Model | Type | |-------|------| | 1 | Common (manufacturer, model, serial) | | 101, 102, 103 | Inverter (integer scaled) — single/split/three-phase | | 111, 112, 113 | Inverter (float) — single/split/three-phase | | 160 | MPPT (DC string data) | | 201–204 | Meter (integer scaled) — single/split/wye/delta | | 211–214 | Meter (float) — single/split/wye/delta |

sma-inverter-write

Writes active power curtailment to an SMA inverter via SunSpec Model 123 (Immediate Controls).

  • Readback verification — writes the setpoint, then reads back to confirm
  • Heartbeat — re-writes periodically to keep the curtailment alive
  • Deduplication — skips writes when the same setpoint is already confirmed
  • Flexible input — accepts watts, percent, or structured objects
  • 3-attempt retry with connection reset between attempts

Install

cd ~/.node-red
npm install node-red-contrib-sma-sunspec

Or search for node-red-contrib-sma-sunspec in the Node-RED palette manager.

Configuration

Both nodes need:

  • Host — IP address of the SMA device
  • Port — Modbus TCP port (default 502)
  • Unit ID — Modbus slave ID (SMA inverters typically use 126, meters use 3)

Use the Detect Device / Detect Model 123 button in the editor to auto-discover.

sma-inverter-write input format

// Watts (number)
msg.payload = 5000;

// Watts (object)
msg.payload = { watts: 5000 };

// Percent of nominal power
msg.payload = { percent: 50 };

// Explicit mode
msg.payload = { value: 50, mode: "percent" };

Dependencies

License

MIT