RM timed power monitoring

Did you set the Timer variable to False before starting first time?

I think maybe when you set the Private Boolean False the Variable Timer should be set to false as well. If I understand the timer variable correctly it indicates the 45 minute wait time is complete when it is true. So when when it triggered the second time the variable Timer was true so the else turned off the switch.

It should have been false which would have skipped turning off the switch.

2 Likes

This was set to "TRUE" and I changed it to "FALSE" and so far so good. Geez this rule is making me feel dumb haha. I think it is in the wait period, so I will report back in a few hours. Thanks for the suggestion!
image

I still think it would be a good idea to initialize the Timer variable to False when you set the private boolean to False.

If the rule ever stops for whatever reason while the Variable is True this would happen again.

1 Like

So, like this?

Yeah I think that should do it.

I wonder if after the 45 minute delay, if you detect the water heater is still on power > 50, then you should turn off the switch, set the private boolean back true, and then exit the rule.

If I understand what your trying to do, then after 45 minutes if the water heater is still on you want it turned off. The 1 hour delay after that is to verify that it is still not on, as the water may be at temp and the switch is not drawing any power at that moment.

As the rule stands now if the power is above 50 watts after the 45 minute delay you will turn off the switch. Then for the next hour if anyone tried to turn it on it would immediately be turned back off.

Perhaps that is what you want, but I would think once it is turned off the only way it will trigger the rule again is if someone manually turns it on again.

Yep that is what I want. The 45 delay is for usage, once the 45 min timer expires, I want it to monitor power for the next hour and if it goes above 50W and if it does turn the switch off. There isn't a way for the switch to tell if it was left on or someone turned it on again in that hour so turning it back off in that hour window is fine. So basically water heater is turned on, delay 45, monitor for an hour and turn off if left on, then end timer. 1:45:00 from start to finish.

Seems to me then instead of looking at the power level of the water heater you could just look at at the state of the switch. Is it on or off?

That should be your trigger, the switch turning on, then there are no chances of multiple triggers. Seems pretty simple then

Trigger -  switch turns on

Delay 45 minutes
turn it off.

I want the switch to stay on indefinitely if the temp isn't left up on the unit, so the switch will always be on if the water temp isn't left on.

Ahh, I see.

Thanks for all your help, seems good now.