Can Hubitat intergrate with Apple’s find my

  1. You need to install Node-RED on some computer on your LAN that is left on all the time. Most people use an SBC, but really you can run it on a Windows PC or a Mac or even using Docker on Synology.
    https://nodered.org
  2. Install/configure @fblackburn's node-red nodes for Hubitat.
    Node-RED nodes for hubitat
  3. Install the find-my node that @marktheknife linked to
  4. Send the parsed output from find-my to a Hubitat virtual device that has the location attributes you need.
1 Like

Only if you enrolled them into Find-My when you set the devices up.

2 Likes

Great point - assume that's pretty common. I must have as all my devices show up. I am going to try multiple accounts and see what happens.

1 Like

Playing around, as long as you have the account information, the location information seems pretty accurate... unless you turn off the the Find My Device option on the phone, etc. at which time it just keeps the last reported location.

2 Likes

Can this locate Apple AirTags ?

As a follow up, I've had my NR flow running for about a week now and the accuracy appears to be about 10.4 meters (~34ft) for an iPhone 7 and 12.8 meters (~42ft) for an iPhone 6s. YMMV

3 Likes

According to Apple any airtags registered to the account can be located using this also.

2 Likes

This method appears to be a good way to get presence for the iPhone. If anyone is interested:

Node Red Flow:

I'm using the Locate My Devices (input) so that I can trigger a request from the HE device based on the attribute updateReqTS, and also using an inject node on a 5 minute interval. I'm only interested in the iPhones for the accounts so the template node is set to;

{
    "name": "{{ payload.iPhone.0.displayName }}",
    "latitude":"{{ payload.iPhone.0.locationInfo.latitude }}",
    "longitude": "{{ payload.iPhone.0.locationInfo.longitude }}",
    "deviceId": "{{ payload.iPhone.0.deviceID }}",
    "currAddr": {
        "sNum":"{{ payload.iPhone.0.locationInfo.currentAddress.house_number }}",
        "sName":"{{ payload.iPhone.0.locationInfo.currentAddress.road }}",
        "city":"{{ payload.iPhone.0.locationInfo.currentAddress.city }}",
        "state":"{{ payload.iPhone.0.locationInfo.currentAddress.state }}",
        "post":"{{ payload.iPhone.0.locationInfo.currentAddress.postcode }}",
        "country":"{{ payload.iPhone.0.locationInfo.currentAddress.country_code }}"
    },
    "mapUrl":"{{ payload.iPhone.0.locationInfo.osmUrl }}"
}

Device driver I'm using on the HE side is at:
https://raw.githubusercontent.com/thebearmay/hubitat/main/appleFindMe.groovy

6 Likes

So I had this bookmarked and finally went to set it up. Can you confirm if you have 2FA on your account? I think that's where my problem is. I even tried making an app password but still just getting 401 Unauthorized. Not going to turn off 2FA so might be SOL. May have to try and hack the code to support the app password login.

Was playing with it the other day and noticed that they've changed something around the authentication but haven't had the chance to track it down.

1 Like

Its been broken since October, something that apple changed, bummer :frowning:

2 Likes

depressing - i get the same using an app-specific password (which i had assumed would be the fix...)

I am running a Mac as a Bluebubbles server and I just noticed that Bluebubbles can fetch the FindMy information from the Mac server and reports all the locations. Can I somehow feed these FindMy data to hubitat to work as presence sensor?

Hi, I am not technical at all, I only know to follow step by step instruction but I managed to use curl on a pi to GET all the devices' locations thru bluebubbles REST API. Can someone help me with what I can do to parse the data to get the information of each device and implement it on Hubitat using the device driver?

Short answer is that this driver can’t use that source for input. Slightly longer answer is that BlueBubbles looks to be returning JSON data, so a driver could be written to make the same HTTP calls that you’re doing with curl and parse the return.

Thanks, I hope this will generate some interests out there so someone with the technical knowledge will pick up the project. :slight_smile:

From what I read you need a Mac for this to work? Otherwise I would be interested.

I don't use it any more, but by default OwnTracks pushes location data into Hubitat.

1 Like

Looks interesting to me too. They do mention in the docs you can run it in a VM.

Yes, Mac is required. I think basically it works by fetching the cache from the FindMy app running on the Mac to report location. The doc mentions running VM, also any mac mini (after 2011?) would work, so I heard a lot of users got one cheap from ebay and went that route.