I was trying to figure out how to input a motivation in this rule to alert me that it was left on but in the end, i would just rather it just run and complete. LOL
I have extra motion sensors laying around and i may add one to this area if needed.
As far as stuck, it skipped everything and left the plug on for some reason but i believe the way you set it up is simple and should work as expected.
The Iron registers 0 Watts often during heat cycles, so using that as an action creates false positive scenarios
If you want a notification when Johhny Three departs or the timeout is met (whichever comes first), stick a notification action after the ->timeout 0:40:00 and before the End IF. Something like "The curling iron is on and Johnny Three has left, or it has been at least 40 minutes since it was turned on. Power will be cycled in 5 minutes"
If you want a notification for when the plug is about to be turned off, just stick it after the => Timeout: 0:05:00 and before the Off: Curling Iron Plug
With or without the notifications, per this rule, the plug will be power cycled at most 45 minutes after powered on (40 if home plus 5) or 5 minutes after Johnny Three Leaves, or 5 minutes after powered on if Johnny Three is not present.
The caveat to this approach is no one can use that plug (for longer than 5 minutes) if Johnny three is not present.
Also, assuming the 1 minute is to allow the curling iron to fully turn off - requiring a manual turn on afterwards. You can probably take that down to 5 seconds (or maybe even one) and achieve the same goal in case there is a reason she needs it on longer than 45 minutes and she won't have to wait a full minute to turn it back on.
Agreed- i was thinking on the 5 minute rule if she was not home since i have a daughter also but she has her own and it has an internal timer.
For whatever reason ,the one my wife got does not hence the counter has burn marks from it being left on for extreme periods of time.
If it somehow becomes a issue, i will most like install a motion sensor and utilize that instead of Johnny three presence.
With the notification, there is not anyway to discern that it was actually left on with this rule. The rule just triggers from the power usage and goes from there. So i would get messages from the rule that it was left on, when it may not have been. It will still cycle the plug even if the unit was turned off.
That is the issue with the power reporting "0" occasionally. I was going to try reports at "0" for X amount of time but it just convolutes the rule.
When Johnny Three Left this AM, i would have thought the plug would have turned off but it went to the delay 5 minute portion instead of skipping.
I realized that all actions after END-If will run regardless of the conditions before.
Should i End-Rule if Johnny Three leaves?
Or if it doesn't then, END-If?
I based the rewritten rule off of your original where you stated a 5 minute wait, then off, then wait 1 minute, then back on.
If you want to keep the 45 minutes, and have it turn off instantly when Johnny Three leaves (or isn't home), then change the 40 minute time out if she IS home to 45, and remove or disable the 5 minute wait.
If you "end rule" after Johnny three leaves:
The switch will not be turned off
The private boolean will not be reset.
No idea what you are asking with the End If question. Your original ask was:
Turn off after 45 minutes if Johnny three is home.
Turn off after 5 minutes if Johnny three is not home.
You additionally asked (later) to use the 5 minutes after Johnny Three leaves (unless I misread)
Question: If Johnny Three isn't home, you still want the 5 minute wait? If Johnny Three Leaves, you want the off to be instant? What is the difference for leaving it on for 5 minutes if Johnny Three isn't home to begin with vs leaves and achieves the same situation - Not home - Iron on?
NOTE: Not asking what's the difference to be sarcastic. Asking for understanding so any recommendations I make will fit that intent.
So for the first sentence, are you looking for immediate?
For the second, the 5 minute wait at 0 power isn't being monitored. The way that this particular iron works, monitoring power is just not effective. You could check at the 5 minute mark, and it might be still zero if it happens to check on an off cycle.
One thing you could possibly do is a second rule that says when power is 0 and stays that way for 5 minutes, it turns off a virtual switch. and then use that virtual switch to determine that the power was turned off. But, that is adding to complexity as you also have to have a way to turn on the virtual switch when it is turned on. You could actually do that as the second action of the existing rule. But again, requires two rules. You would also have to view the power usage for several cycles and verify that it never goes to zero and stays that way for longer than 5 minutes as part of its normal cycle. Otherwise, you have the same issue that you started with.
Playing devil's advocate: What is the harm if it runs when it is not needed? The Rule is only triggered when the iron is turned on and power goes over the threshold. At the end of the rule, it turns the switch off then on.
So for the first sentence, are you looking for immediate?
That was the thought process.
Playing devil's advocate: What is the harm if it runs when it is not needed? The Rule is only triggered when the iron is turned on and power goes over the threshold. At the end of the rule, it turns the switch off then on.
At the end of the day, IF it runs when not needed it should be fine. I was just preventing wear and tear on the device itself.
I think leaving it as it sits, and its working as intended, its good to go.
I tend to overthink these rules form time to time.
What about a vibration sensor attached to the curling iron? Once it was turned on (trigger) if the vibration/acceleration was inactive for "n" time, turn off the outlet...