Electricity and our Saurer 2DM

This is sort of a never ending story for me – just as the installation of our workshop container on the truck bed by our trusty mechanic which has been “in the making” since October 2022.

It is clear that we want and need electricity in the container. Just how and how much is not clear yet. In the following, I will consider our rquirements and different apsects and constraints of the electrical installation to hopefully come to a conclusion. This is a rather dry article with a lot of numbers – so beware …

Here is what we know (or at least think we know):

  1. The truck has a 24V system
  2. Charging any “leisure” batteries via the truck engine on a regular basis does not seem to be a good idea, as the fuel consumption is already 33l/100km without the container (that makes an astonishing 8.56mpg in the UK)
  3. It is a EURO0 diesel so we will not be able to get into all the cities (regardless of its problematic weight, length, height and width anyway).
  4. Solar panels are still no real option (most of the time too way up in the North)
  5. Charging from an EVSE might not always be possible as most of these EVSEs are for cars and do not have space for trucks
  6. We want to be able to cook and wash in the vehicle
  7. We will have a 2kW diesel heater
  8. We will have a 900W single phase petrol generator
  9. We will be using Eve LF280K cells
  10. The inverter must at least provide 2'250VA or 1'800W (concurrently, but not neccessarily on a single phase)
  11. (optional) We would like to have 3-phase power in the container (as the cabling is already in place) – but also we know we would only use it very seldomly (such as for welding, then we need at least 11A per phase)
  12. We would like to be able to charge 60% of the batteries (from 20% to 80%) within 3h
  13. We will be using Victron MultiPlus-II (as we do not 2 separate AC inputs)

Here is a list of devices needing electricity:

  1. Refrigerator (able to run on 12V DC/24V DC or 230V AC)
  2. Microwave (1'000W)
  3. Water heater (immersion heater with 1'000W or 2'000W and/or kettle with 2'000W)
  4. Table grill (1'250W)
  5. Steam cooker (450W/900W)
  6. Bread baking machine (600W)
  7. Coffee machine (1'150W)
  8. Washing machine (750W)
  9. Water pressuriation system (850W)
  10. Computers peripherals (USB-C charging with 36W via AC or DC, or 60W AC)
  11. Lights (12V or 24V DC)
  12. Water pump (12V or 24V DC)
  13. Fan (12V or 24V DC)
  14. Diesel heater (12V DC)
  15. Starlink (60W AC, possibly 48V DC)
  16. Infrared heating panel (150W AC)
  17. Battery charger (12V/24V DC or 230V AC, depending on model)
  18. Other USB powered and/or chargeable devices (via 12V/24V DC or separate 230V AC charger)
  19. built-in 6t winch (powered by engine)
  20. (optional) electric shower (8'000W)

Sizing the electrical installation comes with a number of additional constraints:

  1. The crane in the workshop garage can lift up to 500kg
    this mean, all batteries, inverters, washine machine and water tanks must be less that weight
  2. No single battery can charge or discharge with more than 140A
  3. We can only charge from EVSEs with a Type 2 connector

A 12V system is very quickly out of the picture (and the largest and only MultiPlus-II with 12V is a 3’000VA system). Besides, the truck has 24V system anyway. So it is either 24V or 48V. Here is an overview of all current 24V and 48V MultiPlus-II models and their charge and discharge values:

MultiPlus-II 24V and 48V

Let’s first evaluate a 24V system:

Combination of 24V batteries and invertes
  1. 1* 8s battery
    • Capacity is likely to be too small
    • Single battery is not redundant
    • 1*3’000VA can draw too much discharge current
    • 1* 5’000VA can draw too much discharge current
  2. 2* 8s battery
    • 2* 3’000VA can draw too much discharge current
    • 1* 5’000VA possible
  3. 3* 8s battery
    • 1-phase charge requirement can only be met with EVSE 7kW 32A Type 2
    • 3* 3’000VA can draw too much discharge current
    • 2* 5’000VA can draw too much discharge current
  4. 4* 8s battery
    • 1-phase charge requirement can only be met with EVSE 7kW 32A Type 2
    • 4* 3’000VA can draw too much discharge current

So, in a 24V 1-phase system only the 5'000VA inverter would be possible with either 2 (14’336Wh) or 4 (28’673Wh) batteries.

For a 3-phase setup to support our Kemppi Kempact 253A we would need at least 4 batteries and 3* 5'000VA inverters.

And now let’s have a look at a 48V system where we have a couple of more inverter options:

Combination of 48V batteries and inverters
  1. 1* 16s battery
    • Single battery is not redundant
    • 2* 3’000VA inverters needed
    • 1* 5’000VA inverter possible
    • 1* 8’000VA can draw too much discharge current
    • 1* 10’000VA can draw too much discharge current
    • 1* 15’000VA can draw too much discharge current
  2. 2* 16s battery
    • 1-phase charge requirement can only be met with EVSE 7kW 32A Type 2
    • 3’000VA not as 3-phase setup feasible (otherwise 6 devices necessary)
    • 8’000VA only as 3-phase setup, but then too heavy
    • 1* 10’000VA possible
    • 1* 15’000VA can draw too much discharge current
  3. 3* 16s battery
    • 1-phase charge requirement cannot be met
    • charge requirement can only be met with 3-phase EVSE (16A or 32A) Type 2 (11kW+)
    • 3’000VA possible, but too heavy with combined battery weight
    • 5’000VA possible
    • 8’000VA only as 3-phase setup, but then too heavy
    • 10’000VA only as 3-phase setup, but then too heavy
    • 15’000VA possible
  4. 4* 16s battery
    • batteries too heavy
    • 1-phase charge requirement cannot be met
    • charge requirement can only be met with 3-phase EVSE (16A or 32A) Type 2 (11kW+)
    • 3’000VA too heavy with combined battery weight
    • 5’000VA too heavy with combined battery weight
    • 8’000VA only as 3-phase setup, but then too heavy
    • 10’000VA only as 3-phase setup, but then too heavy
    • 15’000VA only as 3-phase setup, but then too heavy

So, this leaves us with really 3+2 choices:

  1. 2* 8s (14’336Wh) batteries in a 1-phase system with a single 5’000VA inverter
    • Battery and inverters would weigh roughly 140kg
  2. 2* 8s (14’336Wh) batteries in a 3-phase system with three 5’000VA inverters
    • Battery and inverters would weigh roughly 250kg
    • Not possible for 3-phase welding
  3. 4* 8s (28’672Wh) batteries in a 3-phase system with three 5’000VA inverters
    • Battery and inverters would weigh roughly 310kg
  4. 1* 16s (14’336Wh) battery in a 1-phase system with a single 5’000VA inverter
    • Battery and inverter would weigh roughly 140kg
  5. 2* 16s (28’672Wh) batteries in a 3-phase system with three 5’000VA inverters
    • Battery and inverters would weigh roughly 310kg
    • 3h on a 1-phase 16A Type 2 would charge about 38% (a 60% charge takes 4.7h)

From there, we can narrow this down even further:

  1. 1-phase system: 24V, 2*8s
    • Price: batteries 2* 1’364GBP = 2’728CHF plus inverter 1* 1’359GBP total = 4'087GBP
      • Con: 24V MultiPlus-II are considerably more expensive (than 48V)
      • Con: only have the capacity
      • Con: cannot run electric shower
  2. 3-phase system: 48V, 2* 16s
    • Price: batteries 4* 1’364GBP = 5’456CHF plus inverter 3* 812GBP = 2’436GBP total = 8'802GBP
      • Con: charge requirement can only be met with 32A Type2 on 1-phase
      • Con: additional 48V|24V DC-DC converter required
      • Con: heavier, 300kg+
        Con: higher self-consumption in 3-phase configuration

So – drum roll – my conclusion: for roughly double the money in a 48V we would get double the capacity and triple the charge and output power and pretty much can do everything we want the system to be able to do.

The 3-phase system can be reconfigured to a parallel 1-phase system, so we would even be able to use an electric shower (though very unlikely – we have our mobile shower). We can either charge 1-phase or 3-phase and have a longer window of electric autarky. And for most of the time we would leave the system in a 1-phase single device InverterCharger configuration. And additionally, for charging the other 2 devices would bet set to ChargeOnly (but be configured independently configured from each other).

The exact setup I will have to layout some other time, but right out of my head I would think of the following components:

  1. External power in with CEE 16-5, CEE32-5, CEE32-1, CEE16-1 and Neutrik PowerCON True1 TOP (the more the better)
    connected to an ATS
  2. AC out from MultiPlus-II connected to ATS
  3. Orion-Tr 24V|48V DC-DC converter
    charging from alternator (though not the norm)
  4. Orion-Tr 48V|24V DC-DC converter
    as power supply: to support 24V loads in the container
    as charger: as an emergency charger for the truck batteries
  5. Lynx Power In, Distributor
  6. Venus OS with Raspberry PI for RS-486 and DVCC

So, in case our Saurer ever gets finished – at least I know how to do the electricity …

Building a battery case for an 16s Eve LF280K configuration

The other day, I realised that I never wrote about the case build of our 16s 48V batteries, as I did for the 8s case and the 4s case. So, here it is – and I am actually describing 2 revisions as we made some adjustments.

First, the total weight of the cells alone would be roughly 16 * 5.3kg ~ 85kg. This is way beyond what a single person can – or at least should – lift. So, I deciced to split the battery into 2 separate cell blocks of 8 cells each (similar as I did split the 8s battery in the Toyota HiAce). With this approach, I would be able to:

  • reuse the 8s design (including the RAKO boxes)
  • be able to move or lift half a battery (which weighs roughly 53kg)

This battery has a nominal capacity of 3.2V * 16 * 280Ah = 14'336Wh and can be charged or discharge with up to 140A ^= 7'168W. We currently have 2 of these batteries running on our 3-phase setup with 3 * Victron MultiPlus-II 48/5000/70-50.

So essentially, I built 2 8s batteries with a connection cable between cells 8 and 9. The main negative and the BMS would be in one box and the main positive with the DC breakers would be in the other box. To avoid confusion, in this setup I went for coloured Anderson SB175 housings, with

  • Red
    2 * 35mm2 H07RN-F cable main positive
  • Grey
    2 * 35mm2 H07RN-F cable main negative
  • Blue
    Interconnecting both blocks
    2 * 35mm2 H07RN-F cable connecting from cell 9 positive to cell 8 negative

In all cases

16s Battery Connectors

To connect the cells to the BMS balancer cables I extended the balancer cables with 2.5mm2 wire via WAGO 221-2411 inline splicing connectors. I then measured the increased resistance of the additional cable length and adjusted the values in the BMS configuration for cells 1 to 9.

With these inline connectors I am now able to disconnect the blocks from each other so I can move them around independently, if needed.

On the BMS, I connected a USB RS-485 TTL adapater with a USB extension cable which leads to one of the USB ports of the Victron Cerbo GX. With the help of dbus-serialbattery and BatteryAggregator I can control the DVCC settings in Venus OS.

The rest of the build is, as I already mentioned, pretty much like the 8s build.

Revision 1

Here are some images of the completed build of revision 1.

16s Battery top view
16s Battery Block 1 main negative with BMS
16s Battery Block 2 main positive with DC breaker

Revision 2

These are the changes I am currently making for the next revision:

  • add additional connectors for the balancer cables to further facilitate the disconnection of both blocks;
  • use 16mm2 M6 Klauke DIN46235 compression cable lugs for the connection of the main negative (cell 16) to the B- of the BMS (only relevant to the older JK-BMS), to be able to disconnect and potentionally replace the BMS;
  • use a WAGO 35mm2 DIN rail connector in the main negative block on cell 1/9 for the outgoing cable;
  • use cable glands on the external connections;
    (this allows for easy disconnection and re-building the block as an 8s battery);
  • use ratchet straps for compressing and mounting the cells to enable easier maintainability of the cells;
  • use Anderson PowerPole PP180 connectors instead of SB175, so I can use mounting plates for the PP180 and do not have dangling cables on the outside of the case
    (these connectors are expensive and increase the price of the overall build by roughly 60GBP).

Reverse engineering the BYD Battery-Box Premium LVS CAN Protocol for Victron Venus OS

On my goal, to build a battery with a Venus OS compatible CAN interface I decided to have a look at he BYD CAN protocol – for several reasons:

  1. It is supported with Victron and Venus OS.
  2. I happen to have a BYD Battery-Box Premium LVS dual battery system.
  3. I heard mixed information about the Pylontech CAN protocol implementation.

So, I got myself a Kvaeser Memorator Light, in order to be able to sniff the CAN traffic between a Venus OS and the BYD BMS. For whatever reason, I did not get it to work, so I ended up with candump – which proved to be more that sufficient for what I needed.

Note: of course, before I started reverse engineering the protocol, I made some effort to find resources and someone who might have already done that – but no luck. However, there were some fragments regarding HVS systems. But they did not seem to be compatible with the LVS implementation.

If you are interested in the result, you can head right here. Otherwise, stay with me and I explain my approach to correlate the identifiers and data pieces.

  1. First, I just started candump to check the general message flow and to see some recurring patterns (working/normal operation, UseCase A).
  2. I then verified that the communication (which runs at 500kb/s) only consists of 11bit identifiers and no FD frames.
  3. I then identified the several message ids based on sender (TX, Venus OS) and receiver (RX, BYD).
  4. I then monitored the message flow, when I disconnected the BYB BMS temporarily (UseCase B).
  5. And then I monitored the message flow, when there was no BYD BMS present at start and then powered it on (UseCase C).
  6. Have alarms and warnings being sent by the BYD BMS (UseCase D). (see note below)

Things to consider:

  1. What are the units of the data being sent (e.g. temperature came in Kelvin/K)?
  2. What is the byte ordering (e.g for WORDs expect the low byte first and then the high byte)?
  3. Is there a scaling on the data being sent (e.g. 1/10mV)?
  4. Is information distributed over different messages? Or does one message have a special meaning in correlation to another message? (e.g. cell voltage and temperature)

For most of the parts, I *knew* what data to expect or to look for. I just looked at the BMS device inside the Venus OS and looked for data that matched the information shown on the GUI.

In the end, I identified most of the messages. For alarms and events, I will verify them once I have a working prototype on my ESP32 by simulating and sending them to Venus OS. [Edit: Alarms and Warnings are now identified and described. Events seem to be not supported. With 17 frames/messages I can now setup a complete BYD battery simulation towards a Venus OS.]

Here is a Summary: BYD Battery-Box Premium LVS CAN Protocol. There you find also some image of Venus OS with the correspnding information as shown on the GUI.

Hope you find this useful.

C# .Net on a Raspberry Pi 400 running Venus OS

Today, I tried to run a C# console application on a Venus OS – and it pretty much worked right away. But why would I want to do that?

The answer is simple: a couple of weeks ago I started to add some “drivers” to Venus OS to support additional features like using a MultiPlus-II as a charger for top balancing cells. With Venus OS, most of the examples I found were written in Python (except for some C++ extensions). And it is no secret that I am not too fond of that. So, why not using my favourite programming language on Venus OS as well?

My first thought was, I would have to install the .Net framework on Venus OS. But, with the advent of self-contained (and thus framework-independent) executables this is not needed.

First, I installed .NET on a Raspberry Pi 400 with Raspbian (just for the fun of it). I basically followed Deploy .NET apps on ARM single-board computers:

curl -sSL https://dot.net/v1/dotnet-install.sh | bash /dev/stdin --channel STS

echo 'export DOTNET_ROOT=$HOME/.dotnet' >> ~/.bashrc
echo 'export PATH=$PATH:$HOME/.dotnet' >> ~/.bashrc
source ~/.bashrc

dotnet --version

… and there it is!

And then it was time for another infamous Hello, world!:

dotnet new console -o HelloWorld
cd HelloWorld

And now for the compilation.

dotnet publish --sc -r linux-arm -c Release -p:PublishTrimmed=true

linux-arm was needed, as Venus OS is a 32-bit operating system (regardless of the 64bit architecture of the Pi 400). I chose PublishTrimmed to save some space. And of cource, --sc for self-contained.

I then gzipped the publish folder and copied it to the Venus OS (via WinSCP). After uncompressing the files (with permissions left intact), I ran the program and got this error:

Process terminated. Couldn't find a valid ICU package installed on the system. Please install libicu (or icu-libs) using your package manager and try again. Alternatively you can set the configuration flag System.Globalization.Invariant to true if you want to run with no globalization support. Please see https://aka.ms/dotnet-missing-libicu for more information.

Enabling invariant mode seemed to be the easier choice. After all, my future drivers would hopefully not need globalisation support anyway. So, I recompiled after adjusting the .csproj file:

<PropertyGroup>
    <InvariantGlobalization>true</InvariantGlobalization>
</PropertyGroup>

… and it worked:

root@raspberrypi4:~# publish/HelloWorld
Hello, World!

I executed this on a Raspberry Pi 400 running Venus OS v3.00 and .Net 7.

From there, I wanted to connect to D-Bus which proved to be more difficult. Following the Connecting .NET Core to D-Bus I had to find out that Tmds.DBus.Tool was not compatible with .Net 7. I will have to look into that separately.

Note about IL trimming: the size difference is really noticable. In my example the untrimmed compilation was around 65MB and the trimmed version around 13MB. However, it seemed to me that the trimmed version took slightly longer to load and execute. So, I am not sure if I will keep this switch on.

So, what would be the perceived advantages of using .Net on Venus OS for me?

  1. Known developing environment
  2. Better type safety
  3. Reusability of a lot of basic code
  4. Easier testing and mocking

But this is only my personal opinion and preference. Yours might differ.

Initial setup of a Venus OS on a Raspberry Pi without a wired network connection

When setting up a Raspberry Pi to run Venus OS, the GUI is not available on the local HDMI port – it is running headless by default. However, in order to connect to a Wireless network, we need to access that UI.

As mentioned in the above link, there is a workaround to it: renaming (or removing) the /etc/venus/headless file. This can be done by connecting via the serial port to the PI using the Adafruit USB to TTL serial cable. There is a very thorough article on how to connect to the port.

In short, pin 8 (GPIO14, TX) is white; pin 10 (GPIO15, RX) is green and pin 6 can be used as ground (black) and DO NOT USE the red wire. See here for the actual Pin layout. We can then use Putty to make a connection to the Pi (at 115200bps).

So far, so good. However, when trying to rename the headless file the following error message appears: mv: can't rename 'headless': Read-only file system

As pointed out in Cannot change headless – Read only filesystem on Rasp4 for Venus OS large two options exist:

  1. Make the file system read/write via /opt/victronenergy/swupdate-scripts/remount-rw.sh
  2. Enable superuser access (unfortunately, this requires GUI access – chicken-egg-problem here)

But instead of making the filesystem read-write until the next firmware update, I would rather only temporarily remount via mount -o remount,rw /.

And after that, renaming/removing the headless file succeeds.

Following the next reboot, the file system is then mounted read-only again and the GUI appears on the local HDMI port.

Now we can configure WLAN settings and everything else (such as superuser access) without the need for a wired network.

And in case you are in the need of a very small keyboard / display combination, you can use

Connecting to Wi-Fi with via Bluetooth and Victron Connect

In case you only want to connect to Wi-Fi and do not happen to have a serial cable, but you want to use the Raspberry Pi’s bluetooth connection, you can use Victron Connect to configure wireless network settings.

For this you start up Victron Connect on an Android (or Apple i device, Windows will nork work for that) and discover the Raspberry you want to connect. When pairing with the Pi use 000000 as the pin code.

After that you will find the gear icon in the upper right corner. From there you can select Network settings and connect to your WLAN.

Below you find some screenshots.

Bluetooth connection to Venus OS via Victron Connect
Configure Network settings
Connecting to a WLAN

Enabling WiFi on a Raspberry Pi 400 with Venus OS

When we run Venus OS without any modifications on a Raspberry Pi 400 no WiFi is detected – though the Pi 400 certainly has WiFi onboard.

As it seems, I am not the first one to notice that. bipedalprimate presented a solution by copying a bunch of Raspbian /lib/firmware files to the Venus OS. But as it turns out, things can be achieved much simpler.

It seems, that the driver on the 400 is differs from the chipset of a _regular_ Pi 4: it is the brcmfmac43456.

When looking at the /lib/firmware/brcm folder of a Venus OS these drivers are missing:

Venus OS v3.00 contents of /lib/firmware/brcm

On a Raspberry Pi 400 things look different:

Raspberry Pi 400 Raspbian 6.1.21 contents of /lib/firmware/brcm

As it seems, only a few files are required for a Raspberry Pi 400 and only a few belong to the brcmfmac43456. Most of the files are in fact links to other files (and some are in the cypress directory).

So, I did the following: I copied the brcm and cypress directories to a USB stick and inserted it into the Pi 400. From there I copied the driver files to the respective directories inside /lib/firmware, added some links and adjusted the permissions. Below you see the commands I used.

Note1: I am a novice when it comes to Linux, so pls do not expect any sophisticated shell scripting.

Note2: by default the root file system is _read-only_. Therefore I re-mounted it as read-write (so, maybe our changes will not survive a firmware update).

Note3: my USB stick was mounted as /run/media/sda1. Yours might be different.

mount -o remount,rw /
cd /lib/firmware/cypress
cp /run/media/sda1/cypress/cyfmac4356* .
chmod 644 cyfmac4356*
cd /lib/firmware/brcm
cp /run/media/sda1/brcm/brcmfmac4356-pcie.gpd-win-pocket.txt .
chmod 644 brcmfmac4356-pcie.gpd-win-pocket.txt
ln ../cypress/cyfmac4356-pcie.bin brcmfmac4356-pcie.bin
chmod 777 brcmfmac4356-pcie.bin
ln ../cypress/cyfmac4356-pcie.clm_blob brcmfmac4356-pcie.clm_blob
chmod 777 brcmfmac4356-pcie.clm_blob
ln ../cypress/cyfmac4356-sdio.bin brcmfmac4356-sdio.bin
chmod 777 brcmfmac4356-sdio.bin
ln ../cypress/cyfmac4356-sdio.clm_blob brcmfmac4356-sdio.clm_blob
chmod 777 brcmfmac4356-sdio.clm_blob
ln brcmfmac4356-sdio.AP6356S.txt brcmfmac4356-sdio.khadas,vim2.txt
chmod 777 brcmfmac4356-sdio.khadas,vim2.txt
ln brcmfmac4356-sdio.AP6356S.txt brcmfmac4356-sdio.vamrs,rock960.txt
chmod 777 brcmfmac4356-sdio.vamrs,rock960.txt
cp /run/media/sda1/brcm/brcmfmac43456-sdio.bin .
chmod 644 brcmfmac43456-sdio.bin
cp /run/media/sda1/brcm/brcmfmac43456-sdio.clm_blob .
chmod 644 brcmfmac43456-sdio.clm_blob
cp /run/media/sda1/brcm/brcmfmac43456-sdio.txt .
chmod 644 brcmfmac43456-sdio.txt
ln brcmfmac43456-sdio.bin brcmfmac43456-sdio.raspberrypi,400.bin
chmod 777 brcmfmac43456-sdio.raspberrypi,400.bin
ln brcmfmac43456-sdio.clm_blob brcmfmac43456-sdio.raspberrypi,400.clm_blob
chmod 777 brcmfmac43456-sdio.raspberrypi,400.clm_blob
ln brcmfmac43456-sdio.txt brcmfmac43456-sdio.raspberrypi,400.txt
chmod 777 brcmfmac43456-sdio.raspberrypi,400.txt
mount -o remount,ro /
Commands necessary to enable WLAN support on Raspberry Pi 400 for Venus OS v3.00

Two brcm-links are giving errors, but this can be ignored. The links on the Raspbian are not working either.

After copying the files both directories looked like this:

Venus OS v3.00 firmware brcm and cypress folder after adding the driver files

After a reboot I could browse and connect to my SSID via Settings, Wi-Fi:

Wi-Fi networks visible after a reboot
Established connection to a Wi-Fi network

And from the serial console, ifconfig also showed our new interface:

Venus OS recognising the Raspberry Pi 400 WiFi interface

Now, the Raspberry Pi 400 can be used like any other Pi with Venus OS.

Thanks again to bipedalprimate for pointing me in the right direction!

Using a Raspberry PI 2 Model B 1GB as a Victron GX device running Venus OS v3.00

Along with some others I am waiting for Raspberry PIs to become available again (while *not* supporting these overpriced resellers on eBay, Amazon and elsewhere).

Luckily, back in 2016 (or was it 2015?) I bought two Raspberry PI2 Model B Rev. 1.1 with 1 GB RAM and an Edimax EW-7811Un WLAN adapter. At that time the PI did not have built-in WLAN and it was said that the original Wifi dongle Raspberry Pi WLU6331 did not work with all distributions.

We had some plans what to do with the Pi – but they never made it into reality. Instead, they went into the locker.

Edimax EW-7811Un WLAN adapter

Fast forward into the future, the whole world experiences stock supply shortages and a Raspberry Pi (now in its 4th generation) is hard to get hold of.

As I am building a couple of batteries mostly with JK-BMS I need a RS-485 connection to my Victron inverters to control charge and discharge currents. Except for the GX versions of the MultiPlus-II and EasySolar-II that _sort of_ support RS-485 (not out-of-the-box, but) in a single box, I always need an additional device like a Cerbo, BBB or: a Raspberry Pi!

But as I already wrote: I did not want to support resellers with their pharmacy pricing, so I had a look at the Venus OS compatibility list and saw that – surprisingly – even a Pi 2 is supported. So, I went looking in my shelves, lockers and other places to find these rusty old Pi 2s – and after a couple of weeks I actually found them (when I was looking for something completely different). Anyway, here they are – but only with a single GB of RAM.

Nostalgic side note: yes, there were times where I would have left out the word “only” …

I was not to sure if Venus OS would run on it. And if – how quick. It was time to find out …

Installation was straight forward: following Getting Started was all it needed. I connected the Pi to my local wired network for that purpose and makes updating and installing software much easier. At the very start I also enabled superuser and SSH access.

Note: There was a minor issue or whatever one might call it. After the install of v3.00 (via the SD card) I had the device check for an update (which at that time should not have been available). But for whatever reason, I was offered to update from v3.00 to v3.00. I did that and it worked and after that no more updates were recommended.

From then on, installing additional packages worked without an issue – but took considerably longer than on a Cerbo, Pi 4 or even the GX in the EasySolar.

One thing just seemed to be missing. Having the Pi to act as a Wifi access point (and router with DNS and DHCP). Why would I want this?

Some of my batteries are just standalone installations in a car, trailer or other machinery. And external network is not always available. And I do appreciate the comfort of wirelessly connecting to the GX – just as I am used to when using my EasySolar-II GX.

And as nearly always: I was not the first one to ask for such a feature:

Victron themselves, apparently, have no plans for supporting this feature.

Luckily, pagedo did all the hard work and gave a step-by-step description on how to enable a Wifi access point. And that worked on the Pi 2 as well.

Essentially, we have to enable Wifi, activate tethering and modify the config file:

$> connmanctl enable wifi
$> connmanctl tether wifi on <SsidName> <SsidPassword>
$> connmanctl technologies
$> nano /etc/connman/main.conf
  TetheringTechnologies = wifi
  PersistentTetheringMode = true
  AddressConflictDetection = true

After a reboot, I could successfully connect to the access point and VictronConnect immediately found the “Cerbo”:

Raspberry Pi 2 Model B Rev. 1.1 as a Victron GX device while acting as an access point

After I enabled the access point (or tether option) I could no longer see or access any other SSIDs from the Pi:

WLAN client is deactivated when running an access point

Running ifconfig gave me this output:

ifconfig output after enabling the access point

Certainly, I was interested in the performance or resource consumption of the Pi 2. As it turned out, the UI really took some CPU but the additional network services themselves were not quite as hungry: idle floats between 71% and 92%.

Pi 2 running with a RS-485 adapter and enabled access point

So, this is it. My investment of roughly 35$ in 2016 (even with intereste rate) really paid off. I have a working GX device that does everything I want – plus an access point – all in a single box.

Pi 2 running with dbus-serialbattery, BatteryAggregator and access point