Current version: 2.1.849.2026.05.26
Updated: May 26, 2026
Author: Scott Sheen
Python RV-C / SocketCAN service that integrates Xantrex Freedom Pro inverter/chargers with Victron Venus OS. It reads Xantrex RV-C CAN traffic, decodes the supported DGNs, and publishes inverter and charger data to Venus OS through D-Bus.
This project began as my first Python project so I could integrate my own Xantrex inverter/charger with a Raspberry Pi running Venus OS. It has since grown into a more complete inverter/charger integration with contributions and field testing from other users.
- Reads Xantrex Freedom Pro RV-C traffic over SocketCAN.
- Publishes separate inverter and charger services to Victron Venus OS D-Bus.
- Decodes key RV-C DGNs for AC input/output, DC bus values, states, temperatures and flags.
- Provides heartbeat/state updates and derived values such as power.
- Supports structured
--debugand--verboselogging. - Sends startup PGN requests for identity, status and operating data.
- Detects Victron battery-monitor services such as BMV and SmartShunt to avoid double-counting inverter DC current in the Venus OS DC Loads tile.
- Uses
can10at 250 kbps by default, with the CAN interface selectable from the command line.
- Inverter:
com.victronenergy.inverter.can_xantrex - Charger:
com.victronenergy.charger.can_xantrex
Venus OS on a Cerbo GX or Raspberry Pi. The project has been tested with Venus OS 3.15+ and Python 3.8 on Raspberry Pi.
A CAN interface is required between the Xantrex RV-C network and the Venus OS device. A CANable-style USB-to-CAN adapter can be used with a Raspberry Pi. Cerbo GX installations can use an appropriate supported CAN interface.
- Venus OS device with Python 3.8 and D-Bus/GLib available.
- SocketCAN interface configured; default is
can10at 250 kbps. - Permission to access CAN sockets (root or appropriate capabilities).
- RV-C connection to the Xantrex Freedom Pro inverter/charger.
Other inverter/charger devices that implement compatible RV-C messages may also be adaptable to this driver, but product identity, source addresses and supported DGNs can differ.
/data/xantrex-monitor/
├─ xantrex-service.py
└─ velib_python/ # optional, depending on the Venus OS installation
mkdir -p /data/xantrex-monitor/logsExample using the default can10 interface:
ip link set can10 up type can bitrate 250000Adapt the interface name to your hardware and Venus OS configuration.
python3 /data/xantrex-monitor/xantrex-service.py--can IFACE SocketCAN interface (default: can10)
--debug Enable debug logging
--verbose Very verbose logging
Examples:
python3 /data/xantrex-monitor/xantrex-service.py --can can1
python3 /data/xantrex-monitor/xantrex-service.py --debug
python3 /data/xantrex-monitor/xantrex-service.py --debug --verboseMain loop
- GLib main loop drives CAN receive and D-Bus exports.
D-Bus services
- Two services are registered—inverter and charger—using private SystemBus connections to avoid conflicts when multiple root objects are present.
Source selection
- The Xantrex inverter/charger commonly appears at source
0x42;0xD0has also been observed for inverter traffic. Filtering keeps DGN values associated with the intended service.
Startup handshake
- On startup, the service sends a burst of PGN requests for identity and status information, including Address Claimed, Product Identification, Model Info, AC metrics, state and Software ID. Not every Xantrex installation responds to every request.
- Responses populate Venus OS paths such as
/Info/*,/Firmware/*,/Mgmt/*,/Stateand AC/DC paths.
Mapping and decoding
- DGNs are decoded from RV-C frame payloads and mapped to Venus OS D-Bus paths.
- Derived values are calculated where useful, such as power from voltage × current.
Logging
- Structured logging supports
--debugand--verbose. - Frame counts and source IDs help with troubleshooting.
- Logs default to
/data/xantrex-monitor/logs/xantrex.log.
Clean shutdown
- Signal handling exits the main loop, unregisters D-Bus objects and closes CAN sockets to avoid stale bus names on restart.
Version 2.1.849.2026.05.26 added Victron battery-monitor detection so systems using a BMV or SmartShunt do not double-count Xantrex inverter DC current in the Venus OS DC Loads tile.
It also:
- keeps Xantrex DC voltage publishing active
- improves normal-mode logging behavior
- reports skipped sources separately from successful sources
See ChangeLog.md for the full project history.
These notes are retained to show the development history rather than the current project status.
At that point the project was still under active development. Charger support was incomplete and inverter state handling still had issues.
A major improvement to charger support came through testing and work with Stephen Tenburg. My focus had initially been the inverter side; Stephen helped finish and validate the charger side, which became substantially more complete and reliable.
Stephen also wrote an in-depth step-by-step guide for using this driver with a Victron Cerbo GX:
Connecting a Victron Cerbo to a Xantrex XC-Pro
- You are welcome to modify and adapt this code for your own setup.
- Pull requests and patches are welcome so improvements can benefit other users.
- Open an issue for bugs, additional DGN decoders or Venus OS path-mapping suggestions.
- Unless otherwise noted, contributions are accepted under the same MIT license.
MIT. See LICENSE.


