Skip to content

install venus packages on Debian

Steffen Möller edited this page Aug 27, 2023 · 22 revisions

Introduction

A subset of the Venus software is available for direct installation on Debian (and derived, Raspbian). This allows support for the following products:

  • USB/Serial GPS
  • VEDirect MPPTs
  • BMV 700/702 battery monitors

Make sure you the version of the OS that you are installing these packages on, matches the one which we built them for. At the moment of writing this documentation they are built for Buster.

Installing on a different release then the one they were built for (like installing on Jessie while we built for Buster will likely cause problems!

Lastly, note that the alternative, installing/running Venus OS completely on a RaspberryPi, is often easier. More people do that, and its also better supported. Documentation about that is here: raspberrypi install Venus image.

Support

These packages are available AS IS and are not supported by Victron. For any questions or issues, use the Modifications section on Community.

Candidate vs release

There are two different feeds available: candidate and release. More information about that elsewhere. Here are the urls of the packages:

https://updates.victronenergy.com/feeds/venus/release/packages/ https://updates.victronenergy.com/feeds/venus/candidate/packages/

Typically there are three subfolders:

  1. debian-buster: .deb files for Debian
  2. raspbian-buster: .deb files for Raspbian
  3. dunfell: .ipk files for Venus OS itself

In case the debian and raspbian folders are missing, then thats usually because there was some issue with building the packages. And, since its least important, we then sometimes disable building them. Rather than delaying a Venus OS release to first fix these packages.

Below instructions refer to the release feed. Change all URLs below to candidate if so required.

Installation

These steps document the process to install packages on Debian (armhf).

Note: these were written back in the days when it was for Jessie. And todays version is for Buster

Preliminary preparation

All the steps below assume that you are root. If not, you need to use sudo to become root:

sudo -i

Then configure apt by adding a stub in sources.list.d.

Debian:

echo "deb [trusted=yes] https://updates.victronenergy.com/feeds/venus/release/packages/debian-jessie jessie main" > /etc/apt/sources.list.d/victronenergy.list

Raspbian:

echo "deb [trusted=yes] https://updates.victronenergy.com/feeds/venus/release/packages/raspbian-jessie jessie main" > /etc/apt/sources.list.d/victronenergy.list

Thereafter:

apt-get update

Installing and configuring vrmlogger

/data is used for permanent storage in venus (which is kept even after completely reflashing the device.) Since there is no equivalent for that in Debian, just create normal directories:

mkdir -p /data/{conf,db}

Install vrmlogger and its dependencies:

apt-get install vrmlogger

Configuring HTTPS logging

By default vrmlogger is configured to use https for logging data to VRM. This will fail unless you install the CA certificate required to verify the VRM site. Two options are available to resolve this.

Disable https logging

Using https is preferred but you can disable the use of https with this command.

dbus-send --print-reply --system --dest=com.victronenergy.settings /Settings/Vrmlogger/HttpsEnabled com.victronenergy.BusItem.SetValue variant:int32:0

Add the required CA certificate

Copy the content below into a file named /usr/local/share/ca-certificates/ccgx-ca.crt:

-----BEGIN CERTIFICATE-----
MIIECTCCAvGgAwIBAgIJAM+t3iC8ybEHMA0GCSqGSIb3DQEBCwUAMIGZMQswCQYD
VQQGEwJOTDESMBAGA1UECAwJR3JvbmluZ2VuMRIwEAYDVQQHDAlHcm9uaW5nZW4x
HDAaBgNVBAoME1ZpY3Ryb24gRW5lcmd5IEIuVi4xIzAhBgNVBAsMGkNDR1ggQ2Vy
dGlmaWNhdGUgQXV0aG9yaXR5MR8wHQYJKoZIhvcNAQkBFhBzeXNhZG1pbkB5dGVj
Lm5sMCAXDTE0MDkxNzExNTQxOVoYDzIxMTQwODI0MTE1NDE5WjCBmTELMAkGA1UE
BhMCTkwxEjAQBgNVBAgMCUdyb25pbmdlbjESMBAGA1UEBwwJR3JvbmluZ2VuMRww
GgYDVQQKDBNWaWN0cm9uIEVuZXJneSBCLlYuMSMwIQYDVQQLDBpDQ0dYIENlcnRp
ZmljYXRlIEF1dGhvcml0eTEfMB0GCSqGSIb3DQEJARYQc3lzYWRtaW5AeXRlYy5u
bDCCASIwDQYJKoZIhvcNAQEBBQADggEPADCCAQoCggEBAKVdbAUAElbX+Sh0FATX
yhlJ6zqYMHbqCXawgsOe09zHynDCT4GTXuSuoH2kR/1jE8zvWNLHORXa/eahzWJP
V4WpXuYsFEyU3r8hxA6y+SR06IT7WHdfN6LXN+qt5KLQbmQLxeb1zElMKW4io/WE
N+SWpo5dklXAS6vnq+VRTNwRYnPOUIXKduhvTQp6hEHnLBjYC/Ot8SkC8KtL88cW
pH6d7UmeW3333/vNMEMOTLWlOWrR30P6R+gTjbvzasaB6tlcYqW+jO1YDlBwhSEV
4As4ziQysuy4qvm41KY/o4Q6P6npsh8MaZuRmi/UTxU2DHAbs/on7qaRi6IkVgvg
o6kCAwEAAaNQME4wHQYDVR0OBBYEFPjmM5NYXMw7Wc/TgbLtwPnMAfewMB8GA1Ud
IwQYMBaAFPjmM5NYXMw7Wc/TgbLtwPnMAfewMAwGA1UdEwQFMAMBAf8wDQYJKoZI
hvcNAQELBQADggEBAEFTeGcmxzzXJIfgUrfKLki+hi2mR9g7qomvw6IB1JQHefIw
iKXe14gdp0ytjYL6QoTeEbS2A8VI2FvSbusAzn0JqXdZI+Gwt/CuH0XH40QHpaQ5
UAB5d7EGvbB2op7AA/IyR5TwF/cDb1fRbTaTmwDOIo3kuFGEyNCc+PFrN2MvtPHn
hHH7fo7joY7mUKdP573bJXFsLwZxlqiycJreroLPFqYwgChaMTStQ71rP5i1eGtg
ealQ7kPVtlHmX89tCkfkK77ojm48qgl4gwsI01SikstaPP9fr4ck+U/qIKhSg+Bg
nc9OImY9ubQxe+/GQP4KFme2PPqthEWys7ut2HM=
-----END CERTIFICATE-----

Then run:

update-ca-certificates

Register on the VRM site

Finally, register on the VRM site, and then Add a site. The VRM Portal ID for your Raspberry Pi is the hardware address of the ethernet interface, which you may obtain by running this command:

ip link ls dev eth0 | grep ether | awk '{print $2}' | sed 's/://g'

This should return a 12-digit hexadecimal number that looks like this b827eb010101.

Configure vedirect-interface (optional)

If you have equipment that use the VE.Direct serial protocol -- such as a BMV or MPPT charge controller -- you need to configure an instance of vedirect_interface for each one.

First, do a listing of the files in /dev/serial/by-id, eg:

# ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Jul 14 14:36 usb-VictronEnergy_BV_VE_Direct_cable_VE9MRFG-if00-port0 -> ../../ttyUSB0

Next you have make a copy of the vedirect skeleton service and customise it for your device.

mkdir /data/services
cp -r /opt/victronenergy/vedirect-interface/service /data/services/vedirect00
rm /data/services/vedirect00/down
rm /data/services/vedirect00/log/down

Edit /data/services/vedirect00/run and replace the content with this, also replacing ttyUSB0 with the relevant port:

#!/bin/sh
exec 2>&1
exec /opt/victronenergy/vedirect-interface/vedirect-dbus -v --log-before 25 --log-after 25 -t30 --banner -s /dev/ttyUSB0

Next edit /data/services/vedirect00/log/run and change the log directory to match our service name (vedirect00). It will look something like this:

#!/bin/sh
exec 2>&1
exec multilog t s99999 n8 /var/log/vedirect00

Now link the service into /etc/service/:

ln -s /data/services/vedirect00 /etc/service/vedirect00

This should automatically start it up. Check that it came up:

svstat /etc/service/vedirect00

Do the same for the logging process:

svstat /etc/service/vedirect00/log

If you have more than one vedirect device, repeat the process using different service names, such as vedirect01 and so forth.

Configure vebus-interface (optional)

This is the data producer that reads from the vebus, using the mk3-usb. Its predecessor, the mk2-usb is not supported.

apt-get install mk2-dbus

Once again, do a listing of the files in /dev/serial/by-id, eg:

# ls -l /dev/serial/by-id/
total 0
lrwxrwxrwx 1 root root 13 Jul 14 15:07 usb-VICTRONENERGY_MK2USB_COM_Interface_FTWADOJM-if00-port0 -> ../../ttyUSB1

Then edit /etc/service/vebus-interface/run and replace TTY_DEV with the symlink (no readlink required here):

#!/bin/sh
exec 2>&1
exec /opt/victronenergy/vebus-interface/start-vebus.sh /dev/ttyUSB1

Bring it up and check that it came up:

rm /etc/service/vebus-interface/down
svc -u /etc/service/vebus-interface
svstat /etc/service/vebus-interface
rm /etc/service/vebus-interface/log/down
svc -u /etc/service/vebus-interface/log
svstat /etc/service/vebus-interface/log

Other packages

A list of available packages can be obtained with:

 grep -e "^Package:" /var/lib/apt/lists/updates.victronenergy.com_feeds_venus_release_packages_raspbian-jessie_dists_jessie_main_binary-armhf_Packages
Clone this wiki locally