question

khostri avatar image
khostri asked

Cerbo Relay Control with NodeRED

Sorry for my basic question

I would like to get any tips how to configure relay switching with Node RED. I have Heatpump with input from PV. So if there is excess energy, heatpump can get request to queue to shift heating schedule, use higher tempreature, etc. It is controled by heatpump itself, only signal ebout exces is transfered. So it is not har tunr on/turn off.
I have deployed Dynamic ESS to NodeRED running on Cerbo. But Now I want to add second flow to control Relay2.
My idea is:

Setup heatpump compresor consumption to variable - for example 3kW (compressor, additional heating is 3x3kW but I will not take it into consideration)

If SOC is above 80% and PV Charger and there is excess energy (ie feed in to grid is higher that Heatpump) for last 15 minutes (or hour or any other interval), close Relay2. My estimation is that over 80% charging is quite slower so more excess energy and heatpump can use it as battery SOC is expected to go still higher.

If SOc is lower than 80% or higher than 80% and excess energy is not enough, open Relay2 - primarily charge battery, heatpump control has lower priority

If there is negative price over threshold (for example use existing Dynamic ESS), close relay2 no matter what SOC is there.

And I am not sure from which nodes I can combine that. So any tip would be really helpful even different condition based on real scenarios.

Node-RED
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.

khostri avatar image khostri commented ·

Partially answering my own question - I have never used Node RED before, but I have tried to make something myself. I think it can be reworked in cleaner way or add additional modifications, but for now I have added Relay2 control for my heatpump to DynamicESS flow. Used example with relay control as base (screen of only relay control part of DynamicESS):

1688974459661.png

Logic is like that: Heatpump compressor cosumption is 3.1 kW (hardcoded in function 7). Each 5 second (each message) If there excess (negative charge powers) after adding heatpump consumption, increase counter by 2, if possitive value, decrease by 3. If counter goes over 200, close relay2 and divide counter by 2. In -200,200 area leave it as it is, under -200 open relay2 and divide counter by 2.

Also if there is negative price, set counter to 200 to close relay right away (energy can be taken from grid, and negative price window will last for at least 1 hour)

My logic was that I want to turn on heatpump if there is steady excess to cover consumption for at least 8 minutes. If excess disappears (weather), in like 6 minutes open relay. In case of negative price it is more likely to be excess or available energy in grid so counter does not matter.

I was insure how to work with properties (create my own into combined message from 2 nodes) so maybe it would be possible to do it smarter.

Also wanted to work with historic values so store all values into array/batch, calculate excess from that but was unable to figure out minute index in flow scope so counter was easier for me

relay2.zip


0 Likes 0 ·
1688974459661.png (85.9 KiB)
relay2.zip (983 B)
1 Answer
patrick-genx avatar image
patrick-genx answered ·

Hi, how do you configure the Venus relay in the device parameter ? I selected Manuel, but Node Red doesn't activate or desactivate the relay

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.

aaron-h-martin avatar image aaron-h-martin commented ·
I ran into this yesterday. I am new with node red, just have some basic flows and a dashboard to control everything in one spot.


I also wanted to control a few relays on my Cerbo S-GX. I used the victron relay control "prebuild node" selected Venus, Selected Relay 1, and wired a switch to this node to put a switch on my dashboard.


The switch didn't work until finally it worked after changing msg:topic to msg:payload.


Excuse me if you knew this and your problem is something else.

0 Likes 0 ·