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.