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.
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
- Retrieve the source tree of this repository
- git clone https://github.com/victronenergy/venus-docker
- cd venus-docker
- Install Docker
- Create image with
./build.sh
- Instantiate the image as a container running an interactive shell with
./run.sh
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
- 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) usedocker 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
- to kill the container (and to remove it because of the
- For more info run
./run.sh -h
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
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.
- Package management - this Venus OS image is based on Ubuntu, use
apt
to install packages, notopkg
. - Available software -
wget
andcurl
are typically available on an RPi
Recordings can be modified with the following steps:
- Get the recording desired as a tsv file:
./get_recording_tsv.sh <simulation>
. Simulation must be a simulation in ./simulations/X/<simulation>.dat - Edit acquired tsv
- 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
Battery selection should always be on auto; unless specified differently.
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
Settings:
- DC system enabled
Show in html5app:
- battery box
- dc loads
- 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
BMV configured to measure starter battery voltage.
Settings:
- DC-system enabled
Show in html5app:
- battery box
- dc loads
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
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
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
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
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
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
Settings:
- AC input types both on not available
- DC system enabled
Show in html5app:
- battery box
- dc loads
- inverter; adjustable mode (on/off/eco)
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
Settings:
- DC system enabled
Show in html5app:
- battery box
- dc loads
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
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
- 2 lynx smart BMS 500A
- Lynx parallel service
- vebus system
Same as LP, but with one BMS in the pending state.
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
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)
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
VE.Bus:
- CurrentlimitIsAdjustable = true.
- Mode is adjustable = true.
Settings:
- AC input type 1 = Shore
- AC input type 2 = Not available
- DC system enabled
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.
-
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 [email protected]
-
Browse to the web application: http://192.168.22.75/app
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 [email protected]: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