Skip to content

victronenergy/venus-docker

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Dockerized dbus playback + mqtt service

The purpose of this docker is to facilitate UI development, by being simulating real Victron system(s).

The type of UI development meant here are UIs that relate to Venus OS: the OS on the Victron GX range of monitoring products.

For example the VRM Portal or the HTML5 App.

Within Venus OS, all data readings gathered by the various drivers (canbus, serial, and so forth) are made available in its internal databus, D-Bus.

This docker contains D-Bus recordings of several system types, see below. Once installed you can select one of them. That data is then played back on D-Bus. Its also available on mqtt, since this Docker includes the same D-Bus to MQTT translation service that is also within Venus OS.

The container can simulate different configurations (different sets of devices connected to it) of the VenusGX by running different sets of recordings with a simple commandline api.

Usage

Use readily available image on Docker Hub

The image created with from this repository is published on https://hub.docker.com/r/victronenergy/venus-docker .

  • Install Docker
  • Pull latest version
    • docker pull victronenergy/venus-docker
  • optionally learn about how this venus-docker image extends Ubuntu focal
    • docker scout quickview victronenergy/venus-docker
  • Run the container as an interactive shell
    • docker run -i victronenergy/venus-docker bash -i

Alternatively, build the image yourself from this repository

  • Retrieve the source tree of this repository
  • Install Docker
  • Create image with ./build.sh
  • Instantiate the image as a container running an interactive shell with ./run.sh

Start services

To simulate a real environment, the services need to be running. For a first inspection of the image this not requried. The scripts mentioned below are provided by this GitHub repository and are not redistributed within the image. If using the image from Docker Hub, inspect these scripts to then start those services manually.

  • Start services
    • run ./start_services.sh within the container to start the mqtt and other services.
    • run ./simulate.sh <simulation> to start playback.
  • Run the container in the background with a simulation with ./run.sh -s <simulation_name>
    • to kill the container (and to remove it because of the --rm option) use docker kill <container id>
    • get the container id from the output of the run script or with docker ps
    • multiple can be run in parallel in which case the ports are incremented and printed by the script
  • For more info run ./run.sh -h

Additional arguments

Additional arguments you can pass to simulate.sh or run.sh include:

  • --with-solarcharger: Add a solarcharger to the simulation
  • --with-pvinverter: Add a pvinverter to the simulation
  • --with-tanks: Add tank sensors to the simulation

Working inside the container

You can see what data is available in the mqtt by using mosquitto_sub -t N/# or use an mqtt spy application. To change values manually use mosquitto_pub, but these values are likely to be overridden by an active recording quite quickly.

Differences to Venus OS shipping with Cerbo GX or prepared for Raspberry Pi?

  • Package management - this Venus OS image is based on Ubuntu, use apt to install packages, not opkg.
  • Available software - wget and curl are typically available on an RPi

Modifying recordings

Recordings can be modified with the following steps:

  1. Get the recording desired as a tsv file: ./get_recording_tsv.sh <simulation>. Simulation must be a simulation in ./simulations/X/<simulation>.dat
  2. Edit acquired tsv
  3. Recompile the simulation and replace local simulation file with ./recompile_and_replace_simulation.sh <edited_simulation>.tsv <simulation> where <simulation> must be the same simulation file as in step 1

Systems (simulations)

Battery selection should always be on auto; unless specified differently.

A) Absolut Navetta 68 installation

2 x Skylla-i chargers 2 x VE.Bus Phoenix Inverter 24/3000 (230V and 120V for USA) 1 x BMV-700

And a few more devices, but they won't be connected to Venus:

1 x Phoenix charger 24/25 (for engines) 1 x BlueSmart 12/30 IP22 (for generators) Which electrical parameters can be monitored with these machines? (device by device) Is it possible to set alarms or change device functions via the interface with Garmin?" AC Input 1 & 2 settings are (probably) to be configured as not available; we'll find out once we start working on the gui-overview for this.

Show in html5app:

  • battery box
  • dc loads
  • inverter/charger; adjustable mode
  • charger; adjustable mode + current limit

B) Single BMV-700

Settings:

  • DC system enabled

Show in html5app:

  • battery box
  • dc loads

BCT) Balance CT installation

  • 2x Integrel E-Power
  • 1x MultiPlus 48/5000/70-100
  • 2x Lynx Smart BMS 500A
  • 1x SmartShunt IP65 500A/50mV
  • 4x SmartSolar Charger MPPT 100/20 48V
  • 4x Tank (fuel + fresh water)
  • Generator using GX relay 1

Settings:

  • DC system enabled
  • AC input type 1 = Shore
  • AC input type 2 = Not available
  • Relay function = Generator start/stop
  • Enable Lynx-es and SmartShunt in battery configuration

Show in html5app:

  • Shore power
  • Solar
  • AC loads
  • DC loads
  • Alternator
  • Tanks
  • Multi

C) Single BMV-702

BMV configured to measure starter battery voltage.

Settings:

  • DC-system enabled

Show in html5app:

  • battery box
  • dc loads

D) Multi + BMV - Off-grid with generator

VE.Bus:

  • CurrentlimitIsAdjustable = false.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Generator
  • AC input type 2 = Not available
  • DC system disabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode
  • generator

E) Multi + BMV - Boat without generator

VE.Bus:

  • CurrentlimitIsAdjustable = true.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Shore
  • AC input type 2 = Not available
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode + input current
  • shore power

F) Quattro + BMV - boat with generator - single phase

VE.Bus:

  • AcIn/0/CurrentlimitIsAdjustable-ac-input = false.
  • AcIn/1/CurrentlimitIsAdjustable-ac-input = true.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Generator
  • AC input type 2 = Shore
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode + input current
  • shore power
  • generator

G) Charger + BMV - simple boat

Settings:

  • AC input type 1 = shore
  • AC input type 2 = not available
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • charger; adjustable mode + input current

GDF) Fisher Panda AGT DC genset

Settings:

  • AC input type 1 = not available
  • AC input type 2 = not available
  • DC system enabled
  • Enable genset ouptut as battery configuration
  • Enable genset starter as battery configuration

Show in html5app:

  • Fisher Panda AGT
  • Genset DC output
  • Genset starter battery

GDH) Hatz DC genset

Settings:

  • AC input type 1 = not available
  • AC input type 2 = not available
  • DC system enabled
  • Enable genset ouptut as battery configuration
  • Enable genset starter as battery configuration

Show in html5app:

  • Hatz DC genset
  • Genset DC output
  • Genset starter battery

H) VE.Direct Inverter + BMV - typical simple vehicle - only charged from alternator

Settings:

  • AC input types both on not available
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • inverter; adjustable mode (on/off/eco)

I) Quattro without BMV - Hybrid generator - single phase

VE.Bus:

  • AcIn/0/CurrentlimitIsAdjustable-ac-input = false.
  • AcIn/1/CurrentlimitIsAdjustable-ac-input = true.
  • Mode is adjustable = true.

Settings:

  • AC Input type 1 = generator
  • AC input type 2 = grid
  • DC system disabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode + input current
  • grid
  • generator

J) 4 x BMV-700

Settings:

  • DC system enabled

Show in html5app:

  • battery box
  • dc loads

K) Quattro without BMV - Hybrid generator - three phase

VE.Bus:

  • AcIn/0/CurrentlimitIsAdjustable-ac-input = false.
  • AcIn/1/CurrentlimitIsAdjustable-ac-input = true.
  • Mode is adjustable = true.

Settings:

  • AC Input type 1 = generator
  • AC input type 2 = grid
  • DC system disabled

Show in html5app:

  • battery box
  • ac loads
  • inverter/charger; adjustable mode + input current
  • generator; 3-phase
  • grid; 3-phase

L) Quattro + BMV - boat with generator - three phase

VE.Bus:

  • AcIn/0/CurrentlimitIsAdjustable-ac-input = false.
  • AcIn/1/CurrentlimitIsAdjustable-ac-input = true.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Generator
  • AC input type 2 = Shore
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode + input current
  • generator; 3-phase
  • shore; 3-phase

LP) 2 X Lynx smart BMS 500A in parallel

  • 2 lynx smart BMS 500A
  • Lynx parallel service
  • vebus system

LPP) 2 X Lynx smart BMS 500A in parallel - 1 BMS in pending state

Same as LP, but with one BMS in the pending state.

M) Multi with a VE.Bus BMS

Note https://github.com/victronenergy/venus-private/issues/86. The demo mode is now not how reality is. And how reality will be is unknown as of yet.

VE.Bus:

  • AcIn/0/CurrentlimitIsAdjustable-ac-input = false.
  • AcIn/1/CurrentlimitIsAdjustable-ac-input = false.
  • Mode is adjustable = false.

Settings:

  • AC input type 1 = Grid
  • AC input type 2 = Not available
  • DC system disabled

Show in html5app:

  • battery box
  • ac loads
  • inverter/charger; read-only mode + input current
  • shore

N) Fischer Panda Generator - Genset - three phase

Settings:

  • AC input type 1 = Generator

Show in html5app:

  • generator control panel

O) Quattro + BMV - boat with generator (single phase) + Fischer Panda Generator (three phase) (Simulations F + N)

P) Multi + BMV + tanks - RV with 4 tanks and without generator

VE.Bus:

  • CurrentlimitIsAdjustable = true.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Shore
  • AC input type 2 = Not available
  • DC system enabled

Show in html5app:

  • battery box
  • dc loads
  • ac loads
  • inverter/charger; adjustable mode + input current
  • shore power
  • 4 tanks

Q) Multi + 3 x SmartShunt + Solar - Yacht without generator

VE.Bus:

  • CurrentlimitIsAdjustable = true.
  • Mode is adjustable = true.

Settings:

  • AC input type 1 = Shore
  • AC input type 2 = Not available
  • DC system enabled

R) 35ft yacht - 12V MultiPlus 12/1600

S) 50ft yacht – 24V Quattro 24/5000

DSE) Interactive DSE generator simulation

This mode is a specialty: It runs dse-modbus-simulator within the Docker container, which consists of a Modbus TCP server simulating a DSE 4620 generator controller and a web ui, whichs allows to modify register values, enable and disable error codes and simulate an actual run (based on randomized numbers).

When running ./run.sh -s dse, the web ui will, if no other container is running, get available on http://localhost:8000 and the Modbus TCP server on 0.0.0.0:502, so that the generator simulation can be found by GX devices on the same network as the Docker host.

DSE Modbus Simulator

Using venus-docker with a real Venus device

  • On the Venus device, edit your /etc/ssh/sshd_config to allow remote connections to forwarded ports:

    GatewayPorts clientspecified
    
  • Restart openssh to make the above take effect:

    svc -t /service/openssh
    
  • On the venus device, stop mosquitto:

    svc -d /service/mosquitto
    
  • On the machine that hosts the venus-docker setup, start a venus-docker simulation as you normally would.

  • Forward the port to the venus device using ssh. Note the leading ::

    ssh -R :9001:localhost:9001 root@192.168.22.75
    
  • Browse to the web application: http://192.168.22.75/app

Building dbus-spy

A binary copy of dbus-spy is already included in this repo, but should you need to rebuild it, these are the steps:

git clone git@github.com:victronenergy/dbus-spy.git
cd dbus-spy
git submodule update --init
cd ..
docker build -f dockerfile.dbus-spy . -t dbus-spy

Then copy dbus-spy out of a throwaway container by first starting a container:

docker run -it --rm dbus-spy

Then copy dbus-spy to bin:

docker cp <container>:/usr/local/bin/dbus-spy bin/dbus-spy

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages