There are options to track multiple Android phone locations using the GPSTracker binding with either Owntracks or GPS logger, however these have some drawbacks.
If what you want to do is trigger events when Android phones (people) wander in and out of locations you can use Google Home geo-fence.
What you need to do this is to set up
openHAB Cloud Connector
and set up
Google Assistant
Create a switch item in openHAB for each android and location you wish to track. See the example item definition below.
Switch BobHomeGoogleGeoFence "Bob at home" ["Status","Presence"] {ga="Switch"[roomHint="Outside"]}
Switch BobWorkGoogleGeoFence "Bob at work" ["Status","Presence"] {ga="Switch"[roomHint="Outside"]}
Switch BillHomeGoogleGeoFence "Bill at home" ["Status","Presence"] {ga="Switch"[roomHint="Outside"]}
On each phone you whish to track you will need to download the Google Home App
On each phone connect Google Home to openHAB via the Cloud Connector, instructions at above links.
You will have to move your openHAB Google exposed devices to the appropriate Google Home App address (home) and add them to a room.
To add another address (home) to Google Home:
Open Google Home, press the +, select Create new home and type in a Home nickname, press continue and type in the address. Finally press next. The new home will appear in a drop down at the top of the App home page.
To move a geofence switch to this new address (home):
Open Google Home, long press the device mimic to be moved, press the settings icon (cog) in the top right hand corner then tap the home property. Click on the new address (home) and select next and assign it to a room, a custom room can be made at the bottom of the list.
Once complete the new home to which the device was moved will now show the āSet up home and away routinesā button at the top.
Now set up each Google Home āHome and Away Routinesā for each home address, to toggle the appropriate switch made above. Follow the video linked below.
This video will help explain how to set up āHome and Away Routinesā using geofences.
Now you are able to control rules / routines in openHAB based on the state of the switches defined.
Here is a simple rule to send a push notification to the openHAB android App. Replace email_address_for_cloud_connector with your openHAB cloud connector account email address.
rule "Announcement Arrives Home"
when
Item BobHomeGoogleGeoFence changed to ON
then
sendNotification("email_address_for_cloud_connector", "Bob will be home soon")
end
Enjoy
Google Home App is available for Apple but Iāve not tried it.