I’m running into an issue where it doesn’t seem like the iOS client updates my tracked position when I am away from home. For instance, I am at work right now by my dashboard reads that my GPS position is at home (~5 miles apart).
I have HA set up on my local LAN and it is only exposed through a VPN connection which isn’t permanently on. Over the weekend I’ve been experimenting with the iOS app + being away from home (with VPN on) and I don’t recall seeing my location ever change.
Further testing - I disabled autolock on my phone and left it on and connected to the VPN for over a couple hours now, while being in the app. It never seemed to update my gps location
@groom thank you for the response. I am not using pyicloud. I am relying on the native GPS reporting of the iOS client. I cant get it to update my location in HASS regardless of what I do. then sometimes suddenly it will change to the location i was at after i’d be gone for a while
Indeed, the location information needs some work. I am using the app on two devices (iPhone 5 and iPhone 6) and the location does not update for both devices. I have enabled all the permissions.
I am, currently, using the iOS app location along with other presence detection. I am sure that app will improve over time and hopefully we can just use the app for presence.
Indeed, that is my hope too - this seems like a great start. I just went out for a trip and didn’t get any auto updates. Publishing my location manually did work however, so it seems my config is all good.
I currently already use the iCloud tracking module inside the Home Assistant.
Is there a way to disable the tracking for the App?
For the people who want to test if it is currently pushing out the location, i’m using a telegram bot to tell me for example who got home or arrived at work.
This works great
Not working reliably for me either, i do get a notification of significant change on my phone screen, but home assistant doesn’t get updated unless i open the app.
I’m sure it will improve, but this is the main reason i am testing this app as i have yet to get reliable presence detection working with any of the current available options.
Annoyingly even IFTTT will not trigger properly at the moment, which was working well hitting the API
I am coming from Smartthings, which, whilst being awful at pretty much everything else, was very very good at presence tracking.
# Sent message when arriving at home
automation athome:
trigger:
platform: zone
entity_id: device_tracker.iphone (your phone entity here)
zone: zone.home (zone set to the desired location with radius)
event: enter
action:
- service: notify.telegram (your telegram bot entity here)
data:
message: Welcome Home Boss!
# This will override the default home zone
zone 3:
name: Home
latitude: #.######## (latitude goes here)
longitude: #.####### (longitude goes here)
radius: 250 (desired radius goes here)
icon: mdi:castle (change your home icon into a castle)
Thanks for all the suggestions, unfortunately i sold my Smartthings hub, wishing i had’t now as that seems like a good solution. I do very much like the idea of a hardware device, like the smart things sensor, that don’t rely on a phone to detect presence, but i’m guessing such a thing doesn’t exist for home assistant. Do you think there is any way to make the smartthungs devices work with home assistant if we where to add a zigbee radio?
I have tried locative, but it didn’t seem to work, nothing ever showed up in home-assiatnt, and when i tried to hit the correct endpoint in home-assiatsnt using postman i got a 404, so i’m obviously not setting it up correctly? Any guidance on how you got it working would be great? Are you using geolocation or iBeacons?
I would also be very interested in getting this setup using iBeacons, bluetooth LE rather than GPS so it doesn’t hammer my phone battery. But it seems locative using GPS even when the setup zones are setup to look for iBeacons, unless i’m missing something?
Any other way to setup iBeacons that i’m missing, not adverse to buying a decent amount of them and placing them around the house as needed, and using the same ID for a zone?
For Locative I just followed the instructions here, then added a single GeoFence called home.
Locative does not report actual location, it just makes a call into HA when you cross a GeoFence so you will need at least a GeoFence for home - much light the ST app.
Ok, i’ll give it another go, last time nothing ever showed up on the home assistant page.
Are you using get? Seems odd to me to be using a get request rather than a post, but that’s what the instructions say on the page?
Now i’ve looked into it, seems it doesn’t properly support using iBeacons with the same ID but different Major and Minor numbers, which is not going to work for me as i am going to need multiple around the house to keep the tracking working.
Oh and another thing that may have tripped you up - you actually have to trigger an entry or exit using Locative before HA will “see” the device. It will then appear in known_devices named as a large string of letters and digits, so you will need to add a friendly name etc. Running the test will show if you have connectivity but that doesn’t actually register the device. So set it up then go for a drive!
I’m going to take a long look at the location issues shortly. For the moment, I confirmed that your location should be updating in a few situations:
App is opened for first time/restarted, will send current location.
Significant location updates which should be fired every time you jump to a new cell phone tower. This is sometimes hit or miss depending on a number of factors that Apple doesn’t really publish. More information is available in this StackOverflow answer.
You enter or exit a zone defined in Home Assistant. The radius is set by you in the YAML configuration for Home Assistant.
You manually trigger a location update.
(This is not implemented yet, but will be soon-ish) A registered iBeacon is seen. iBeacons will most likely be tied to zones.
I don’t really want to even offer constant location tracking as an option because it’ll just constantly kill battery. But I am open to any other suggestions on how to get around the location delay issues.
From my testing, I can confirm 2) happens for me usually about 1/4 mile from home and then not usually again. 4) works but I haven’t seen any evidence of 3) working yet, and haven’t explicitly tested for 1)
As I mentioned above, I get good results with Locative and it is open source:
@aimc - So was finally patient and it’s now working perfectly, though i am still disturbed by using Get for a Post, but i guess i’ll have to get over it
@robbiet480 - The app is great by the way! But for me the location bits are not working. I do get notifications that i have had a significant location change, but until i open the app it never seems to update Home Assistant. I did notice that the app is not registering for background app refresh, not sure if that’s related.
Happy to do some more in-depth testing for you if you like. Also agreed on the battery front, i think iBeacons are the way to go, i’m waiting for some new batteries for my Estimote beacons and i’m going to test them with Locative. The problem i have at the moment is that Locative will not match wildcard major and minor id’s so i’m going to have to create three zones all called the same thing with difference beacons in them, which may or may not cause oddness to happen, i guess we’ll find out later today