Victron Solar Info Overlay on BI

tfreitas

n3wb
Joined
Jul 29, 2020
Messages
3
Reaction score
4
Location
California
Hi Everyone,

We have some solar sites where we have cameras and we are wanting to display the battery and solar information as an overlay on the camera. I was thinking that BIT (Blue Iris Tools) might be the job for this, but then I saw that the Victron Controller support MQTT and thought this might be a better way to get the info. I'm not a programmer so writing something to pull this info might not be the job for me. Has anyone done something like this and have any insights as to how one might accomplish this? Thanks in advance for any assistance!

I was able to pull some info via the cli on the RaspberryPI we have monitoring the controller
1671115446263.png


I am also able to access the WebUI for the VenusOS PI that displays the info as well
1671115678722.png


I did test in BI that it can communicate with the MQTT server on the VenusOS PI as well. Just not sure if this is really for alerts or if BI can pull info from the MQTT subscription to the VenusOS Pi?
1671115611150.png
 

bp2008

Staff member
Joined
Mar 10, 2014
Messages
12,676
Reaction score
14,024
Location
USA
It would require 3rd-party software to get the desired values from the MQTT broker and save them to a text file (or files) on the Blue Iris machine. I'm not aware of any software that does this, but you may be able to find something if you look hard enough. Then Blue Iris Settings > Macros has the capability of loading text files into macro strings that you can use in text overlays.

Although Blue Iris's interface only exposes 9 macro slots, there are actually 999 slots available if you assign values via HTTP web server command: /admin?macro=x&text={text} Set macro number x=1-999 to value {text}
 

tfreitas

n3wb
Joined
Jul 29, 2020
Messages
3
Reaction score
4
Location
California
So that's what I ended up doing. Below is how I accomplished it for now and I'm sorta happy with it.

1. Setup a password-less ssh login on the windows computer
2. Copied the public key over to the Raspberry PI
3. Hacked together a VERY basic script that would query the VenusOS and only return the value needed and placed it in the home directory
Code:
#!/bin/sh
dbus -y com.victronenergy.solarcharger.ttyUSB0 /Dc/0/Voltage GetText | awk '{for (I=1;I<NF;I++) if ($I == "=") print $(I+1)}'
4. Made a batch file on the windows computer that will ssh over to the pi, execute the command and then output it to a text file
Code:
ssh username@1.2.3.4 'get_voltage.sh' > voltage_value.txt
5. Set the %1 macro value in Blue Iris Tools to = file:/C:\Users\<username>\voltage_value.txt
6. Updated the camera overlay and added a text field with Battery Voltage: %1

... and the results are below. Now I just need to add the additional values like Battery Current, PV Voltage, PV Current.

1671125044802.png
 
Top