[Released] Rule 4.0

Yes that is correct I think.

I am looking for this as well. If I open the door then my yale lock should lock my door after 2 minutes the door is closed but if the 2 minutes have not been competed and the door is open again then the timer of the 2 minutes should restart. Is it possible?

Are you saying that you want it to lock 2 minutes after it is closed?

Yes but if before the 2 minutes I open the door again then the count down should restart. So lets say

  1. I unlock my door and open it
  2. It stays open for x time
  3. I close it so immediately 2 minutes count down should start
  4. If I open the door only after 30 seconds that I have closed it then the 2 minutes should start again from 0

In other words, only after the door stays closed for 2 full continuous minutes then the door should be locked.

I have a rule where I am using the "wait 2 minutes" function but the problem is that I do not know how to break the timer and restart it again if I open the door within the 2 minutes

**Trigger Event**
Door *changed*
**Actions**
IF Door Closed THEN
       Lock Door Delayed by 02:00 Cancel
ELSE
       Cancel Delay
ENDIF

But that will check if the door was in the state
of closed 2 minutes ago but not if the door has been closed for 2 continuous minutes right?

Yes, this will only lock the door if it has been closed continuously for 2 minutes. If it is opened during the 2 minutes, the locking gets cancelled.

Great will try. Thanks

Turn on logging for your rule, and watch it do its thing as you experiment with the door and lock.

Will try.
Another thing I have not been able to achieve is that if I am in away mode and my mode for any reason changes to home mode then I should receive "message A" but if it changes from away to night then I want to receive "message B". Is it possible?

In other words change from mode x to mode y to trigger any actions

Yeah, 60 modulo 17, not really every 17min.

I chose poor wording -- and may have provided an example where setting up cron itself to actually run every 17 min from an arbitrary start time isn't possible without putting any intelligence in the command being executed.

Is that what you meant by cron doesn't support "user defined intervals"?

1 Like

Cron is misleading. "Every n minutes" actually means every n minutes within an hour, starting over in each new hour. So Periodic only supports those intervals that meet the layman's understanding of what every n minutes should mean (i.e, it only supports values divisible into 60).

If you want some other interval, use a Repeat. Repeat uses chained runIns with resolution to milliseconds if needed.

I'm seeing an issue where I can't input variable's into an HTTP get request. I was trying to use %date% and %time% within an HTTP get request action and it would not send the http message. As soon as I took those out, they worked. Can you confirm if this is a bug or am I doing something wrong? I thought these would have worked the same way they do in sending other messages, such as notifications.

Can't put a screenshot up at the moment because the link has a key in it and I can't black it out but it's a standard URL with 3 parameters at the end.

I'm fairly new to Hubitat, but do lots of scripting and automations, so I'm not scared of it. However, I'm getting very frustrated trying to use the GUI to make rules. I get what needs to be done, but can't make it do it. I'm replying to this post because of others getting MALFORMED REPEAT, which is what I'm getting on this one. I tried to put in the stop repeating and the end if, but it seems to be indenting it wrong and I can't figure out how to move it. If this were a text editor version of this I'd be ok, but the GUI is making this overly difficult. Any suggestions would be greatly appreciated!! For context, I have the HSM delay 30 seconds after you tell it to arm, so this RM4.0 rule is supposed to make the buzzer chime every 2 seconds for those 30 seconds to alert you to its arming status UNLESS you disarm it and then it should stop beeping. Thanks
image

1 Like

You have to put in the End Repetition and not the Stop Repeating action.

The wording throws you of, a text editor wouldn’t have helped here

End Repetition says that you are done defining your actions that you want to repeat

Stop Repeating Actions is an action that allows you to stop repeating actions while they are repeating/executing

Not "Stop Repeating", rather "End Repetition".

@bravenel, I think I may have found a RM 4.0 bug that has shown its ugly head from earlier. I recreated a RM 4.0 rule based on a RM 3.0 rule and one of the actions sets an indicator light on a Homeseer switch. The method is passed 3 integer values.

I tried passing 3 integers of 7, 0, 0 and I get the following error:

Here a snippet from the method:

image

This bug was sqashed in RM 3.0 where it where it was not allowing 0 to be an integer if I recall correctly. Anything change this in the new iteration?

Scott

It's possible the bug fix didn't get carried across. Will look into it.

That was quick. Thank you!

@bravenel I think I found a bug in the capture devices action. After I select my devices, this is the window I get.

Only option is to cancel and try again.

Happens if I select 1 device or 20. No matter what type of device it is too.