So, I'm sure i am not alone but my wife has a bad habit of leaving her curling iron on when she leaves.
SO i set it up on a ZigBee outlet.
Trigger: When Curling Iron reports over 1Watt
Actions:
IF its turned on ( Power draw) and she is not home
Turn off after 5 minutes
wait 1 minute and turn back on
When the power is cut to the plug, the curling iron will need to be restarted manually when power i restored.
IF its turned on ( Power draw) and she is home
Turn off after 45 minutes
wait 1 minute and turn back on
Private Boolean is used to prevent repeat triggers.
What my question is:
How do i cancel the rule entirely and reset the Boolean to true, if she decided to manually turn the unit off?
This is my attempt but I'm not sure it will work as intended. I added the Else condition at the end
If the rule is running, I believe it will just continue step by step under the "IF" condition that has started. I would like to to cancel wherever its at and reset.
I would use her leaving the house as the trigger to check if it is on, not the power from the curling iron. If she leaves and it is on, turn it off.
Then use a different rule that triggers from power rising to always turns it off 45 minutes after it is turned on. If she leaves the house in that 45 minutes it will still turn off from the presence triggered rule.
Problem becomes presence which is another issue all together. I use her Tesla integration to know but she takes my vehicle sometimes and the Apple Presence triggers virtual switch. Its not super reliable.
Restore power to the plug.
Once the plug is turned off, the curling iron turns off.
Once the plug is turned back on, the curling iron will not come on unless its manually done from the iron itself.
Does she always use it in the same room, like the bathroom? A motion sensor could also be used instead of location presence, preferably using a mmWave sensor. If the room goes unoccupied with the curling iron on, turn it off. I don't see where you need more than that one rule, but you could back it up with a 45 minute timer rule.
I had a somewhat similar problem with my new, dumb coffee machine that doesn't have an auto-off. It just kept the heating unit on until the switch was physically turned off (different from your curling iron which defaults to off after power removed). In my case, I just said how long should the thing be on before it's too long, and then just turned it off. It results in a simple rule:
(there is a second rule to hide the fact that the coffee machine power usage goes to 0w while cycling the heater, see Better Dumb Coffee Pot - #19 by jlv for details).
By all this, I wonder if this suggestion is simpler: simply turn off the outlet after the maximum time (45 minutes?) it should be used. Then wait 1 minute and turn it back on. Don't complicate the rule with presense.
Actions:
Set private Boolean to false
If Jonny Three not present then
Wait for event curling iron plug power = 0 ā> Delay 00:05:00
If curling iron plug power > 0 then
Off curling iron plug
Wait 1 minute
On curling iron plug
End if
Else
Wait for condition curling iron plug power = 0 or Jonny three not present ā> Delay 00:45:00
If curling iron plug power > 0 then
Off curling iron plug
Wait 1 minute
On curling iron plug
End if
End if
Set private Boolean to true
Iām wondering about the 5 minute wait⦠are there sometimes false positives, where sheās present when reported as notā¦? Otherwise, I wouldnāt wait the 5 minutesā¦
There are time then the unit reports 0 because it heats up and then cuts back and it shows 0 for a short time.
I am having issues creating the Rule per you break out.
Actions:
Set private Boolean to false
If Jonny Three not present then
Wait for event curling iron plug power = 0 ā> Delay 00:05:00
I cant add delayed - See below ( only have time-out option)
Yes, sorry - I was typing this in a service center waiting room on my phone⦠Time-Out is correct!
Where you have « else-if (Power level of Curling iron ⦠» - that must be an « IF » condition for this to work, not an else-if. And it must be >0, not =0
What this will do is test to see if the delay was due to the time-out or the power being still >0. That is one of the ways of testing for this.
So, if the power cycles back to zero while it is still in use, that presents a problem with using the wait for power = 0 if you are using the private boolean to prevent recurrent triggers. What will happen is that the first time it reports zero, it will turn off the switch and disregard the remainder of the timeout.
Same issue occurs when monitoring washing machine power. The difference is that when the cycle completes, the washer stays at low power permanently. I don't think that is true for the curling iron.
There is not much of a way to catch that without just capturing whether or not she is home at the start and then choosing 5 or 45 minute wait, and sticking to it. What this means is: If she turns it on when at home, then leaves, you would be stuck with the 45 minutes FROM THE TIME SHE TURNED IT ON. It sort of negates the "when she is not home" situation because, if she is not home, she isn't turning it on.
That rule would look something like this. Notice that the actions that are common to both of your IF statements should be outside of your if statements. You want the - Off - Wait 1 minute - On - Set Private Boolean to occur regardless of the condition
You said that you had observed the power going to zero and going back up, is there a regular time for that (or more likely, is it thermostatically controlled and just adds power for random bits of time to get back up to temperature). Does it actually go to "0" when turned on? Or does it have a small idle power/current? That might help.
This works very similar. But it just checks if she is home when you first turn it on. Then it waits for her to leave (with a 40 minute timeout).
If she leaves, OR it has been 40 minutes since she started using it OR if she was not home to begin with, a 5 minute timer is started to turn off the switch, then a 1 minute timer to turn it back on. This gets you 45 minutes of power if she is home, and shuts off 5 minutes after she leaves.
NOTE: Realizing that valentine's day is tomorrow - whichever rule you decide to write, I would wait until next week.......... If it takes her longer than 45 minutes to curl her hair, and can't because "the house turned off her curling iron" that could be detrimental to harmony .... just a thought.
A much more friendly approach might be to send a reminder notification to turn off the power if it is still drawing power 45 minutes after the initial power draw (or sooner if she isn't home). Turning off would be an easy thing to do from a dashboard or the app.
Several approaches on this one... lol
Funny comment on V-Day. LOL
You said that you had observed the power going to zero and going back up, is there a regular time for that (or more likely, is it thermostatically controlled and just adds power for random bits of time to get back up to temperature). Does it actually go to "0" when turned on? Or does it have a small idle power/current? That might help.
I need to check on this more, i noticed it hit 0 while on several times so i would assume the internal thermostat is adjusting the temp and does not need to add heat at small portions of time.
I do like the notification on it though, i may add that to it and test.
@Sebastien Thank you sir
Can i add the:
Off Curling Iron
Elapsed Time : 1 Minute
On curling iron.
to the very bottom outside the IF statements and below the END-IF instead of having it in both IF statements?
See Attached: I turned off the ones inside so if it doesn't work, i can easily turn them on and delete the bottom.
Just going to reiterate, this section is likely to end significantly earlier than the 45 minutes if your observations about the false postitives hold true (like the first time the iron gets to temp and the power drops to zero). This is an OR statement. So, if she leaves OR if the power hits zero OR 45 minutes elapse with neither of the above happening, it moves to the next step in the rule. With the private booleans set, it is not going to reset/reeavaluate the trigger until the rule completes it's OFF/ON cycle and the boolean is turned back on. Since the iron has to manually be turned back on after that, this could be a friction point for the WAF.
This was the reason I left that out of my second rule example. In that rule, it will shut off 45 minutes after it is first turned on at the latest, or 5 minutes after she leaves.
For testing/debugging purposes, you might want to add a notification or log entry at that step and then test it realtime.
(Note: this is making the assumption that your earlier statements that the iron occasionally actually hits "0" while in use - if it does not, then this will not apply)
If you want to make it cleaner you could just move the notification IF power > 0 out of the IF ELSE, it's the same for both
You are missing a ENDIF just before the wait for 1 minute also, it's the END IF for the IF ELSE. RM is pretty tolerant of that but it might cause you issues.
As to the first time it hit 0 ending it early, I suspected that would be the case.
To be honest, I would just do something similar to the one I set up in my second example (just time based from the first time it was turned on) and replace the Turn Off/Back On with simple notifications. If you get the notifications while you are out, you can always use a dahsboard or the app to turn it off. If you are home, you can also use the app or a dashboard, or you can also just go to the location and turn it off.
Someone else also mentioned adding a motion sensor into the mix. If you are using a smart plug or outlet, then it must be getting used in the same location always. If that is the case, a simple automation that checks for an amount of time of inactivity for a motion sensor could be better than using presence as well.