article

Ole Saether avatar image
Ole Saether posted

Service to turn Multiplus on/off via digital input

EDIT: Edited for Venus v3.0x. See below

A frequent requested feature of mine (and others on forums discussing off gird systems) is a means to turn on or off the MultiPlus with a switch. With a stand-alone Multiplus you can connect an external switch but when the Multiplus is connected to a CCGX or VGX the external switch does not work and you have to dig deep into the remote console to turn the Multiplus on/off.

I have created a service that monitors a digital input and when it goes from high to low it turns the Multiplus ON if is is OFF and OFF if it is ON.

I had to create a new digital input type: #12, "Inverter control".

Below is a link to the python service repository. Patches for the gui-files and dbus-digitalinputs service can be found in the "diffs" folder. Under releases there are prebuilt installers for Venus GX and Raspberry PI.

https://github.com/osaether/dbus-inverter-ctrl.git

For those of you that want to build it, here is the Bitbake recipe with instructions:

https://github.com/osaether/meta-dbus-inverter-ctrl

Use at your own risk!

Ole

cerbo gxVenus GX - VGXRaspberry Pi
66 comments
2 |3000

Up to 8 attachments (including images) can be used with a maximum of 190.8 MiB each and 286.6 MiB total.

Ole Saether avatar image Ole Saether commented ·

Tried this on 2.30~39 today and it does not work as expected. I get python errors when writing to the dbus so there must have been a change in dbus lately. I will get back when I have figured it out.

0 Likes 0 ·
Show more comments
Ole Saether avatar image Ole Saether commented ·

I tried it out his weekend and it works very well. See video below. This feature is most useful for off-grid systems where the zero load power of the inverter will drain the batteries in the winter months where we have no or very little sun.

Your browser does not support HTML5 video.

0 Likes 0 ·
Show more comments
Rune Eilertsen avatar image Rune Eilertsen commented ·

If was on when input is high, and inverter off when input is low would help more.

Because else you need som feedback to know if you turn the inverter on or off.

Then also bms and other security switch would benefit as well.

0 Likes 0 ·
Show more comments
espen avatar image espen commented ·

Hi Ole,

This is a long awaited feature. Unfortunately, I don't get it to work.

On “Digital Input 1”, when I select “Inverter Control”, it goes back to “Disabled”.

The service “dbus-inverter-ctrl” is up and running, and the Multiplus is on tty05.

(My push-button on the digital input 1 is also confirmed to work, as when input1 is set to pulse-meter it counts the pulses.)

/Espen

0 Likes 0 ·
Show more comments
vicrvusr avatar image vicrvusr commented ·

Hi, I'd like to install this on an rpi running venus os. I found out the image hasn't been made for the rpi. I'm lost as to how to go about building or manually installing it. I can manually edit the patches in easily enough, but don't know where to go from there. Please be kind to me as I'm pretty new at Yocto and the Victron-specific stuff.

Thanks in advance for any help, this will help my WAF of my install with the Multiplus greatly!.

0 Likes 0 ·
Show more comments
espen avatar image espen commented ·

Hi Ole,

I did see in your release notes that you removed "inverter control" from the mainpage. (over to service?)

But I have it still on the main page.

0 Likes 0 ·
Show more comments
Ole Saether avatar image Ole Saether commented ·

This service does not work with Venus v2.30~50. I don't know why yet. Reverting back to Venus 2.30~47 and it works. We need to wait for the ~50 release notes from @mvader (Victron Energy Staff) to see if there is a change related to this. Maybe they changed how the digital inputs work?

0 Likes 0 ·
Show more comments
kvittern avatar image kvittern commented ·

Hello,

Is this still working with Venus OS 2.60.

Installed it successfully, but when I’ll try to choose inverter under digital input, it reverts back to disable. I also tried to do the change to the settings.xml file (0-10) as described in an other comment here.

Any idea?


Regards Rune

0 Likes 0 ·
Show more comments
bathnm avatar image bathnm commented ·

@osaether, Can I ask a couple of questions on this. Is this designed to be be used with a MOM switch connected to the digital input or an on/off switch?

Looking at your code the last change you made was to the line

if int(value["Value"])==3:

You changed the value from 3 to 2. What does teh value 2 mean?

0 Likes 0 ·
Show more comments
espen avatar image espen commented ·

Hi Ole,

Have you tried to do the same thing with node red?

0 Likes 0 ·
Show more comments
huit avatar image huit commented ·

Just commenting to say I got this working on a cerbo gx. I replaced two references to the inverter device in the dbus_inverter_ctrl.py file.

"com.victronenergy.vebus.ttyO5" => "com.victronenergy.vebus.ttyS4"

I just ran the raspberry pi (cortex A7) installer and modified the copy that gets installed into /opt/victronenergy/. It would be handy to have a custom installer but i haven't used bitbake before so this will do for now.

Thanks @osaether for sharing!

0 Likes 0 ·
Show more comments
bigbadbob76 avatar image bigbadbob76 commented ·

Hi Osaether.

This looks like it would help me in a project to improve solar priority.

I have been trying to get venus (on a pi) to switch inverter mode based on solar charger state.

Your service should help me there I think.

Thanks for your work.

Bob.

0 Likes 0 ·
joe-d avatar image joe-d commented ·

Hello everyone, I had this service working but after updating my Venus GX OS to v2.82, and now when I attempt to re-install the ipk, I get the following error shown below.

Does anyone know how to correct this?

Thanks for any help

Joe

-------------------

root@beaglebone:~# opkg install dbus-inverter-ctrl_0.8-r0_cortexa8hf-neon.ipk

Collected errors:

* Solver encountered 1 problem(s):

* Problem 1/1:

* - nothing provides python-dbus needed by dbus-inverter-ctrl-0.8-r0.cortexa8hf-neon

*

* Solution 1:

* - do not ask to install dbus-inverter-ctrl-0.8-r0.cortexa8hf-neon

root@beaglebone:~#

0 Likes 0 ·
Ole Saether avatar image Ole Saether commented ·

Hello!
Today I updated the repo for Venus v3.0. Installers for Venus GX and Raspberry PI 2 under Releases in the repo above (please star the repo if you like it :-)

I have also created a repository with the Bitbake recipe in case you want to create an installer for different hardware:
https://github.com/osaether/meta-dbus-inverter-ctrl

0 Likes 0 ·

Article

Contributors

_OS_ contributed to this article