Rule machine - as per the app developer, this app is no longer available for new installs, distribution, or support

I think I’m good. I took out the condition for SHM to be in disable status. I thought this would interfere with alarming if a door were opened while the system was armed. It works fine without the condition. Thanks!

1 Like

On Android, everytime I hit the back button, the entire app stops working with the “Unexpected” error. To get it working again, I have to back out to the beginning and restart. Any idea why this happens? I’m on the latest version of Smartthings and I’ve tried it on a phone and tablet. I believe it’s probably occurring on all android devices right now.

Yes, avoid hitting back, use done even if you don’t make any selection on the subpage.

1 Like

I have the following problem: I want my garage door to open automatically when someone comes home. However, given the geographical layout of the community, when my daughter walks eastward to the bus station in the morning (she does this rarely, but she did today) she technically gets out of the little “home circle”. She gets on the bus and then the bus drives westward towards the school, briefly entering the “home circle”. As you expected, the garage door opens as the bus drives by. This is obviously annoying (do read a security issue). The original Routines have a limit for presence so that I can say, yeah, open the garage door when she comes home, but only IF she’s been away for at least so many minutes. Rule Machine can’t do this, or at least not in an easy and intuitive way. I can think of a few ways to set rule conditions and rule truth or even a private bool, but is there any “right” way to do it? Or perhaps integrate this option right into the Presence condition in a future version?

Thank you,
Adrian

Actually, I think Rule Machine can do this (as a Trigger with delayed actions). However, I had a similar issue that was easily resolved. We live in the SE corner of a development that has only one way in/out (at the NW corner). While walking our dogs, we would exit/enter the edge of the geofence several times, causing undesirable results. The “fix” was to simply shift the geofence center point (it doesn’t have to be centered on your home).

1 Like

Now that’s a smart idea I’ll try. We never go on the other side of our house, we approach it from N-NW :slight_smile:

UPDATE: This won’t however fix the moments where the iPhone puts you in a bigger circle because it’s not really sure where you are - in techincal terms, locating error is say +/- 200ft. At this point, you may at any time enter the circle, even though the circle is shifted. I think the proper way to do it is checking the triggering device for silence (no state changes) in the last x minutes. A delayed action won’t work because I want the door to open when I get to it, not after I opened it, entered the house and then even closed it. It happened. So the “right” way to do it would be to set the condition so that the presence sensor shows presence, but shows “not present” for the previous X minutes and possibly where the garage door has been closed for some Y minutes as well to avoid the double opening I explained above.

Thank you!

You can do this with two rules. The first one is your Goodbye rule, and it does involve a delay for however long enough to deal with the false departure problem (use Cancel with this delay). After the delay, it does whatever else you want, plus it sets a rule Boolean for the second rule.

The second rule is your arrival rule, and it has a condition concerning that private Boolean, along with arrival of presence sensor. It won’t run unless the Boolean has been set, so it’s not going to open the door before that period of x minutes has passed, and then someone arrives. Both true and false actions for this rule set the Boolean back to false, disarming the arrival rule after the first arrival.

I agree, but it gets more complicated. Let me explain. We’re four of us with presence indicators and when ALL of us leave, a lot of things happen, including arming our Digital Life alarm. When someone comes back home, again, a lot of things happen. The “goodbye” rule would only happen if all of us left. I’d have to setup individual rules for each of us to set the boolean for an arrival rule - again - for each of us. So I’d have to have 4 individual goodbye rules, 4 individual arrival rules, and one global goodbye rule to rule them all. It’s a logistics nightmare to maintain these rules (say you want to change what happens when someone comes home). It can all be fixed with a little code in the trigger itself, using the myDevice.eventsSince(new Date() - x/1440) where x is the number of minutes and then parse through the list to check for any state change. That would help tremendously, I’ll probably fork your Rule app and do some work over the weekend, then you could probably embed it into your app if you find it useful. What do you think?

Thanks,
Adrian

I agree. Rule Machine isn’t the best tool when there are state conditions that govern a complex automation, since it is such a granular tool. For these type of automations, seriously a custom app is superior, and much simpler. I have one of these for motion lighting automations: I can almost do it with RM, but it’s crazy to.

Don’t know. Let me see what you come up with.

2 Likes

I’ll take that as a challenge :slight_smile: I always loved challenges, so I will let you know when I have something working.

Thank you again for your quick responses,
Adrian

You could do it this way, if here sensor is the only one you’re having a problem with.

Create a virtual presence sensor.
Create this rule:

Conditions - presence sensor present, between two times (hours outside of school 3:30pm - 6:00 am).
Rule - presence sensor present & between selected hours
Actions for true - turn on VS
Actions for false - turn off VS

In all of your rules replace her sensor with the VS. This way, when she leaves in the morning it won’t turn back on until in the afternoon.

It’s not perfect, but it can work. Depending on her age. If she’s driving her schedule is less predictable. If she younger, is it’s very predictable.

1 Like

Most of the time we drive her to school. Sometimes she walks to the bus. Sometimes she walks back home from the bus. Sometimes the bus is late. Sometimes it’s half day of school. Statistically speaking, it’s predictable 90% of the time, but it’s the exceptions that kill the joy. The main problem here is timing. Walking takes more time and puts you on the edge of the geofence for a longer time during which your presence may toggle between on and off for reasons completely outside of SmartThings’ scope (i.e. SmartThings is not in control of the factors that lead to said situation). For instance, same problem does not occur with driving, because we’re quickly out of the geofence with no brief reentry. The only thing that can “fix” this is the slow down (averaging, if you want) of the on/off toggles of the presence indicator/device. That is, filter out any “false positives” by creating a window during which any subsequent state changes are ignored. I can easily do this with a SmartApp but that would completely break the control model where control logic would be hard coded into an app that may or may not be configurable. As a programmer, I like separating data and code. And the rules are all in the “data” category. I’ll see how I can implement some additional options for each capability where “radio silence” can be used as a parameter as well. It’s definitely not impossible, so I’ll take a shot at it.

You can also do this in the api by changing the default timeout on presence. Look under my locations.

1 Like

Sorry, I can’t find that. Can you please guide me to it?

Thank you,
Adrian

IDE / My Hubs / View Utilities / Presence Timeout

Thank you, found it and set it to 10 minutes, will test. I’ll still try and add an option to Rule though, for other devices like the garage door (i.e. don’t open the garage door if it’s been open during the last 10 minutes) - for when the hub executes actions randomly late :slight_smile:

Thank you guys,
Adrian

I solved a similar problem at my house (dog walking) by widening the geofence.

Not saying this is right for you, but it worked for my use case.

The problem with that is the garage door would open too soon, especially when she’s walking back from the bus stop…

Hi Bruce. Joe here. First post and all…
I’ve been playing around with Rule Machine for a while now and am really enjoying it.
I attempted to create a rule today that would increase thermostat setpoint, and then decrease it after a delay.
I’m unable to decrease the setpoint because there is no “-” (minus sign) in the gui. Instead there is a “.-” (android).
Thanks for your contribution!

My keypad on Android comes up with - + .

Press - then a number, then the check mark for done. It should show adjust -n. You can even use a decimal point for fractional degrees Celsius.