Skip to content

About

RV-C/CAN integration for Xantrex Freedom Pro inverter/chargers with Victron Venus OS. Python service using SocketCAN and D-Bus.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Repository files navigation

Xantrex RV-C → Venus OS D-Bus Driver

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.

Changelog · MIT License

What it does

  • 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 --debug and --verbose logging.
  • 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 can10 at 250 kbps by default, with the CAN interface selectable from the command line.

D-Bus services

  • Inverter: com.victronenergy.inverter.can_xantrex
  • Charger: com.victronenergy.charger.can_xantrex

Target

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.

Screenshots and hardware

Xantrex data in Venus OS

Xantrex data displayed in Venus OS

RV-C / CAN wiring

Xantrex RV-C wiring

USB CAN connection

Xantrex USB CAN connection

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.

Requirements

  • Venus OS device with Python 3.8 and D-Bus/GLib available.
  • SocketCAN interface configured; default is can10 at 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.

Install on Venus OS

1. Place the files on the device

/data/xantrex-monitor/
├─ xantrex-service.py
└─ velib_python/         # optional, depending on the Venus OS installation

2. Create the log directory

mkdir -p /data/xantrex-monitor/logs

3. Bring up the CAN interface

Example using the default can10 interface:

ip link set can10 up type can bitrate 250000

Adapt the interface name to your hardware and Venus OS configuration.

4. Run the service

python3 /data/xantrex-monitor/xantrex-service.py

Optional parameters

--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 --verbose

Architecture notes

Main 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; 0xD0 has 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/*, /State and 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 --debug and --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.

Current release notes

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.

Historical development notes

These notes are retained to show the development history rather than the current project status.

September 14, 2025

At that point the project was still under active development. Charger support was incomplete and inverter state handling still had issues.

November 20, 2025

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

Contributions and feedback

  • 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.

License

MIT. See LICENSE.

About

RV-C/CAN integration for Xantrex Freedom Pro inverter/chargers with Victron Venus OS. Python service using SocketCAN and D-Bus.

Topics

Resources

Stars

5 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages