Netgalleria / arska-node

Smart power manager for optimized solar power usage as well as greenest and cheapest energy purchase
GNU General Public License v3.0
24 stars 1 forks source link

Variable "Hours until channel xx is on" #25

Closed joe-ave closed 1 year ago

joe-ave commented 1 year ago

Hello Olli,

I had another idéa about that in some cases it could be good to know and set channel rules that looks at how long time it is left until some channel turnes on. In my case I use one channel to initiate loading of the accumulator tank via the heatpump and another channel to initiate unloading from the accumulatortank to the heating system via a shunt valve. The ending of the loading sequence is done in a way that when loading command from Arska turns low the heatpump continues to load the upper part of the accumulator tank where the hotwater coil is and after that goes in to radiator heating if needed. This can take anywhere from 1 minute to 2 hours dependant if hotwater/radiator heating is needed or not after Arska loading of tank.

So then it could be good to a variable that look at how many hours is left until channel "xx" turns on, so that the loading of the tank could be terminated in advance and the stopping sequence have time to do it´s job before unloading of tank is started. Useful when the price has a "saw tooth" profile to create dead time betwen channels.

Some sort of precalculation (schedule?) of the relays on/off times against the channel rules on a hourly base or upon change is then probably needed in order to do this.

//Jonas Distance between channels

Olli69 commented 1 year ago

Hi Jonas, Arska is living in the moment 🧘🏽‍♂️😃, so it has no plan for the future. I mean that there is no logic to predictions, but relay states are decided once in the minute based on rules and variable values. Priority ja uptime minimum restrict is which order relays are switched on/off and what is minimum uptime.

Newest version (0.99) has channel uptime counter telling how long the channel has been up during current period (variable 150), last 8 hours (variable 152) and las 24 hours (variable 153) . I do not know if you could use these variables somehow. Anyway rules cannot see other channels counter values.

Olli