question

rmaddy avatar image
rmaddy asked

Can I be notified if I left my inverter on after 11:00pm?

I'm living in a camper full time. I have no need to run my inverter at night. I usually remember to turn it off if needed but sometimes I forget. I'd like to maximize my battery, especially this time of year with low solar yield in the northern hemisphere.

I have a MultiPlus connected to a Raspberry Pi running VenusOS.

Is there any way to set some sort of alarm/reminder to go off at a preset time (say 11:00pm) if the inverter is not set to Off? And by Off, I mean in the VenusOS UI, not the physical switch on the MultiPlus.

I'm not afraid to make customizations if that's what it takes. I just need to be pointed in the right direction.

Venus OSmultiple invertersalarm
2 |3000

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

3 Answers
Kevin Windrem avatar image
Kevin Windrem answered ·

You could use cron to run a script that sends a dbus command to turn off the inverter.

The following commands can be put in a shell script and executed from cron.

inverterService=$(dbus -y com.victronenergy.system /VebusService GetValue | sed s/\'//g)
dbus -y $inverterService /Mode SetValue 4


4 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.

rmaddy avatar image rmaddy commented ·

Shortly after posting my question I considered adding a cron job that would check if the inverter was running. I just didn't know the command to do the check and turn off the inverter. I'll play around with this. Thank you very much.

0 Likes 0 ·
rmaddy avatar image rmaddy commented ·

I set this up with a cron job a few days ago and I didn't think it worked because the inverter didn't shut off at the time I set. I know the code you gave me worked because when I ran my script manually the inverter turned off. So I assumed I messed up the cron entry. But oddly, the next day when I tried to ssh into my RPi I am unable to connect. Attempts to ping fail as well. Really odd that I would have network issues the day after setting up the cron job to turn off the inverter. I can't see how they could be related. But at least I have figured out that my cron job is working but it runs based on UTC time, not my local time. That's easy to resolve if I can figure out why I can't connect any more even though my RPi is connected to my WiFi as usual.


Anyway, thanks for the help.

0 Likes 0 ·
Kevin Windrem avatar image Kevin Windrem rmaddy commented ·
FYI, the unix time zone (which cron uses) is set independently from the time zone set in the GUI's menu. Google unix time zone for ways to set it to your local time. Many won't work on Venus OS because the utilities aren't available. I seem to remember using an environment variable to set mine.


When you lost the ability to communicate via ssh, did the GUI on a local display continue to function?

Did you attempt a reboot?

It would be worth repeating the experiment.

0 Likes 0 ·
rmaddy avatar image rmaddy Kevin Windrem commented ·
I simply forgot that the TZ was defaulted to UTC at the time I setup the cron job. I have it fixed now. After my last comment I was finally able to connect via ssh after a couple of failed attempts. It seems the WiFi connection for my RPi has been a bit intermittent lately. It's just a coincidence that is started getting flakey about the same time I tried to tackle this little task. Thanks again.
0 Likes 0 ·
jkmann avatar image
jkmann answered ·

You can certainly set up an alarm using software ... but not to be flippant ... the traditional method for reminding an operator that a system is on is an indicator light. An indicator light powered by the 120V line would be a very simple way to remind yourself. You can find an indicator light that draws about 4 to 8 mA, so it won't appreciably draw down your battery, but it would be clearly visible when you turn off your other lights.

1 comment
2 |3000

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

rmaddy avatar image rmaddy commented ·

Thanks for the idea but adding a physical light is vastly more complicated (at least for me and my setup) than tweaking some software. Besides, I already have a very bright light I can use - the screen to my Raspberry Pi.

0 Likes 0 ·
david-ross avatar image
david-ross answered ·

Node Red in the Venus OS Large package is a perfect solution for things like this.

2 |3000

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

Related Resources

Victron Venus OS Open Source intro page

Venus OS GitHub (please do not post to this)

Additional resources still need to be added for this topic