[Released] Rule 4.0

@bravenel, It seems that it's not possible to use a simple condition with the condition being private boolean of a different rule. I want to set the PB of the other rule, but only if the PB is false. Is that by design?

Edit: cant do it for a IF THEN statement either.

Yes it is. Only a the rule itself can read the state of the private Boolean. Why don’t you use a global variable for that? Global variables can be read and set by any rule.

Even though I am not sure why you want to do it that way. If the PB is true, what is the problem with setting it to true again? It won’t invoke a change...

That's why they are called Private Booleans. They are not accessible for testing in other rules. You can use a Boolean Global Variable instead.

The Wait for Condition bug has been fixed. New hot fix release: Hub Update 2.1.3

This bug was fixed, get the newest release, although it was fixed in prior hot fix.

This bug with editing IF-THEN has been fixed in latest release. Hub Update 2.1.3 - #5 by bravenel

Thanks! You guys are awesome!

TY Bruce and the rest of the team

Rick

Ok, I realise it is a private boolean now.

@bravenel

I've scene this error a few times. App 5 is Rule Machine.

That's a database error. I've seen it also, just a time or two -- as if it was some transient glitch.

Need help with what is likely to be a simple 4.0 rule but I’m just not understanding most likely...

So I have closets in my bedrooms that are double sliding doors. I have a contact sensor on each door (left and right). I want the light in the closet to come on when either door opens, but only shut off when BOTH doors are closed. If both or one door doesn’t close after 15 minutes, shut off the light (so it’s not on all the time if someone forgets to shut a door).

The rule I’ve created turns on the lights, but when I close the doors the lights do not shut off. I’m also not understanding how to add the delay for turning the lights off after 15 minutes if the doors are open.

Any help would be appreciated. Thanks!

Insert an ENDIF before the second IF.

1 Like

Either what Mike said above Or

Change the second If to ELSE IF, then put ENDIF at the end should work.

1 Like

Built in variables for actions in Rules 4.0? I am converting a lot of WebCore pistons from SmartThings to Rule 4.0. And one thing I have been looking for is what variables are pre-defined. in SmartThings when I had a list of devices that would trigger an event the variable $device would be populated and I could use that to build strings for notification.

For example I have 5 leak sensors and I set the trigger to have all 5 devices. One of those statements would trigger the rule and then in actions how do I determine the device/rule that triggered it.

I went to your documentation page and couldn't find anything on variables and searching hear hasn't turned up anything but the new local variables. Is there a article or documentation page that I am missing?

Thanks.

There is:

%device% will give you the device name that triggered the rule
%value% will give you the value of the device that triggered the rule
%date% gives you the current date
%time% gives you the current time

%variable-name% will get you the value of global/local defined variable

@bravenel, it might be helpful to others to show the internal variables in the wiki. Especially if there are other variables

2 Likes

After the On command add:
Off: Master Bedroom Closet Light --> delay after 00:15:00
This will turn the lights off after 15 minutes with the door(s) open. The delay is added when you add the off action. On the action page there will be a toggle to delay action. Once set you can enter your delay.

1 Like

In the following rule, when the Kitchen goes off then I turn off a couple other things after a short delay. It works ok. But there is an occasion when the Kitchen doesn't go off for some reason. I want to have a longer delay if that doesn't happen and still turn off the last 2 items. What is the best way to add that in? In other words, if the Kitchen doesn't go off after about 10 minutes, turn off Flower and Bedtime.

Mine started working again after the prior update and rebate. It stopped working again after most recent update and reboot.

Chromecast Ultra with Google mini speakers.I am on lasted versions of Google Home and HE.

I have an issue where I have found multiple entries for setting scene's from "Groups and Scenes" in Rule Machine. I am converting a room from SmartThings/WebCORE/Action Tiles into Hubitat and have the following scenes defined:

When adding rules to rule machine 4.0 for actions I see multiple entries for each scene. Selecting just one of them checks all for that scene name:

And then on the rule page I see in the action the duplicate scenes after saving.

The rules fire just fine from the dashboard and the lights respond just fine but seeing 2 to 3 entries for a single scene concerns me. What I am trying to do is replicate my dashboard funtions for room presets and automation and have been testing using the "button" template on the dashboard:

Operating the dashboard and using the button functions everything seems to be working fine:

Ok, this is a UI bug. Will track it down. Do me a favor, when the next release comes out, please check this again.