Hi all. I’m new to this so please forgive me if this has been answered before but I couldn’t find any relevant posts.
I want to switch a relay to control an electric immersion heater to divert excess power when my batteries are nearly full. I have Venus OS Large installed and working on a Raspberry Pi connected to my Smart Solar 150/70 MPPT charge controller. I thought I could use Node-Red to do this but I can’t see a way to switch the relay on the charge controller via Node-Red. My backup plan is to connect an Arduino to switch the relay (or do it via an output pin on the RPi itself). Can anyone confirm if this can be done in Node-Red? Thanks.
I may be wrong about it, as I don’t have a SS MPPT, but I will try an educated guess.
You must have the relay on the SS MPPT configured in Remote Control mode.
Then, try to see if a specific action appears on Node Red in the MPPT node.
You must have the ability then to set it Open or Close.
I do something similar in Node Red. But then, I use a Cerbo. Do you have a Victron inverter and do you need to switch AC or DC?
What you could do is switch your Arduino if it has the relevant port to switch your relay or if it’s compatible with Node Red, switch your relay directly based on Victron SOC.
Last time I checked, Victron MPPT relays couldn’t be controlled in Node Red. It had to be done indirectly through Venus
I can’t see how to switch the MPPT relay to remote control mode. In the MPPT device settings in the Victron Connect app I have a Manual mode - is that it?
Thanks. I have a Victron 12V 3000VA smart inverter which has a relay. I need to switch 230VAC at 4A so may need another more powerful relay connected to it. But I can’t see the relay as a device in Node Red.
OK - what do I need to do to control it indirectly through Venus? Is there a way to join this to Node Red?
Yes, that’s it, manual mode.
Then, once the manual mode is ON, is there an option on VictronConnect to switch that relay ON and OFF?
Something like this (picture not from an SS MPPT):
That works, thank you! I just need to work out how to control it from Node Red instead of via the Victron Connect app…
Well, if that works, then the MPPT supports external control.
And this external control is probably through a command involving a Victron register.
Probably register 0x34E or 0xEDD8.
Read about Victron registers here.
You need to write a little script in Node Red to access those registers through a Venus OS utility.
vregd or vreg, depending on which type of connection you have with the MPPT.
Thanks a lot - I’ll have a look at the link you provided.
I’m using a USB to VE Direct cable to connect the RPi to the MPPT. I understand the register details thanks - do you have any links to examples of how to code this?
Sorry, don’t have the Node Red installed and didn’t worked with it.
But sure are people here, versed in Node Red, that can help you how to make an exec Node Red script.
Idea is to use - in your case - vregd at the SSH root prompt to see which register to use.
Use vregd -h for help.
I believe that if you use vregd without any parameter will tell you a list of available connections.
Then go forward from that.
Thanks very much - I’ll take a look
I managed to SSH into the MPPT controller, and successfully used vregd to read the device ID and version number. But when I request the relay state I get ‘No Response Received’.
However, if I write to the relay state it works!
Thanks for the help @alexpescaru
What @alexpescaru is suggesting could work, especially if you are running Node Red locally, not over the Internet. But even over the Internet, it could work. But you have to use the execute node in Node Red to run your code. Victron has ready made nodes - the battery monitor is one - in Node Red.
As an alternative and even simpler and fool-proof, why don’t you use your Multiplus to switch on and off AC out 2 at the desired SOC? The programmable relay assistant can do that.
In my case, I wired my Cerbo relay to my quattro and I control the Cerbo relay through Node Red.
NB: The above assumes that your heater use AC but then the MPPT outputs DC
I also though about this, but he said that he has a simple inverter, Victron 12V 3000VA smart inverter.
Is that inverter having an AC-Out2 ?
Thanks for the suggestions. I actually need to keep the inverter on as it’s supplying 230V AC to an Enphase Envoy controller and some Enphase micro inverters. Without it they shut down (they’re designed for grid-tied mode but I’m using them off-grid). The inverter also tops up the output of the micro inverters to supply 1kW to the water heater.
It’s a Phoenix inverter not a multiplus so I only have one relay and one output It’s better I think to control the relay in the MPPT controller to switch the heater.
Not sure. Let me check
It’s possible that in the same way you can control the relay on the inverter…
Just use the serial port that it’s communicating with the inverter.