node-red-contrib-sma-sunspec 1.1.0

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

npm install node-red-contrib-sma-sunspec

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

Node Info

Version: 1.1.0
Updated 1 day ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

0 in the last week

Nodes

  • sma-inverter-read
  • sma-inverter-write

Keywords

  • node-red
  • sma
  • sunspec
  • modbus
  • inverter
  • smart-meter
  • solar
  • energy
  • photovoltaic

Maintainers