Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Circulation Pump Overrun #263

Closed
pihome-shc opened this issue Jun 15, 2020 · 15 comments
Closed

Circulation Pump Overrun #263

pihome-shc opened this issue Jun 15, 2020 · 15 comments

Comments

@pihome-shc
Copy link
Owner

This issue was raised previously via email to me and i did this quick dirty trick in boiler.php to accommodate over run for circulation pump/boiler pump. i have same issue in my place but i have this i think its called loop. here is update form user:

Hello.
I have a fully wired setup.
I have updated your zone (pump) overrun code in boiler.php for the new version, as follows:-
insert after line 586 …

$query = “SELECT * FROM boiler_logs ORDER BY id DESC LIMIT 1;”;
$result = $conn->query($query);
$blrow = mysqli_fetch_array($result);
$bstop_datetime = $blrow[‘stop_datetime’];
$phpdate = strtotime( $bstop_datetime );
$now=strtotime(date(‘Y-m-d H:i:s’));
$overrun_time = $phpdate + (1 * 60);

if ($overrun_time > $now){
echo “\033[36m”.date(‘Y-m-d H:i:s’). “\033[0m – Circulation Pump Need to overrun. \n”;
exec(“python3 /var/www/cron/gpio/gpio3_relay.py “.$zone_controler_child_id.” “.$relay_on);
}else {
echo “\033[36m”.date(‘Y-m-d H:i:s’). “\033[0m – Circulation pump need to Shutoff. \n”;
exec(“python3 /var/www/cron/gpio/gpio3_relay.py “.$zone_controler_child_id.” “.$relay_off);
}

It works, but every overrun is through the Hot Water zone (ie the last zone in the boiler.php run). Does anyone have any suggestions for a modification that would make the overrun zone be the same as the zone just ended – meaning, if Downstairs zone just ended then the overrun zone would be Downstairs – not Hot Water as now ?
Reminder – mine is a fully wired 3 zone system, with 4 way relay, the extra one for the boiler so it can be shut off 60 seconds before the zone valve/pump.

Any suggestions would be much appreciated – many thanks for reading.

@aszumski
Copy link
Contributor

aszumski commented Jun 16, 2020

@pihome-shc basically you want to delay valve close.
It would be easy enough to delay it by one boiler.php run after implementing changes for zone status.

change standard relay command:
if ($zone_controller_type == 'GPIO'){ $relay_status = ($zone_status == '1') ? $relay_on : $relay_off;

with

if ($zone_controller_type == 'GPIO'){ $relay_status = (($zone_status == '1')||($zone_status_prev == '1')) ? $relay_on : $relay_off;
and move code that updates zone_current_status
$query = "UPDATE zone_current_state SET...
below the code that commands the relay.

That would delay every zone stop, not only when the boiler stops.
thing is you don't know if boiler stops until all zones are processed.

To delay only last valve close when boiler stops it would require separate loop for zone commands after all zones are processed,and would require passing data between the loops.

@dvdcut
Copy link
Contributor

dvdcut commented Jun 18, 2020

I have radiator next to the boiler and i have to leave it one (not fully on) so when all zone valve are closed boiler still need to circulate water for extra 20ish seconds its waste of energy as it just need to stay on all the time, that is my overrun, can we add this code in for everyone ? not just gpio connection?

@aszumski moving $query = "UPDATE zone_current_state SET after if ($zone_controller_type == 'GPIO'){ $relay_status = (($zone_status == '1')||($zone_status_prev == '1')) ? $relay_on : $relay_off; not going to make difference, its just updating gui only.

@aszumski
Copy link
Contributor

@dvdcut you are right moving UPDATE zone_current_state wont change anything.
as we already pulled value of $zone_status_prev at the start of the loop.

To do it properly (keep the valves that ware open just before boiler stop, and close it straightaway when you shut zone but boiler keeps running ), we really need separate loop for zone commands and adjustable time in boiler settings, for example my boiler stops when you shut it off and then after couple of minutes circulates pump for couple of seconds probably to get hot water out of boiler (I have custom code that opens one of the valves all the time when boiler is not running).
I'm OK to leave the valve open as I use ball valves, and they draw current only when opening/closing, for someone using solenoid type valves it might be better to close after a while as they draw little bit of current. In my case delaying closing by one scan would not be enough.

So it would be best to give user option for overrun time, if it's set to 0 no overrun greater than zero overrun in minutes, less than 0 (default -1) keep the zones valves that ware active before boiler start open until next boiler start (if it starts same zone during next boiler start valve is being kept open, if you don't run the zone close it).

I will try to do some code for it and see how it works

@dvdcut
Copy link
Contributor

dvdcut commented Jun 18, 2020

@aszumski yes adding option to boiler for user to have this overrun would be great

@pihome-shc
Copy link
Owner Author

@aszumski tested this update and it is working as expected.

@pihome-shc
Copy link
Owner Author

Comments on PiHome site by Ian:

Good afternoon.
Zone/Pump overrun tested and is working very well. I tested using boost facility on single zones and also on multple concurrent overlapping zones - all good.
Many thanks, your help is much appreciated and please also pass on my thanks to @aszumski.
Kind regards

dvdcut added a commit to dvdcut/pihome that referenced this issue Jun 22, 2020
Not directly related to any issue but i wanted to have clean code so we all can read all logics and make sense as well.
Performance Issue pihome-shc#283
Circulation Pump Overrun pihome-shc#263
@dvdcut
Copy link
Contributor

dvdcut commented Jun 22, 2020

@aszumski i have done testing few times myself (i have wireless boiler and zone controller) and i can confirm it works great, i have turned off that radiator for good now, my pull request #287 was to understand how i can increase time to may be 2 minutes. i think we can add this to boiler table.

@dvdcut
Copy link
Contributor

dvdcut commented Jun 22, 2020

i have done all the work, i dont know how to do multiple pull request 😢 so i will wait for #287 to get added and i'll do another pull and this will be done from gui

@pihome-shc
Copy link
Owner Author

@dvdcut interesting work on #287 :) sorry can not help you on multiple pull requests i m no expert on GitHub.

dvdcut added a commit to dvdcut/pihome that referenced this issue Jun 22, 2020
Circulation Pump Overrun pihome-shc#263 option to change settings from gui under settings->boiler
pihome-shc added a commit that referenced this issue Jun 23, 2020
Circulation Pump Overrun #263 settings from gui
@dvdcut
Copy link
Contributor

dvdcut commented Jun 24, 2020

@aszumski
icon for boiler overrun is not very visable in outline as its very small icon, i suggest better change this
from
class="fa ion-ios-play-outline orange fa-fw
to
class="fa fa-play orange fa-fw"

image

@aszumski
Copy link
Contributor

@dvdcut
Chose this icon so it doesn't stand out :)
I taught it's nice to know what is driving your zone valve open but it's not very important information.
I don't mind changing it if you think it should be more visible.

@dvdcut
Copy link
Contributor

dvdcut commented Jun 26, 2020

its nice to see this feature i think and why not show users as well that system is working.

@pihome-shc
Copy link
Owner Author

@aszumski / @dvdcut can we close this issue if no further update required on this?

@dvdcut
Copy link
Contributor

dvdcut commented Jul 2, 2020

its all working great thanks to @aszumski for all the hard work. this can be closed as far i can think

@aszumski
Copy link
Contributor

aszumski commented Jul 2, 2020

I think this can be closed.
@dvdcut thanks for the front end changes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants