question

Porcini avatar image

Feature Request: "Virtual Switch" for Venus OS - solved with Node-red

Hello,


the virtual switch in the MultiPlus is a very useful and powerful tool. I'm wondering if this would also be possible to integrate in VenusOS similar to scheduled charging.


Some independent examples:

- Turn Multi off at 10:00 PM. Turn Multi on at 6:00 AM

- Switch critical loads on for 2h every 48h OR if Battery SOC is >90% AND PV Power is >100W

- Don't turn Multiplus on sundays

- Use Multiplus Charger only between 10:00PM and 06:00AM (probably because Energy is cheaper then)

- Switch Solar Charger off when DC-Loads were <5W for more than 24h (don't know why) and VE.Bus state is off

- Set Absorption-Voltage to 14,2V if Battery-SOC hasn't fallen below 90% for more than 72h

- Set Absorption-Voltage to 14,7V if Battery-SOC has fallen below 60%

- Ignore temperature and turn off compensation if voltage is above/under example-voltage

- Limit Output to 500W as soon as SOC reached <60% and AC-In is connected.

- Stop Discharging if PV-Power is lower than 200W for 1h and SOC has fallen under X%

- DON'T limit charge current if loads are higher than X

- Switch 230V to 220V on overload


and so on ..


regards,


Porcini

Venus OSNode-REDvirtual switch
10 |3000 characters needed characters left characters exceeded

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

4 Answers
mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey! Here’s a small sneak peek on where we’re at with the Node-RED. There are two types of nodes: measurement nodes and control nodes.

At the top of the screenshot, you can see an example node-red flow (automation) that changes the MultiPlus mode based on the time of the day in order to maximise cheaper night-time electricity.


The switch node ‘Filter by SoC’ has four thresholds for SoC; 25%, 50%, 95% and ‘no-data available’. The incoming messages are guided to one of the corresponding outputs of the node.

The example is by no means perfect, but I think it demonstrates the power of Node-Red pretty well. Expand that with additional logic, push/email notifications and apple homekit / google home integration :wink: Oh, and every service absolutely requires Twitter integration.


(Copy paste of a msg from Peter, the main developer working on this)


1 comment Share
10 |3000 characters needed characters left characters exceeded

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

That's exactly as I imagined! Couldn't be more simple and extensive. Great!!

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hey Porcini, coincidence or not, last night I discussed exactly such project internally. The current plan is to implement Node-Red on Venus. See google for more about node-red, I think it’s going to make for an excellent solution.


One thing needed for the development is a list of examples; so thank you! Welcome to add more.

Some from myself:

- control an external fan. For example for a system installed in a container, to blow fresh air into the container (or suck warm air out)

- load shedding

- controlling dumploads: enable water heater or pool heater when batteries are full and sun is still shining.


The idea is that for very often used features we have a dedicated solution, that doesn't require `fiddling` in Node-red. An example of this is the Generator Start/Stop feature in Venus GX. And we might add more in the future, dump loads is one that comes to mind.

And for more advanced / less often used requirements, like all the rest mentioned above, people can use node-red; and we'll have documented examples.

10 comments Share
10 |3000 characters needed characters left characters exceeded

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

Node-Red on Venus sounds like an excellent plan Matthijs. Exciting times ahead!

Regarding dedicated solution vs node-red examples, better still: implement the dedicated solutions in node-red, so that when the dedicated solution doesn't work for someone, they can use it as a starting point and extend (via fiddling).

That might be what you were already describing, but I'm not sure.

Hi Ben, no I didn’t have that in mind. We can try; though I don’t inmediately see how to the involve settings. But it’s probably possible.


Key to the dedicated solutions is that the installer doesn’t see or hear about node-red.



Hi Matthijs. Great! I think this is going to make the victron system really powerful! Hopefully the community will add some useful ideas as soon as they come to mind. Unfortunately most of my examples were only added symbolically and don't make sense at all.

I totally support the dedicated solution for less complex functions like the dumpload or time-controlled switching. Probably it would also be useful to have the selection between things should happen only once and periodic.

Working together with its community is the best a company can do. It brings the innovation capacity to its max!

I have exactly 2 of those situations already:

- My EasySolar box is in a cabinet. I have a fan to suck warm air out. It would be nice if this was controlled automatically. Although I suspect a simple temp sensor on the fan would be easiest!

- Hot water heater - I want my Colour Controller to turn it on/off automatically when the batteries are full and there's spare solar. Currently I have it controlled by a home automation system power plug switch. I was going to programme my raspberry pi to query the colour controller, and control it.

Not sure if this is the same function but I control the heater on my van through relay 1 on the gx. Further functionality of this relay (timer etc) would be really usefull.

We also already have several of these 'requirements' on our sailing catamaran. Dump loading, load shedding based on SoC (not 100%), various location temp monitoring (in addition to LiFePo4), AC load monitoring (using Generator) to maximise, but not overload, generator whilst its running, Water maker (desalinator) on/off when 'energy' available' and day/night (time = tide etc.) (prioritised with battery charge etc); based on If - then - pull down options to activate .... relay(nn) and NMEA 2000 (SeaTalkng) / SignalK output message all highly desirable from VenusGX.

I'll just add to the chorus of excited, yays :)

I have use for a great deal of the examples presented above. Kudos Victron!

Might be a silly question, but will any of this functionality be portable to a CCGX, or is a Venus module the only intended target direction?

No silly question at all. Ccgx wont be able to run it; too limited wrt disk; and also cpu & ram by the way.

Full details are here: https://github.com/victronenergy/venus/issues/378


Ps; see comment I posted there a second ago at the bottom.

Geomz avatar image Geomz mvader (Victron Energy) ♦♦ ·

Thanks @mvader.

Somewhat disappointing, but not too surprising considering the rich feature-set offered.

I'll continue to monitor this project and I'll dust off my GitHub login. Perhaps this'll motivate me to hack together a raspberry :)

mvader (Victron Energy) avatar image
mvader (Victron Energy) answered ·

Hi all,

Implementation is nearly done; only testing and polishing is left; as well as proper integration into Venus OS.

And you can help (and enjoy the feature already :-). )

test images are available. See here: https://github.com/victronenergy/venus/issues/378#issuecomment-471338620

For issues; there is a issue tracker on github here:

https://github.com/victronenergy/node-red-contrib-victron/issues

Or drop notes here on this thread.

Enjoy!

2 comments Share
10 |3000 characters needed characters left characters exceeded

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

Really love the node-red implementation. IMO this should go hand-in-hand with influxdb and Grafana within the Venus OS image. So yes, this is another feature request :-)

As things have been a bit quiet on this topic lately, I was just wondering how things have been progressing & the current expectation for when node-red integration might become available?

I'm still investigating options to properly control a water heater dump load in my off grid setup.

spark88 avatar image
spark88 answered ·

I installed the latest version ... install worked well. No issues.

Share
10 |3000 characters needed characters left characters exceeded

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