Is there a way I can use my phone as presencensor på mit wifi for a rule on Hubitat?
I think geolocation is a little unstable at Hubitat.
I've tested life 360, it uses quite a lot of power.
I use android mobile, and have google wifi.
Maybe with some ip from the mobile of? If it exists
Look on the community apps for Combined Presence - by joelwetzel. This works great
Im using Iphone wifi presence driver and it works perfectly. Dont be mistaken with its name, its for all type of wifi devices.
I use Presence Sensor by @Johndc7 combined with @joelwetzel 's combined presence sensor. Works well.
What other forms of presence detection do you use with the combined presence sensor (and why)?
Combined presence is an app that does a nice job of tying together a WiFi presence sensor with either geolocation-based virtual presence sensors, or a zigbee/z-wave presence sensor to control the state of one output virtual presence sensor.
Since @jwetzel1492 initially developed his WiFi presence driver and the combined presence app for iPhones, it’s necessary to work around the fact that an iPhone will always shut its WiFi connection down after a period of being asleep (seems like about 10 mins on average for me, but I don’t exactly measure or record this).
So while WiFi is great for identifying a phone (and the person using it) as present, it’s not useful on its own for confirming that someone has actually departed.
As mentioned, both the driver and the app will also work just fine for android devices too though.
I use both my wife and I's iphones as presence sensors and I have an st presence fob on each keychain. I use wifi presence ssensor in cobination with the fobs. So if I leave the house on my own, my phone and fob are with me but if my wifes are at home no triggers. If we leave together shes invariably with me and her phone comes but her fob stays and triggers happen. If im gone and she leaves in her own car and both sensors are with her, triggers go off. (usually all lights out and locks are checked. If a lock is unlocked and triggered by the lack of sensors then we get a message on our phones that we're dumbass' for leaving the doors unlocked). The reason is because my phone may not be on wifi for a specific reason (usually maintenance of some sort) and I don't want it trigger something unnecessary. So combining sensors works well for me
Combining sensors for multiple people into one output sensor is another good use case.
Does it works with an Android-phone as well
That's a big part of the reason behind how I designed my presence app. Since the events are reported from the phone (and not from pinging it), they are only triggered when the phone actually disconnects from the network and is not affected by it going to sleep. It would support iPhones as well except that I don't want to pay for an Apple developer account.
It sounds like a helpful solution for presence with android devices. I don’t blame you for not wanting to jump through apple’s hoops though, particularly if they expect your money up front to get into the App Store.
For iOS devices, I think it makes sense to use a Hubitat groovy app to tie other iOS mobile presence-based solutions that are available in the App Store into one Hubitat device.
The reliability is far greater than any single mobile presence-based solution that I’ve ever seen.
Yea. Apple charges $99 per year to to distribute apps on the app store (free or not). Google charges $20 for a lifetime membership. There's a small difference there lol. On top of that I would have to completely rewrite the entire app in C# (the Android app is Java). I also don't even use iPhones so it wouldn't really be worth it for me.
Another fun thing I added is the ability to use lock codes to detect presence. Everyone has their own code assigned in lock code manager. When your code is used, you are assumed to be present for a set (default 5 minutes) amount of time. I use this to fill in the gaps if the phone takes too long to connect to the WiFi. It usually doesn't happen but still keeps me from triggering the alarm when it does.
The other benefit of detecting presence from the phone instead of pinging from Hubitat (besides speed / reliability) is that I can have multiple locations setup. A cool example I like to use is having a preparation mode. This mode is the same as the normal home mode without disarming the alarm. When I leave work, it goes to preparation mode and turns on the heat / AC and gets everything ready. When I arrive at home, the house is warm and it greets me as I walk in
I would in my experience, it seems to be around 99% accurate. There are small glitches every couple of months but overall it's reliable.
If you are looking for a cost-free and app-free solution for iPhones and have a compatible iPad, Apple TV, or HomePod that can act as a “Home Hub” then you can just use iOS Automations and Hubitat’s Rule Machine or Maker API.
Been doing this for about a month now and it’s been 100% solid.
Best part is, because of how HomeKit works, you don’t even need to expose a cloud endpoint. It works off local end points even when your phone is off your local network because the endpoint is being called locally from the HomeHub device connected locally on your network.
I am not a developer, just pieced this together by connecting examples of other things I’ve read via trial & error so there’s probably a better way to do this but here’s how I do it:
- Open Apple Home App
- Click the “Automation” tab in the bottom nav.
- Hit the “+” icon in the top right of the Automations screen
- Setup a trigger event for when you leave (or arrive) home.
- After, when it asks to select a scene or accessory to automate, you’ll want to scroll all the way to the very bottom of the list and you should see a section called “Advanced” with a link for “Convert to Shortcut”
- Once you’re in the shortcut flow you can delete the empty accessory placeholder sitting at the top by pressing the “x” icon in the top right of that module. (Unless you want to ALSO control an accessory in this flow, then you can keep it).
- Hit the “+” icon and search for “url”
- The first result in the list will literally be called “url”
- Paste the local (or cloud) endpoint from Hubitat’s Makers API (or rule machine) here.*
- Click the “+” icon and search for “url” again. This time you are looking for a green icon with a white arrow named “Get contents of URL”
- Change the field “Method” from the default value of “Get” to “Post” *
- Hit the drop down for “Headers” and “add a new header”
- In the “Key” field type”Content-Type”
- In the “Text” field type “application-json”
- You can leave the “Request Body” section empty for now, just hit “Next” on the top right to advance.
- You should see a summary of your automation. The trigger will populate but the shortcut might look empty. That’s ok.
- Try the “Test this automation” link at the bottom to validate if it’s working.
- Hit done in the top right corner and that’s it.
I suggest creating a notification event in hubitat whenever your link is hit so you can confirm the communication is working on/off network before you get fancy with follow up actions in Hubitat.
I ran notifications only for an entire week whenever I left and arrived home just because I wanted to see how accurate, fast, and consistently it worked first.
*For steps 9 and 11, if you want to get fancier and use Maker Api to change the state of a specific hubitat device (or variable) then you’ll just need to pass the device ID and action in step 9’s url and then in step 11 you’ll want “Method” to be “Get”.
Will look similar to the example image attached below where I am changing a variable I exposed (4291) via local end point from Maker API to “On”.
That’s a great summary of how to setup HomeKit as the presence sensing app on an iPhone and feed geofence crossing events to Hubitat with iOS Shortcuts and Maker API.
I would only point out that what works 100% for one person may not for another. Mobile presence seems like a tough thing for many apps and many devices to get right, and everyone’s home environments are a little different.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.