Skip to main content

Software - FW Victron


Status

  • Status: Development
  • Version: 1.0.2
  • Category: Firmware
  • Language: Python
  • Code: fw_victron

Links

Introducing our Python module designed for seamless data retrieval from Victron devices with VE.Direct support, delivering real-time updates on the local DBus. Aligned with the JOD Smart Vans specifications, this script caters specifically to the Energy's Storage, Generation and Consumption specification sub-groups, providing essential values.

Once activated, the script effortlessly reads data from the specified serial port and promptly updates the DBus with the latest values. The DBus service and its properties dynamically adapt to the PID retrieved from the device. To determine if your Victron device is compatible with this firmware, explore the Devices by ID section and discover the available data mappings on the Value mapping page.

Specs provided

The following table lists all Smart Van SPECIFICATIONS that can be provided by this firmware. Then, you can use this info to customize the `struct.jod` file of the JOD Smart Van distribution.

Property NameSpecification
battery_voltageEnergy > Storage > Voltage
battery_voltage_percentageEnergy > Storage > Percentage
battery_voltage_minEnergy > Storage > Min
battery_voltage_maxEnergy > Storage > Max
battery_currentEnergy > Generation > Current
panel_voltageEnergy > Generation > Voltage
panel_powerEnergy > Generation > Power
panel_power_percentEnergy > Generation > Percentage
panel_power_maxEnergy > Generation > Max Power
load_currentEnergy > Consumption > Current
load_voltageEnergy > Consumption > Voltage
load_powerEnergy > Consumption > Power
load_power_percentEnergy > Consumption > Percentage
load_power_maxEnergy > Consumption > Max Power

Usage

Effortlessly gather data from your Victron device by following these straightforward steps. Physically connect the Victron device to your PC using a Serial To USB cable. Download the firmware (a Python script) and execute it on the connected PC, compatible with USB-equipped PCs or embedded devices like the Raspberry Pi.

Before running the firmware, (1) verify the serial port name and (2) install the necessary software prerequisites. Upon connection, a virtual device is generated, and you can confirm the port name in your PC's resource center or via the ls /dev/tty* command, defaulting to /dev/ttyUSB0.

For software prerequisites, install a Python interpreter and project dependencies using the python -r requirements.txt command.

Now, you're ready to execute the firmware with the following command:

$ python run.py -p {PORT_NAME}

For detailed insights into running the firmware, consult the README.md in the source code or visit the Remote Usage page.