LAN devices such as iPhone

Hello. Looking for some guidance here. I have recently joined the Hubitat movement and have been very pleased with it. However, I am baffled by something that I hope you seasoned veterans can help me with. How do I discover or add my LAN connected devices such as my iPhone? For example. I would like to set a rule that when my iPhone connects to the network some lights are turned on or the mode is changed to "home". I'm sure you get my drift here. For the life of me I can't seem to find any information about this. I assume it is possible because the Hubitat marketing video with the family indicates it is. The women comes home and the man says "as soon as she gets home the Hubitat recognizes her presence". I'm assuming this was done with her phone since he hands it to her at the beginning of the video.

Thanks in advance.

Homebridge is your answer to this question.

Homebridge. I did see something about that. I will have to check it out. If you happen to know of a good tutorial let me know. Thanks for the quick response.

its a bit clunky to get working right now, but it does seem to be quite reliable once all the moving parts are in place.. Hopefully one day HE will integrate HomeBridge, or just be able to talk directly to HomeKit.

The concept is that with Apple's HomeKit the iPhone works great as a presence device without draining the battery. So you set up HomeKit to send automation events when the phone arrives at or leaves the house. To get these events from HomeKit into HE requires HomeBridge, which is a software package that runs on a middle-man server device such as a RaspberryPi or NAS. I run it on my Synology NAS thats always on. Hubitat talks to HomeBridge that talks to HomeKit and vice-versa.

And in case there weren't already enough H's... hope that helps.

The native, built-in method for what is known as mobile presence detection, is to use Life360. That is what is used in Hubitat's video. Using Life360 is fairly straightforward. Here is the link to Hubitat's documentation where you can learn more. Also, if you have any issues getting it set up, please send an email to support@hubitat.com.

https://docs.hubitat.com/index.php?title=Life360_Connector

Welcome to the Hubitat Community!

Thanks jon1. I have a spare mac mini that I'm going to try and get up and running with Homebridge and home kit. I'm sure I will find some videos on YT to get me started.

I will check it out. Looks like it is a great solution for the phone. I think homebridge may be the answer for all the LAN devices. Thanks for the tip on Life360.

That same video was what my hope was for HE when I jumped on board, although I knew to expect a little more work and less of a smooth start.

It would be great if there was more easy presence options like the what video could make potential buyers believe.

I think HE should integrate lan based presence functionality into the phone app they are working on... that would be awesome.

1 Like

I'm playing around with multiple methods on my phone for presence detection. Some are based on LAN and some are based on geolocation.

  • Life360 - has direct intregration with Hubitat (geolocation)
  • Locative - works great with Hubitat but no longer a supported app (geolocation)
  • HomeKit - using homebridge to toggle presence on/off in Hubitat (geolocation)
  • Fing - this one is a little out there but its network security device that monitors the LAN for devices and other things. They just added IFTTT support and it works really well. (LAN)
  • IFTTT - the mobile app has presence built in (geolocation)
  • Ping Script - a custom solution I wrote and run on my pfsense box that just pings the phones and sets the presence on/off. (LAN) I'm still playing with this.
  • Alexa - recently released an update that allow you to setup routines based on location. It works if you have an echo to work with.

Some findings.

I have these running on two different phones. For anything LAN related your WIFI will need to pick up the device outside the house if you want the actions to act before you walk in (such as disabling any alarm system). Also with iPhones they can drop off the network when sleeping for up to 15 minutes. So you can't really mark them as away until they have been offline for 15 minutes. Android phones can be adjusted. Same with coming home, your phone may not even connect to the network right away if its sleeping in your pocket.

With geolocation apps, I find if one of them dosn't update on the phone they all fail to update at the same time on my phone. If the phone is sleeping I may arrive at my door and nothing has updated. Then when I unlock the phone they kick in. Doesn't happen all the time, but happens.

One of the best solutions is combining both geolocation/lan into one solution so you get the best of both worlds. You can use Cobra's app called presence central to do this nicely. Then it at least makes it a bit more reliable.

I don't think there is any perfect solution yet but mutliple solutions combined do help improve reliability.

1 Like

Wow. Crazy good information. I at least have a lot more to work with than I did over the weekend. Thanks for all this helpful information.

I have also been looking for something that is more reliable than Life360. My issue is that cell phone coverage is not good in my location and therefore it seems to miss certain events.

My idea was to use something like this: Presence Detection using DD-WRT Router Script - Community Created SmartApps - SmartThings Community

but I haven´t had a chance to look at it yet for HE.

Another thing that may be possible for Android users is to use Tasker and/or Macro softwared to enable tasks based on conditions. I believe that Sharptools has something that works for Smartthings, so hopefully they will open that up for HE.

I personally would like something as simple as possible, don’t need another thing in the middle to fiddle with.

The Life360 policy scares the crap out of me. The latest news on Ring and their video data collection and access makes me want to keep things as local and limited as possible.

GPS and LAN functionality seems to be a good mix. Again it would be great if HE included it in the upcoming app.

For geolocation take a look at locative. There are versions for iOS and android and it communicates directloy with the hubitat cloud and the maker api app. No other 3rd party service involved.

1 Like

Thanks Gavin, it’ll be awhile before I implement this, but it’s nice to know all the options. :slightly_smiling_face:

There's another technology option to consider too.. Bluetooth.

Does the HE hub even have Bluetooth built into it physically? Even if it doesn’t, a Bluetooth dongle can be pretty cheap.

This could be a good option, except the fact that it would somehow have to pair with multiple phones at the same time unless it just checked to see if it could pair.

Also at least for me, there would be another issue as I work from home and typically have my AirPods connected to my phone at all times.

I got Life360 up and running and created a simple rule to switch it to Away mode and send me a text message. it worked this morning. Was able to get Homebridge installed on an older Mac Mini but really haven't seen the benefits yet. I can use the Homekit app but need to delve into adding other network devices to it and creating rules around them. Fun stuff for sure.

Life360 works well. Some don't like it because of the privacy issue. It does however seem to miss events every now and then but overall it works.

Homekit is ok too.. yesterday it missed an event for me again for some reason. I was at home and it still wouldn't mark me at home while the others have. So not sure what happened there.

Is Tasker able to sense connection to a particular wifi. If so, they could be used for presence. Android only.

No - this would have to be some other device providing the integration and linking to HE with the appropriate status - through MQTT or something. There are lots of these apps though .. perhaps a HomeKit plugin even.