Please help where our the nice people gone?

please can i get some help with this door automation
I would like the door to send a notification if the door have been left open and the tv isn't on, I would also like the same automation to send a notification if the tv was turned off and the room has been left with the door open, and I would like this notification to repeat until the door has closed. Please Help, I am learning and have manage to put some automation together myself from learning from your experience

so far I have only managed to get a notification when the tv is off and the door is open and when the tv has been turned off and the door is open the automation don't work for some reason. I have also manged to get this to repeat, but it doesn't stop repeating after its been activated

End-Repeat isn't as it seems. Actions between 'Repeat' and 'End Repeat' are repeated but you must specify at the first point what will stop it. In your rule you have 'Repeat every 2 minutes' so it will repeat everything between that line and 'End Repeat' every two minutes....forever.

Instead of 'Repeat Actions' you want 'Repeat While Expression' as below:


'Define Expression element' - set that to being the door(s) open and set your 2 minutes.

When your rule triggers it will repeat every 2 minutes but only while the door(s) is/are open (expression true). The doors closing will stop the repeating actions.

5 Likes

thank you so much will try putting that together when I am a little less tired to give the best chance I will let you know how I get on and will be sending you more thank you's :blush:

1 Like

very good teaching, didn't find that hard, with your instructions and I have learned something new that I can definitely use elsewhere. Hopefully I got it right, do you think this will be ok,

I had been playing with the rule for a while so hopefully I haven't messed it up too much

1 Like

I tried the automation this morning, and it still doesn't stop when the door is closed, possibly due to me messing around with it for a while, I will have a go at rebuilding it fresh tonight to give this a better chance. I am still far off from understanding all this stuff lol

The first wait shouldn't be there that should be the trigger (the bit before the actions).

Then remove the notification delay. You are already delaying it then delaying it again so it will overlap.

1 Like

Also let's see the entire rule including the trigger.

2 Likes

Thank you, it still doest seem to work when the tv has been on then turned off, I have taken the first part of the rule away, but there is no delay now when you enter the room . Sorry in a bit of a bad place at the moment my mum has been fighting cancer and has become unwel again

Are you wanting this to only happen when the TV is turned off? You may have the wrong trigger. As it is written it will run the actions when the doors open or close (the trigger) and then as long as either door is open every 2 minutes it will check if the TV is off and if either door is open and then it will send the alert.

If it was me I'd trigger it on the TV being turned off and then see if the door is still open after X minutes. If that is your desire. The fun thing about Hubitat is there are so many ways to accomplish a task.

2 Likes

If you want a wait add a wait for event:elapsed time as your first action. Maybe 15 to 30 seconds or longer.

As mentioned above, as soon as either door open or closes the rule will trigger. So if you open either door you will almost immediately get a message. If you add the wait the rule will halt for the delay you set. If you then close the door the wait will be canceled and the rule will trigger again, but now the door is closed so no message, unless the other one is open

1 Like

sorry i hadnt given it a chance the function of the notification is working great when door left open and tv hasn't been on, I just needed to wait 30 seconds for the tv to register as turned off, and then it sent out the notification . I will add a wait for 30 seconds at the start, I think we our almost there thank you all for your help

thank you for all your help this is now working perfectly, you people our very kind thank you

3 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.