node-red-contrib-norbico 0.2.0

Node-RED nodes for Danish utility APIs: Eloverblik (electricity) and Aalborg Forsyning (district heating). Per-meter outputs, encrypted credentials, MQTT runtime control, automatic retry, and CSV payloads ready for downstream systems like Niagara.

npm install node-red-contrib-norbico

node-red-contrib-norbico

Node-RED nodes for Danish utility APIs. Currently includes:

  • Eloverblik — fetch electricity consumption data from Energinet's api.eloverblik.dk
  • Aalborg Forsyning — fetch district-heating data from services.aalborgforsyning.dk

Both nodes appear under the Norbico category in the Node-RED palette.

Designed for building automation use cases where the data flows downstream into systems like Niagara: each meter gets its own output, and the payload is a comma-separated string ready for MQTT publishing.

Installation

cd ~/.node-red
npm install node-red-contrib-norbico

Or install via the Node-RED palette manager → Install tab → search for norbico.

Nodes

Eloverblik

Fetches power consumption time series from Energinet's customer API.

  • Encrypted refresh-token storage (also overridable via MQTT)
  • Date range presets: yesterday, last 7/30 days, current/last month, current/last year, or custom
  • Resolution: Actual / Quarter / Hour / Day / Month / Year
  • Optional daily schedule (HH:MM)
  • Automatic retry on transient errors with configurable exponential backoff
  • One output per configured meter, in the order shown in the dialog

Output (per data point):

{
  topic:   "Eloverblik/<meterId>/<resolution>/<periodStart>",
  payload: "571313104402593286,2026-05-01T00:00:00,270.500,2026-04-01T00:00:00,2026-05-01T00:00:00,Month,1,A04,KWH,Schedule",
  debug:   { meteringPointId, periodStart, periodEnd, position, kWh, quality, resolution, unit, trigger }
}

Runtime MQTT control:

Topic Effect
<prefix>/Configuration/Token Updates the refresh token (persists encrypted)
<prefix>/Configuration/MeterIDs Overrides the meter list (comma-separated, or empty for all)
<prefix>/Configuration/ForceUpdate Triggers a fetch when payload is truthy

Default prefix is Eloverblik; configurable per-node.

Aalborg Forsyning

Fetches district-heating consumption from Aalborg Forsyning's customer API, plus computes daily and monthly usage values from locally-maintained snapshots.

  • Encrypted username + password storage (both overridable via MQTT)
  • API budget enforcement: 3 calls/day max (the official limit) with a 5h minimum interval between scheduled calls
  • Daily end-of-day snapshots, 62-day retention, persisted to a JSON file so they survive restarts
  • Computed values: daily_MWh, currentMonth_MWh, previousMonth_MWh, with confidence labels (complete / partial / unavailable) based on snapshot coverage
  • Same retry / scheduling / MQTT-override behavior as the Eloverblik node

Output (per meter):

{
  topic:   "AalborgForsyning/Consumption/<meterID>",
  payload: "<csv string with 16 fields>",
  debug:   { meterID, latestReading, daily_MWh, currentMonth_MWh, previousMonth_MWh, ... }
}

The CSV's first 13 fields match the format produced by the legacy EnergyMeter_xxx function nodes for backwards compatibility with existing Niagara wiring.

State persistence: The node writes call history and snapshots to <userDir>/norbico-aalborg-<nodeId>.json. Writes are atomic (temp file + rename) so a crash mid-write can't corrupt the file.

Quality codes (Eloverblik)

The quality field in Eloverblik output follows ENTSO-E / Energinet conventions:

Code Meaning
A01 Adjusted (manually corrected)
A02 Not available
A03 Estimated (reading didn't arrive in time)
A04 Measured (real measurement)
A05 Substituted
A06 Estimated, then manually corrected

Treat A04 as authoritative and flag anything else for review.

Requirements

  • Node-RED 2.0 or later
  • Node.js 14 or later
  • For each API: an account with API access and credentials

License

MIT — see LICENSE.

Support

Report issues at GitHub

Node Info

Version: 0.2.0
Updated 1 week, 2 days ago
License: MIT
Rating: not yet rated

Categories

Actions

Rate:

Downloads

195 in the last week

Nodes

  • norbico-eloverblik
  • norbico-aalborg-forsyning

Keywords

  • node-red
  • norbico
  • eloverblik
  • energinet
  • aalborg
  • aalborg-forsyning
  • fjernvarme
  • energy
  • district-heating
  • denmark
  • utility
  • building-automation
  • niagara

Maintainers