Icloud binding: no manual update of location


I am using the icloud binding to detect presence of an iPhone. I have set the update interval to 5 minutes and this is working. I need to manually update the position of the Phone in case a door is opened while presence is not yet detected.

According to the documentation it is possible to update the location manually be sending a refresh command to the corresponding channel. I have defined a refresh item as follows:

Switch iPhone_Refresh “Force iPhone Refresh” (iCloud_Group) {channel=“icloud:device:xxx:location”, autoupdate=“false”}

When triggering this item the only thing I can see in the logs is that the item is actually triggered:

Item ‘iPhone_Refresh’ received command ON

There is no location update taking place before the next 5 minutes interval has passed.

The refresh is going to pull down the latest information from the iCloud servers, but that doesn’t mean that it forces your phone to report it’s current location. You will get the latest reported position but your phone only reports it’s position every few minutes. You will likely not be able to use GPS to solve this problem.

1 Like

I see. I guess that’s also the reason there is no evidence of anything taking place in the logs as the item’s value does not change because it downloads the same information again.

Thanks again for your help!

I’m using NodeRED to use most of the HomeKit functions with openHAB. There you can specify HomeKit Automations. I have set up for every device an automation which turns on/off a proxy switch when arriving/leaving. This works, because it uses the MotionKit and the Motion coprocessor in the iPhone and pushes the change immediately.

However there is 2 limitations:

  • You need to have an iPad/HomePod/ATV at home to work
  • For me these automations are broken since iOS 13, so they doesn’t always update the state, but I think this will be solved.

Hi, i would like to have openhab query my family’s iphones maybe every 10 mins by default but when i switch to my location screen in habpanel then it changes to 1 min. Is there any event when i go to a certain panel that can change the update frequency? I know the phones only update so often but i find it almost live if using find-my-iphone on a phone.

No, you can’t shorten the update-interval of icloud’s location service.

Under Things/edit/iCloud Account you can update the refresh interval. If you have it less than 5 minutes i understand they block you. What im wanting is it to be maybe 30mns but if i go to my habpanel page that shows locations then this value it updated to maybe 1 min while on that panel then back to 30 when you leave it.