perkun.eu Services Portfolio Blog About Contact PL
← Blog

9/5/2022

Node-RED and Venus OS — solar installation monitoring for 200 PLN

TL;DR: Raspberry Pi 4 with Venus OS acts as a hub for Victron devices. Node-RED reads data via MQTT and writes to InfluxDB. Grafana builds the dashboard. Cost: RPi4 (~180 PLN) + SD card (~20 PLN).

Venus OS is Victron Energy’s Linux-based operating system. It runs on a Raspberry Pi 4 and turns it into a multi-function hub for monitoring a solar installation — it communicates with MPPTs, inverters, and BMS units via VE.Direct, VE.Can, or Bluetooth.

Installing Venus OS on RPi4

Download the image from Victron’s site (github.com/victronenergy/venus): the raspberrypi4 or raspberrypi2 variant. Flash it to an SD card (Raspberry Pi Imager or Balena Etcher). Boot — first startup takes a few minutes.

Access via browser: http://[RPi-IP]/ or via console ssh root@[IP]. Venus OS serves its own web interface — you see data from connected Victron devices right away.

Venus OS MQTT broker

Venus OS has a built-in MQTT broker (Mosquitto). Enable it in Remote Console → Settings → Services → MQTT on LAN (plaintext). Data from Victron devices is available on topics N/[portal-id]/[device]/[path].

Example: N/abc123def/solarcharger/0/Yield/Power — current power generated by the MPPT.

Node-RED flow

Node-RED is available on Venus OS via port 1880 (if installed). Alternatively — install Node-RED in a separate Docker container.

Flow: mqtt infunction (parsing JSON payload) → influxdb out.

mqtt in node:

  • Server: localhost:1883
  • Topic: N/+/solarcharger/# (all MPPT data)

function node (extracting values):

const topic = msg.topic.split('/');
const measurement = topic[topic.length - 1];
msg.payload = { [measurement]: parseFloat(msg.payload) };
return msg;

Grafana dashboard

InfluxDB as datasource, queried via Flux or InfluxQL. Basic panels: current power [W], daily yield [kWh], battery state of charge [%], battery voltage [V].

Set alerts in Grafana for battery SoC < 20% and power < 50W during daylight hours — that’s a signal something is wrong (dirty panels, failure, shading).

Summary

For 200 PLN of hardware and a weekend of configuration you get full solar installation monitoring with no cloud subscription. Historical data on your own disk, a dashboard available on the local network, and SMS alerts via Twilio.