Hi all
I have made a start on my heating PLEG, using the excellent information in the pleg basics and forum alongside what I already have. What is here is still very much in “test mode”, so ignore the funny temps etc, but the core of what I am trying to achieve is:
- Using states to govern what happens when people are at home, away, sleeping, etc. I already have PLEG controlling a multiswitch based on motion and other factors, so no need to do much here around occupancy.
- Using the “if/then/else” functionality of PLEG to determine setpoints for each rad
- I was attempting to avoid needing one condition / action / resend combination for each radiator by comparing the total of targetsetpoint and currentsetpoint after a period and if they do not match, resending to all. I kind of felt that even though this might mean resending setpoints to some that may have successfully updated, it might be a reasonable compromise as battery life is more governed by wakeup interval, but I could be wrong there.
Its the last part that I am struggling with. For some reason with the current order the SendSetpoint action is firing multiple times as soon as one of the home state switches changes. This goes away if I remove the ResendSP from the SendSetPoint condition. I have a suspicion this is because each time one of the values of the target or current setpoints changes, because Repeats has to be checked on SendSetpoint, it causes it to reevaluate and fire true each time, therefore when SendSetpoint goes true, targetsetpoint is changing for each of those inputs (and therefore ResendSP would be true), so action fires at least 7 times (once per rad).
I added the timer action and condition to ResendSP try and stop it firing until after targetsetpoints have been updated, but timer clearly does not start in time with this order so it made no difference. I tried moving the ResentSP condition to after SendSetpoint, which solved the multiple trigger problem, but then when ResendSetPoint turns true, it does not refire SendSetpoint. I am not sure why this would be, as I thought that even though it was placed after SendSetpoint, it should still cause everything before it to reevaluate based on its state change? Am a little lost what to try now and before I change approach altogether I thought I would see if anyone can advise where I have gone wrong?
Many thanks.