Rule machine doesnt trigger when app is not running in the background in my Samsung note10+

Hi. Is there anyone in here having the same issue similar to myself where if i dont open the app in my samsung note10+ phone, the rule machine i created doesnt run at all. I made sure to exclude hubitat app in device care > memory. Made sure allow location all the time and allowed all notifications. Also set the app to only report presence when moving.

But even adter doing all those things, its still a hit and miss.

My trigger is if my wife or myself arrive (using my phone note 10+ and my wifes iphone as presence sensor), unlock the door. If time is between sunset and sunrise, unlock the door and upon opening the door, turn on main entrance light.

Im very new to hubitat and would appreciate if someone can point me to the right direction. Took a loom at the more simple light automation but i dont see an option to add condition when door opens, only then turn on the entrance light.

Thank you in advance!

This shouldn't be happening. Rule Machine--and pretty much everything on the hub (except for specific tasks that may require it, like sending a notification through the mobile app to your phone)--does not rely on the mobile app for functionality at all. Everything runs locally on the hub.

So, there must be something else going on. The question is what. I don't see any information about the rule itself or why you think it isn't triggering, but here's something that may help: turn on logging for that rule (this is an option on the first page in the rule). At least "Trigger" and "Action" logging are generally the most useful. Then, you'll see whatever the rule thinks it's doing. Perhaps it really isn't triggering (and then you won't see much at all--but could check the device/event in question), or perhaps it is running the actions but whatever you expect to happen there isn't working as you expect. "Logs" will be the key to figuring this out.

You may also want to take a look at the Motion Lighting app.

1 Like

Tries to embed a screenshot of my rule but got the error saying "you cannot embed an image in the post".

Tried logging the triggers and actions and went to the logs. I dont see any triggers but saw a bunch of actions skipped.

Thanks in advance!

Note: im using my note10+, is that why i cant upload an image within a post?

Looks like you only joined an hour ago. So your posting abilities are somewhat limited until you've been around a little longer and have a few more posts.

1 Like

Oh ok. Would be nice to be able to upload a screenshot as itll be easier for someone to see where i screw up lol.

Does make it easier, might talk to @bobbyD to see if he can give you a boost in abilities....

That'll be amazing! Thank you @thebearmay!

While waiting, how does one test a trigger based on presence. I see a button that says "run actions" but when i go to see logs, all i see are actions (skipped) even though i selected "trigger" and "actions" in the drop down logging field.

Triggers in Rule Machine refer to events, not states/conditions. The only way to test them is to make the event happen. :slight_smile: So, in your case, I suppose that would be arriving home (though if you just want to test the actions, either "Run Actions" or adding a virtual device or something more easily within your control as an additional trigger would also work).

But now that you say that: if you're usuing the mobile app for presence, and you think it's not sending the events to trigger your rule, that could very well be! This tends to be unreliable for a lot of people. There are a few options for getting presence into Hubitat, and here is a recent post where a user compared several of them:

Note that the mobile app isn't even on their--maybe he found it too unreliable? :slight_smile: I don't know (just guessing). But one of those options may work better for you. Some can be done with native Hubitat drivers and just a different mobile app, while others require something extra (like the HomeKit option I use, which needs a HomeBridge "server" and a HomeKit hub of some kind, like a HomePod or Apple TV). There are also more options not on that list.

Not ideal, but at least it works better!

1 Like

Yup. I expect that when the app is not running that android is shutting the background task and not allowing location to be updated.

I am using life360 and not the HE app for presence, but on the device page in HE, if you select a phone device and then click on the events page, you should be able to see a history of when the presence was updated.

@bertabcd1234 thanks for the link. I'm also open to using homebridge via my synology but might need more reading on that side. I also wonder if an old ipad pro is sufficient to act as hub?

@steve.maddigan i checked life360. Question for you.

  1. Do you need to be a paid subscriber to the app in order for it to work?
  2. Do i need to install a driver for hubitat to recognize life360 as presence sensor?

Thanks!

Here's a screenshot of my rule for reference.

Thanks @thebearmay and @bobbyD for letting me upload image in post.

  1. No I do not have a paid subscription for life360. I just use the free account. It doesn’t seem to expire. I used it before the HE came out and then three months later switched back to it. I guess that’s roughly a year and a half ago.

  2. There is a built in app called life360 connector. Install that and plug in your life360 credentials and it creates a device.

Technically, yes, but I had really bad luck with that (it went offline all the time, probably because the iPad was sleeping--even though you'd think that if it were a hub they might do something to help with that), and I notice that Apple no longer lists this prominently in their docs as an option anymore, though it still does work. Apple TV and HomePod are the ones that they do mention, and my HomeKit experience--including presence automations--got a lot better after I switched to a HomePod Mini for this (pretty much 100% except for when I moved it to a corner of my house that apparently had spotty Wi-Fi; this is all I ended up using it for, so an Apple TV for a bit more money might have made more sense, but eh).

Created device

And since I was switching back and forth a bit I change a virtual presence and then use that in other rules.

I looking at this rule now, I wonder if I could just use the ā€œtrack triggering deviceā€ like I have done with dimmers. Hmmm

Oh. And there are going to be people on here that will look at your rule and say that you should never use gps presence and a single input to unlock your door and that you should combine it with a wifi sense etc. I say if you are comfortable with your setup, do what you want.

Last note: I keep drive detection enabled. It increases the ping rate when you are driving. Normally the app uses 1-2% of my iPhone 10 battery.

Thanks for answering my questions.

So i tried adding life360 via hubitat and was able to provide credentials and selected my circle. However when i tried to add my place, it doesn't show up the two places i setup in life360 app. I have setup home address and office addresd. My assumption is it should show up in hubitat as my setup circle did.

Maybe im missing and steps?

Thanks for those inputs @steve.maddigan. with regards to combining my gps triggers, would "validate location on network change" setting help? My assumption is if that's checked then my presence won't be triggered unless i reconnect/disconnect to my wifi which essentially only happens if I'm steps away from my main door.

This app may be more what you are looking for over the built in life360 support.

I believe the built in app only supports one location. I am just using it for my home location.

Please take a look.

Short answer is I don’t know.

Most people are using a combined presence. I think there are a few variations of this but here is a popular one.

I want my lights turned on already when I drive up my street so I rely on life360 only. I get notifications on my watch and I have never had a false presence detected when I wasn’t at home and I have only had it miss my arrival once - actually it was just delayed by 5 minutes for some reason but came through eventually.

1 Like

Thank you for all your inputs. Will try life360 for now and then look into the combined presence once i can confirm that my rule is stable and working fine.

1 Like