Files
Paul G dd566f6975 Apply Venus OS best practices across all services
- Standardize multilog to s25000 n4 (~100KB cap) to prevent filling /data
- Use VeDbusService register=False + deferred register() in dbus-generator-ramp and dbus-vrm-history
- Add @exit_on_error decorator to template GLib callback
- Document best practices in README and template README

Made-with: Cursor
2026-03-16 18:40:54 +00:00
..

dbus-vrm-history

Venus OS D-Bus service that proxies historical data from the VRM cloud API and exposes it on D-Bus/MQTT for the frontend dashboard.

Features

  • Fetches historical stats from VRM cloud API (battery SOC, consumption, generator runtime, battery cycles)
  • Auto-discovers VRM site ID from device portal ID
  • Configurable refresh interval
  • Exposes history data on D-Bus for use by venus-html5-app custom views

Architecture

Module Purpose
dbus-vrm-history.py Main service, D-Bus setup, request handling
vrm_client.py VRM API client (stats, widgets, site discovery)
config.py Service name, VRM URL, refresh interval, status codes

Installation

scp -r dbus-vrm-history root@<cerbo-ip>:/data/
ssh root@<cerbo-ip>
bash /data/dbus-vrm-history/install.sh

Configuration

Set your VRM API token after installation:

dbus -y com.victronenergy.vrmhistory /Config/Token SetValue 'your-vrm-api-token'

D-Bus Service

  • Service name: com.victronenergy.vrmhistory
  • Config paths: /Config/Token, /Config/SiteId, /Config/RefreshInterval
  • History paths: /History/Soc, /History/Consumption, /History/GeneratorRuntime, /History/BatteryCycles

Service Management

svstat /service/dbus-vrm-history
svc -t /service/dbus-vrm-history        # restart
tail -f /var/log/dbus-vrm-history/current | tai64nlocal