adds code

Quick answer: Smart plug energy monitoring is the cheapest real power dashboard you can build in Node-RED: a $15 energy-monitoring plug measures live watts and cumulative kWh, MQTT or a local API carries the numbers, InfluxDB stores them, and a gauge node draws them. No soldering, no mains wiring. Pick the plug when you care about one appliance; pick a panel monitor when you care about a circuit.

Why a $15 plug beats a DIY power meter (most of the time)

The classic DIY path is a PZEM-004T-style meter board wired to an ESP32 running ESPHome or Tasmota. It works — ESPHome ships a dedicated PZEM-004T component — and you learn plenty. But you end up with a measurement instrument that is also a prototype: your enclosure, your wiring, your calibration, sitting a screwdriver's slip away from mains voltage.

A certified energy-monitoring plug collapses all of that into a factory-sealed box that already passed the safety approvals your country requires. You plug it into the wall, join it to Wi-Fi, and the measurement problem is solved before you open the Node-RED editor. The engineering moves to where it belongs: the data path and the dashboard.

DIY still wins in three cases:

  • Sub-metering a whole circuit at the consumer unit — no plug can do that
  • Hardwired loads: water heater, air conditioning, oven
  • The learning project is the point

For everything else — the garage freezer, the desk setup, the media center, the "what does this old fridge actually cost me" question — the plug is the better instrument.

The spec that decides everything: how the data gets out

Energy monitoring itself is table stakes; plenty of $12 plugs measure watts. The feature that matters for Node-RED is local access. Plugs fall into three tiers:

  1. Flashable or local-first firmware. Tasmota publishes readings as MQTT messages on a tele/.../SENSOR topic with an ENERGY object (power, voltage, current, cumulative kWh); TelePeriod sets the interval — 300 s by default, 10 s minimum. ESPHome exposes the same sensors over its native API or MQTT. If a plug runs (or can be flashed with) either, the Node-RED side is trivial.
  2. Vendor local API. Shelly's Gen2 devices document local HTTP and MQTT interfaces — no cloud round-trip. Some TP-Link Kasa and Tapo models are supported by the community python-kasa library, which reads power data locally. That one is community-documented, not an official TP-Link API, so treat it as such.
  3. Cloud-only. Readings exist only in the vendor app or behind a cloud API. Polling nodes exist, but you inherit latency, rate limits, and the risk that an app update breaks your dashboard. For an always-on display, avoid.

Two more checks before buying: the printed max-load rating (15 A / 1800 W is the typical US ceiling — never exceed it, and think twice before switching space heaters), and whether the specific model is actually the monitoring variant — many product lines ship both a plain and an energy-monitoring version under near-identical names.

Before you buy, check measured specs rather than marketing copy — especially the max-load rating and whether the model you picked is actually the energy-monitoring variant. If you are unsure how a plug fits your platform and placement, their plug finder asks four questions — use case, ecosystem, indoor or outdoor, energy monitoring — and shows which rules matched.

If you buy through links on the sites we recommend, we may earn a small commission.

The data path: plug → MQTT → InfluxDB → gauge

Four hops, one afternoon. Kept high-level on purpose — the exact node wiring depends on your plug.

1. The plug publishes

A Tasmota plug sends JSON to tele/<topic>/SENSOR every TelePeriod seconds:

{"Time":"2026-08-28T12:00:00","ENERGY":{"Total":1.371,"Power":42,"Voltage":230,"Current":0.183}}

A Shelly posts the same idea over its local MQTT interface. If you have never wired a broker, our Shelly and Tasmota with MQTT walkthrough (German) covers the setup end to end.

2. Node-RED subscribes and labels

An mqtt in node subscribes to the topic, a JSON node parses the payload, and a change node stamps on the context the plug doesn't know — room, appliance, tariff. Do the labeling here, once, not in every downstream node.

3. InfluxDB stores

The node-red-contrib-influxdb node writes one point per message: measurement power, tags {room: "garage", appliance: "freezer"}, field {watts: 42}. InfluxData documents the Node-RED integration. Why bother when the dashboard can chart in memory? Retention and history: charts that survive a reboot, downsampling of old data, and queries like "average overnight draw of the freezer in January."

4. The gauge draws

node-red-dashboard's gauge node shows live watts; a chart node next to it shows the last 24 hours. That is the whole dashboard. Put the UI URL on your phone's home screen and you have a power monitor that would have been a weekend electronics project not long ago.

For where this fits in a bigger local-first setup, the 2026 local smart home build covers the architecture around it.

When a plug is the wrong instrument

  • Whole-home monitoring. Twenty plugs cost more than one panel-level monitor and still miss every hardwired load.
  • Billing-grade accuracy. A $15 plug will find a 10 W vampire load — roughly $10–13/year at $0.11–0.15/kWh, which is arithmetic, not a spec — but don't reconcile it against your utility meter to the cent.
  • Sub-second transients. TelePeriod-style reporting averages over the interval; oscilloscope-class questions need different gear.

Frequently asked questions

Do I need a Raspberry Pi?

No. Node-RED runs on any Linux box, a NAS, or Docker. The Pi is just the most common host.

Can I skip InfluxDB?

Yes. Dashboard charts keep history in memory, which is lost on restart. Fine for a week-long experiment; annoying once you have built up a winter of data.

Does every energy-monitoring plug work with Node-RED?

Every one that exposes MQTT or a local API, yes. Cloud-only plugs work through polling nodes but make poor dashboard citizens.

Sources

Previous Post Next Post