Kind of rebooting Trigger automation with passive zones here as this is very related to the mobile app and I think Robbie is the right person to shine some light on it.
Spent some hours testing on this but I could have missed something, let me know then.
Situation:
iBeacons are located in the house. They should provoke an automation if an iPhone sees them (HA app reports this to HA). The house is in a relatively big zone.
Problem:
iBeacons only provoke an automation:
via a zone change.
if the zone is not overlapping with another zone.
if the zone is not passive.
The result is that it only works when giving the iBeacon zone a false GPS location outside of the home zone and making it non passive. And the result of that again is that a person would be shown to be in a location where he/she is absolutely not.
Proposed solution:
Add subzones to HA. Home as a zone and subzones such as garage, bathroom, etc.
Instead of using a zone change as trigger, use a template trigger on the longitude and latitude of the device. Compare it to the iBeacon zone. The zone should be passive so that only iBeacon can trigger it. When the device is in iBeacon range, it will take the exact lat and long numbers of that beaconās zone, so have unique zone coordinates.
In the automation, the action is performed, whereafter a position update for the device is triggered to āsendā it back to the main/previous zone. You might want to leave this out, or experiment with it.
Considering the GPS drift in iPhone coordinates, how might reliability be guaranteed? I use iBeacons to support arrival automation. The most recent HA releases have diminished reliability of the trigger.
OK. Currently I have two beacons, configured identically, marking my home zone. One inside the WiFi coverage and one outside WiFi coverage.The companion app sees the both beacons, but often times doesnāt pass zone coordinates to HA resulting in a failed trigger.
The app does not pass phoneās gps coordinates to HA when it sees a beacon. It tells HA that you are in the zone the beacon is linked to. For example, in testing I set up a zone 1000s KMs away from my current location. Once the app sees that beacon, it adopts the coordinates given to that zone in the configuration, and then will let HA know about that. (Not sure if it only passes the coordinates or already tells the zone name.)
I think if you set up your beacons to be linked to your home zone without it being passive, assuming you allow gps zone entering/leaving as well, you do not need anything from this topic. It should work unless the beacons donāt do their task properly.
Seems like something changed in the latest HA mobile app update. This makes the user actually enter the zone, something which is unwanted in my case. I am testing with radius 0 now, probably does not help. I saw that the 2020.4 update will have quite some changes to the location, so waiting for that before submitting a Github issue.
@zacwest, Iām not sure if my situation is the same as @Saturnus, but Iām seeing new behavior with the current App Store version of the app, 2020.4. I have āpassiveā beacon-based zones which have coordinates+radius inside my Home zone. My understanding of āpassiveā is that they should not set the state of device trackers, however with the latest app, my iOS device device_tracker location is being set to these passive zones. As a result, my āpersonā device thinks I am not āHomeā, but instead thinks Iām in the beacon zone.
Besides turning off the beacons, are there other ideas to get this scenario to work?
My understanding of the previous location handling is mirrored in the new one:
For GPS zones, enter and exits use the GPS information from the device as the location update.
For Beacon zones, enters set the location to the Zone directly, without going through locations. Exits do not do anything.
If this differs from your understanding, Iād encourage you to make a GitHub issue so we can discuss it there. Iām unable to find anything materially different between 2020.3.1 and 2020.4 with regard to how beacon zones are treated.
Well hmm, I just literally tested it:
Pre 22 July update: device enters iBeacon zone, but does not take that zone as device tracker zone.
Post 22 July update: device enters iBeacon zone and does take that zone as device tracker zone.
What I personally need is an iBeacon to trigger stuff but not influence my zone. I mean, I am home and might use the iBeacon to toggle a light, then I should not enter zone.light. That is why I posted the workaround in the 2nd post. It still works but cannot prevent anymore that for the specified delay the device will be in the iBeaconās zone in addition to having those gps coordinates.
If youāve got the test setup already, would you mind turning on a higher debug level so we can see what the app is sending for both?
logger:
default: info
logs:
homeassistant.components.mobile_app: debug
It will help me narrow down exactly whatās different. Feel free to redact the latitude and longitude information as much as youād like, I donāt think the exact coordinates matter there.
One practial solution is to use the beacon independent from HA. I removed my beacon from HA, added it to Pushcut (available on Appstore) and created a webhook-endpoint in HA, which is triggered by Pushcut (Backgroundaction), when entering the beacon-range. Also, if nessesary, you can create a second webhook-endpoint, when leaving beacon-range and trigger this by Pushcat too (e. g. light on/off). Inside Pushcat, you can define a timeout-period after loosing the beacon signal, for the leaving event. It works reliable so far here.
I missed out.
The last phone in the house upgraded to the latest version of the app some days ago. Now I canāt test anymore. I have been a bit to slacking with thisā¦
The endpoint will be created automatically by HA. Then add your beacon to pushcat, create a background action for entering your beacon zone in pushcat and trigger the url of your webhook_id, i. g.
Hi @DSchumacher2104
I am trying to configure the app but it seems donāt recognise when entering the beacon-range.
Could you please share your config for the app?
Thank you!