[Solved] Run an action between (2) times and when any of (2) presence sensors are present

I'm trying to execute a HTTP Get between (2) times of day if at least (1) presence sensor is present. For some reason the rule is not being executed. I can manually run the action and it works fine. Below outlines how the rule is configured. Any advice would be much appreciated.

Select Trigger Events
Each of these minutes: 5

Select Actions to Run
Send GET to: http://xxx.xxx.xxx.xxx:xx/adming?profile=7&user=xxxx&pw=xxxx

Manage or Create Conditions
Time between 6:00 AM PST and 10:00 PM PST TRUE
Presence_Sensor_#1, Presence_Sensor_#2 any present TRUE

Do you want it to be run periodically as long as those conditions are true or only once per day?

You want to put the action within an IF block in the actions section. Defining the condition in the conditions block doesn't automatically make rule machine consider those conditions.

I want the rule to run every 5 minutes but action to execute only when those conditions are met. I'm not entirely sure how to interpret your suggestion as I'm a bit of a novice but I will try :slight_smile:

You need an if statement before your send statement. Where it says "Select Action Type to add" select "Conditional Actions". Then, where it says "Select Which Action", select "IF (conditions) THEN". Then you need to select the two conditions you have defined and combine them with AND. Alternatively, you can select one of them and then add another IF statement with the other one. After your send command, you should add an END-IF.

Also, your current trigger will run the rule at 5 minutes after each hour, rather than every 5 minutes. Uncheck the 5, then select "> Every n minutes?" and type in 5.

I appreciate your assistance. I'm totally spoiled with Webcore but hate the dependency Webcore has on the cloud. I'm finding the Rule Machine UI workflow extremely confusing and I know of no way to show the rule like a batch of code as you can do in Webcore. I'm sure I'll figure it out after some more cursing.

Again, I appreciate your help!

Thank you @reid.a.baldwin. My rule is now working. I love how this community rolls!

1 Like

Just to make sure youā€™re clear on webCoREā€™s cloud dependency...it only depends on the cloud for its editor. All of the Pistons run locally on the hub. Some users even have hosted the webCoRE editor on a local Raspberry Pi or similar, to completely eliminate the cloud.

Hmm. I assumed Webcore had a cloud dependency because if I examine the External URL of a Webcore piston in Hubitat (or Smartthings for that matter) I'm given a URL that clearly depends on a cloud host.

For example: https://cloud.hubitat.com/api/xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx/apps/6/execute/:xxxxxxxxxxxxxxxxxxxxx:?access_token=xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx

Is there a method to create an External URL for a piston that has no dependency of a cloud host?

I donā€™t know the answer to your question, as i stopped using webCoRE about 3 years ago. Iā€™d recommend posting this particular question in the main webCoRE thread, as I am sure @nh.schottfam knows the answer.

If you go to
He console -> apps -> select your piston -> test run this piston

It shows both external and local network urls

1 Like

It does indeed. That is awesome. Thank you for showing me that!

1 Like