Quick inverter on off switch

Hi everyone, I’m new to victron but have been building with Arduino for years.

My partner and I just moved into our new van and our Victor on touch screen is on the opposite side to our induction stove.

I would love to add a switch to turn on and off the inverter quickly.

At the moment we are using the new UI

But it has a few problems.

  1. It takes 5 clicks to turn on the inverter. (Tap to wake, tap top right icon, tap mode, tap inverter, tap set)
  2. Sometimes this doesn’t actually turn on our inverter and a few seconds later the interface resets to the previous value. (Weird)

I’m open to a few solutions.

First, I would like to suggest / add my vote to a feature request.

  • single tap Inverter On/Off button on the “brief” or “overview” screen.

2nd I have read about a remote on/off port on the multiplus 2. It looks like I can replace a jumper wire with a little 12 volt wireless relay. https://a.aliexpress.com/_msOdCJR

Has anyone done something link this before? Anything I should know?

Third, I am open to anyone else’s creative solutions

Looking forward to hearing from you!

I would have a button on a digital input that then triggers a node red flow to switch it off.

In some installs depending on the programming and set up, the on off switch does not work. Are you in a mobile application its not that clear from your description.

Also there is a control panel called the DMC that has the quick features for mobile application.

There used to be an extra page you could enable the boat and motor homeone. I will confess i haven’t tried it in the new GUI.

1 Like

That boat page was actually close as it only took 2 clicks to turn it on. Unfortunately, that feature seems to be gone in the new UI.

Could you please explain "have a button on a digital input that then triggers a node red flow to switch it off”
This sounds great!

Are you familiar with node red?

Thought of another one.

Wire the switch to the aux input and use the safety switch assistant.

Just googled Node-red. It looks like I could automate a lot with just a raspberry pie and some configuration.

I also googled the assistant but don’t quite understand it yet.

I’m very interested to learn more. I have years of experience with Arduino but have only had a few days with a victron system.

I think I am missing some context on what is possible so please feel free to include more information on your answers until I get up to speed.

Also if you have any suggestions on what I should read/watch to bring myself up to speed that would be awesome!

You can run ve config in demo mode and run the safety assistant wizard thats easy enough. The wiring is simple too.

Node red takes a bit more trial and error. It can run natively on the GX itself. (Using venus os large) And has the advantage of alot of built in nodes specific to victron environment.

There are quite a few you tube videos, stuff on Git, and here on the forum. With even a copy paste possiblity if you find the right thread.

1 Like

That’s is awesome!

Just got node red working!

This is awesome. I was on the phone to the guy who built my system last week and he implied this stuff wasn’t possible!

Now I learn it’s practically built in :smiley:

The first two flows I have planned are

  1. WHEN a digital input changes THEN toggle the inverter on/off
  2. WHEN the inverter is on but max load has been less then 20W in the past hour THEN turn off inverter

Please feel free to keep the wisdom coming. I feel like I am learning very quickly! :smiley:

1 Like

You know it. There is a whole world of automation waiting there.

If is get a chance to play later i will or at least look for the flow i had for a digital input

There is also a customisable node if you don’t find what you want.

Some installers prefer to keep to what they know. And thats ok.

I am sure you have got it in hand.

This will get you started. Testing something that turns the inverter on/off is not good for a live system, but the outputs seem to work here. If you set the digital input to generic I/O and use a toggle switch to pull the input to ground, this flow will adjust the output based on an input changing the switch position. JSON code is in the text file.

ON OFF DIGITAL INPUT.txt (6.7 KB)

1 Like

This one still needs some work. I am writing a variable inverter power and checking the average over 10sec and it seems to work. I am also checking the average over 1hr to see if it’s under 20W. I also have a reset counter if it goes over 200W. You should be able to finish this off. It also checks the switch position, and if it’s off, it won’t run. All the math and filters seem to work well. Just replace the random power node with the actual MultiPlus power and connect the MultiPlus switch output like the toggle flow.

TURN INVERTER OFF IF POWER IS TOO LOW.txt (9.7 KB)

Make sure to put a “Block unless value changes” Filter node in front of the Multiplus control node you’re using to turn it Off or On, otherwise you’ll get weird ■■■■ if you write the same value to it over & over again (with the timestamp node).

While turning the Multi On and Off in software looks great, if possible I’d advise to use the “Remote” contact instead.
A glitch in your flow could cause the Multi not to turn on again - and a basic dry contact is as foolproof as it gets.

There are filters in the function. The one that checks the average power first checks if it’s on or off. If it’s off, it will not run. If it is on, it checks the average power over 1HR, and if it’s below 20W turns it off. Once it’s off, it will be blocked because it checks to see if it’s on or off.

It’s not finished, but the math is good, and logic seems to be working. I’m just unable to shut down my MultiPlus to test it.

The switch just looks for a change in the digital input. The only input is the pull to ground from a momentary switch.

Bart, Can you tell me more about this?

I heard that the ‘remote’ contact meant that it can no longer be controlled by the screen/app/or VRM. For this reason, I thought a software approach was better.

Wow Owen, Thanks! This is great I will have a play this afternoon.

If you want to use logic control, the dry contact should be treated as a manual override for emergencies only. You’re correct that the logic won’t work if the dry contact is open. I wasn’t able to fully test the second flow with the counter, it was a bit tricky to get right, but the logic does appear to work.

If you want both the dry contact and logic running together, you’d need to insert a relay that Node-RED can control. However, that would compromise the purpose of the dry contact as a safe emergency shutdown, so it’s not recommended.

If you have some development experience, you should be able to follow how the functions are structured and adapt them as needed.

Absolutely, NR’s nice stuff well addictive, like fishing.
Only thing is, you’ve got to know what you’re doing and when to stop, especially with installing third-party modules or system update, otherwise you’ll end up posting another “Node-RED - everything’s gone, help!” thread. :joy:

I haven’t tested that yet but it’s a possibility, I suspect the ‘remote’ contact to take absolute priority.
So when the contact is open (turning the Multi off) you probably can’t force it to “ON” via VRM or GX.
But if you can control the relay that sets the ‘remote’ contact through the screen/GX/VRM, is that really an issue ?

I’ve encountered a few rare cases where a Multi was in software off and didn’t respond to a software On command from Node Red.
I had to turn it on via the GX / VRM or even reset the VE.Bus or the entire GX to get control over the Multi again.
Pretty certain that this was due to conflicting sequences in my Node Red flow (haven’t encountered them since my last flow update) but still annoying.

1 Like

Hi Team, I would love your feedback on this flow. I learnt a lot reading Owens’ flows but wanted to make something simpler so I could maintain it.

That being said, it’s amazing how these balloon quickly.

Inverter Auto Off V2.txt (10.4 KB)

The idea is simple.

  1. WHEN the inverter is not already off,
  2. check if the multiplus current every 5 seconds
  3. IF >30W then reset the timer (Aka store now())
  4. ELSE IF > 1 hour since storing the timestamp THEN turn off Multiplus.

There are a few things I am unsure about. And GPT was very confident but not necessarily right :joy:
Question 1: Let me know if I have made any taboos or rukie errors.
Question 2: Is there a better way to check if the multiplus is on? (Storing in a global variable seems like an indirect workaround)
Question 3: Usually, I wouldn’t even bother checking the Watts if I already know the inverter is off. But I can’t figure out how to turn that node off, or put a conditional statement before it. Should I worry about this?
Question 3: I have not followed the AI’s suggestion to “Enable Persistent Context Storage” anyone know if this is something I should do?

As a comparison, I have had 24/3000/70 MP 1s in my boat since 2007, and a manual system. I have 3 simple parallel wired remote on/off switches - one in the galley, one in our cabin and one on an adapted electronic timer for the central heating. All work brilliantly.

Plus remote switches to start generator.

Having Node-Red baked in is brilliant isn’t it!

I just monitor the output power from my inverter.
I only start the inverter for a specific activity like to boil the kettle.

When the wattage is > 25 and < 10 (ie on but effectively on standby) then the count down starts.
If it’s still in that range after 30 seconds then the inverter gets turned off; if the wattage increases again then the countdown is reset.

Threshold node

if (msg.payload < 25 && msg.payload > 10) {
msg.topic = “start”;
} else {
msg.topic = “reset”;
}
return msg;

Countdown node

const COUNTDOWN_SECONDS = 30;

if (context.get(“active”) === undefined) {
context.set(“active”, false);
}

if (msg.topic === “start” && !context.get(“active”)) {
context.set(“active”, true);
context.set(“remaining”, COUNTDOWN_SECONDS);

let interval = setInterval(() => {
    let remaining = context.get("remaining") - 1;
    context.set("remaining", remaining);

    node.send({ payload: remaining, topic: "countdown" });

    if (remaining <= 0) {
        clearInterval(context.get("interval"));
        context.set("active", false);
        node.send({ payload: 4, topic: "action" }); // ← This is your final action
    }
}, 1000);

context.set("interval", interval);

}

if (msg.topic === “reset”) {
if (context.get(“active”)) {
clearInterval(context.get(“interval”));
context.set(“active”, false);
context.set(“remaining”, null);
node.send({ payload: “n/a”, topic: “countdown” });
}
}

return null;

30 seconds is fine most of the time. I keep an old phone connected to my Cerbo in my van running Android and an app called ‘HTTP shortcuts’.

Using Node-Red I’ve created an API end point and my phone just fires off a command when I click a button on the home page. I find that the Node-Red dashboard takes a while to reconnect if the screen has been off for a time.

1 Like