Delay trigger in case state changes for door sensor

That looks like the 3rd party iOS SmartRules application. Obviously thatā€™s not going to work in Hubitat.

Have you bought a Hubitat Elevation hub yet to replace your ST hub yet?

The picture I included in the link was just to give an example. I have since removed that program that did not work and gave me grief for more than 2 hours staring at plugs and wondering if they were going to turn off! :grin:

I have also ordered my Hubitat which will be delivered by Amazon tomorrow.

I appreciate the concern with regards to the AC. I can also increase it to 5 Min. The door is to my office in my yard and is not opened very often. The problem is when one of my kids opens it and then leaves it open.

Thank you everyone for the support!

1 Like

You can also add a notification to that. This would allow you to receive either a text, Pushever to your phone or to the speaking device of your choice (some additional work may be involved).

1 Like

So I created a rule. Besides the times which I shortened for testing does this look correct?

If door is open for a set amount of time turn off Outlet. If door is closed turn outlet back on.2019-07-01%2022_13_16-Office%20AC%20%5Btrue%5D

Looks reasonable to me.

You don't have a cancel on truth change for the true delay. This means us the door is open and switch is off, you close the door and reopen it immediately, the switch will turn on 10 seconds later and be on for 50 seconds.

Ryan thank you for responding. Not sure what you mean as I am new to this process.

My experience is as such with this setup.

If I open the door for a few seconds and then close, the zen15 does not shut off.
If I open the door for more than 1 minute the Zen15 does shut off after 1 minute.
If I close the door the zen15 turns back on after 10 second delay.

And that is not what you want to have happen?

What I am saying is, if you want the device to stay off when you momentarily CLOSE the door, you also need a cancel on truth change for the 10 second wait for the true part of your rule. Without the added cancel, if the door was open and your zen 15 was off and you momentarily close the door and reopen it, after 10 seconds the zen15 would turn on, even though the door was open. Then 50 seconds later it would shut off again. But it would turn on and then off it the door was open and momentarily closed, If you add a cancel to the delay on the truth change for the True action (turning it on) that will prevent that from happening.

2 Likes

ok thanks I need time to digest this. :grin: Thanks for the explanation. This is my first real home automation experience so I have never had to deal with this logic or scenarios.

I got it now! Thank you!

2 Likes

So do I have to delete the automation and re-create from scratch? Having issues trying to edit.

Could not figure out how to edit existing so recreated.2019-07-02%2018_48_56-Office%20AC%20%5Btrue%5D

1 Like

Oops first should be closed and not open. One little error and it all goes to hell. :grin:

Now really fustrated. Not sure if this is a bug but I cannot get the rule to say True. Only false no matter what I click. Maybe it is a bug?

When I create a new condition for Door Sensor closed it defaults to false every time. If I choose Not this it shows True. I did an upgrade so not sure if something has changed but I cannot replicate the True without the NOT2019-07-02%2019_28_19-Office%20AC%20%5Btrue%5D

Well, your first rule looked at OPEN and your new one looks for CLOSED. That's why they are opposite. NOT closed = OPEN and NOT OPEN = Closed.

I did not realize that it shows the current status when creating the rule!

1 Like

So now that I have this I now see 4.0 is here and since I am just starting out I would prefer to move directly to 4.0. Could someone provide me with an example of this rul in 4.0 and also any places that have in depth tutorials on 4.0 for rules?

Sorry, but I actually laughed out loud... :joy: RM 4.0 was literally released about 24 hours ago. There are no in depth tutorials yet. There is a thread dedicated to RM 4.0, where you might want to post your old rule and ask for RM 4.0 advice. Most users are somewhat cautious and havenā€™t even upgraded their hub firmware yet, as usually numerous hot fixes are in order to address bugs that are found.

Hereā€™s the RM 4.0 documentation

https://docs.hubitat.com/index.php?title=Rule-4.0

And the thread..

1 Like

Ok I was assuming that documentation would be released before going live with it but I understand that is also a huge task and would have probably delayed the 4.0.

I am only now deploying Hubitat at my home so I have not really created any rules. Just this one. I will repost in the rules engine.

Thanks

1 Like

This rule would be tricky due to cancel on both sides of it. Easiest way to do this would be to split into two rules, one for open and one for closed. It's possible to do using Private Boolean to control the cancels, but not worth the effort imo.

The documentation at release was the post that @ogiewon referenced, which includes tutorial on converting from Rule-3.0 forms to 4.0. The app documentation was posted a few hours later, also linked by @ogiewon.

2 Likes