victron-mqtt
Python library for communicating with Victron Venus OS MQTT interface
What it is and what it does
victron_mqtt is an async Python client for Victron Energy's Venus OS devices, which are energy management controllers used in solar, battery, and inverter systems. It connects to the device's built-in MQTT broker, discovers all attached hardware (solar chargers, batteries, inverters, etc.), and exposes them as typed Python objects with live-updating metrics. You can read sensor values in real time via callbacks, write control commands back to the device (turning switches on/off, adjusting setpoints), and browse the device hierarchy.
The library is built on aiohttp and paho-mqtt for non-blocking async operation, making it suitable for integration into Home Assistant, custom dashboards, or monitoring applications. It handles metric typing, unit conversion, computed values (like GPS location from raw coordinates), and enum translation. The package includes a tkinter GUI for browsing devices and metrics during development, and supports multiple operation modes (full control, read-only, or experimental features).
Use it for:
- Monitor solar charger yield, battery state-of-charge, and inverter power in real time from a Home Assistant dashboard.
- Automate energy management by reading grid power and battery voltage, then writing control commands to switch loads or adjust charging setpoints.
- Build a custom web or mobile app that displays live metrics from a Victron system with typed, unit-aware values.
- Log historical energy data by subscribing to metric updates and writing them to a database or time-series store.
- Integrate Victron hardware into a larger IoT system by exposing metrics and controls via MQTT callbacks.
Worth the install?
AI-flagged interpretation of the facts on this page — verify before relying
An asynchronous Python library for communicating with Victron Energy Venus OS devices via MQTT, mapping MQTT topics to typed Python objects with live-updating metrics and writable controls.
Yes. The library is actively maintained, has no known vulnerabilities, installs with low friction, and is licensed permissively under MIT. It fills a clear gap for Python developers integrating Victron hardware into automation or monitoring systems. The async design and typed object model make it well-suited for production use. Start with the quick-start example and verify your Venus OS device is reachable on the network.
Install
victron-mqtt on PyPI
pip
pip install victron-mqttuv
uv add victron-mqttpoetry
poetry add victron-mqttInstalling victron-mqtt
Before you install
Low install friction with a pure-Python wheel. Active maintenance with a recent release (2026-08-14) and steady development since June 2025. Depends on aiohttp and paho-mqtt, both widely-used async/MQTT libraries.
License in practice
MIT license permits commercial and private use with minimal restrictions—you may use, modify, and distribute this library freely as long as you include the license notice.
Quickstart
pip install victron_mqtt
import asyncio
import victron_mqtt
async def main():
hub = victron_mqtt.Hub("venus.local", 1883, None, None, False)
await hub.connect()
await hub.wait_for_first_refresh()
for device in hub.devices.values():
print(f"{device.name}: {device.device_type}")
await hub.disconnect()
asyncio.run(main())
Requires Python 3.11 or later; a Victron Venus OS device (CCGX, Cerbo GX, or Ekrano GX) with MQTT broker running on the network.
Verify before relying
- Whether the library handles automatic reconnection and recovery from network interruptions.
- Performance characteristics when monitoring large numbers of devices or metrics simultaneously.
- Compatibility with non-standard MQTT broker configurations or authentication schemes beyond username/password.
Package facts
| License | MIT (permissive) |
| Python support | supports the current Python release (>=3.11) |
| Install friction | low — pure-Python wheel |
| Runtime dependencies | 2 — aiohttp, paho-mqtt |
| Maintenance | actively maintained — 0 days since the last release |
| Last repo commit | |
| First released | |
| Downloads | 77,736/month — #14,501 on PyPI (30-day window, as of 2026-08-14) |
| Known vulnerabilities | none known (OSV.dev, checked 2026-08-14) |
Evidence: victron_mqtt-2026.8.3-py3-none-any.whl
Keywords: mqtt, venus os, victron
Tags
More Monitoring packages
Wraps any iterable to display a real-time…
copyleft · top 100 on PyPI
opentelemetry-semantic-conventionsProvides generated Python code for…
permissive · top 100 on PyPI
opentelemetry-sdkProvides the reference implementation of the…
permissive · top 100 on PyPI
opentelemetry-apiProvides the abstract API and interfaces for…
permissive · top 100 on PyPI
opentelemetry-exporter-otlp-proto-httpExports OpenTelemetry observability data to an…
permissive · top 1,000 on PyPI
opentelemetry-instrumentationProvides automatic instrumentation commands and…
permissive · top 1,000 on PyPI
python-openevse-httpA Python library for asynchronous communication…
permissive · top 15,000 on PyPI
pyworxcloudAsync Python client library for communicating…
permissive · top 15,000 on PyPI
pyenphaseProvides a Python library to communicate with…
permissive · top 15,000 on PyPI
pyswitchbeeA Python library for controlling SwitchBee…
permissive · top 15,000 on PyPI
asyncio-mqttProvides an async/await interface to MQTT…
permissive · top 15,000 on PyPI
paho-mqttProvides an MQTT client library for connecting…
copyleft · top 5,000 on PyPI
gmqttgmqtt is an async Python MQTT client that…
permissive · top 15,000 on PyPI
nexiaAsync Python library for controlling Nexia…
permissive · top 15,000 on PyPI
pyemvuePyEmVue reads energy usage data from Emporia…
permissive · top 15,000 on PyPI
aiomqttAn asyncio-native MQTT client that wraps…
permissive · top 5,000 on PyPI