Phone information not updating in HA

Hello All,

I have had a whirlwind introduction to Home Assistant and it’s been a great few weeks. I can see how I’m going to build my home around this wonderful piece of software and have also signed up to the Cloud service which has made Google Home integration and absolute breeze.

I have an issue however with the data collected from my iPhone. The data seems to be collected on first install of the app but is then never updated.

There is a field called ‘Last update trigger’ which is sitting on Initial still after 2 weeks now. I have uninstalled and reinstalled and that doesn’t fix the issue.

The location seems to update ok - in that I am able to see my live location on the map (checker that last night while I was at my sister in laws house) but everything else doesn’t. Still showing my steps, battery life et al etc from the first install.

Am I missing some crucial step to force the data to be updated? I have checked that the app has all the access to the phone that it requires and also has permanent access to the device location.

What I am after here is giving HA as much data as possible from my phone to drive through tea about what I can do / trigger with that data so I’d like it to be as ‘Live’ as I can make it (ie if I dock the phone on the charger I’d like the data to update instantly etc).

Would also be interested in any other integration apps for the iPhone that are out there if anyone has any recommendations.

Thanks and nice to be part of another thriving community!!

Welcome!

This is actually a known issue with the current version of the iOS app. What happened is that Apple changed something at the OS level with the iOS 13.4 update which broke the way the sensors worked. If you were using iOS 13.3 the HA iOS app would work perfectly fine. But once you upgrade to iOS 13.4 the sensors will no longer update and have stuck values.

The problem has been identified, but Robbie (who is the sole developer of the iOS app) has a new job and has been busy with other things, so he hasn’t been able to release an update yet. Hopefully sometime in the near future.

Other parts of the app like device tracker and notifications still work, it’s just the sensors.

1 Like

Hi Sean, thanks for the welcome and the detailed answer.

Are you aware of another mechanism of obtaining this data other than this app?

The Life360 integration is a solid alternative for some information. It has battery level (percentage) and battery state (charging/not charging) and some activity attributes (walking/driving/stationary).

Life360 only has a single device tracker entity though with all this information listed as attributes. So if you wanted dedicated sensors for them, you’d have to create Template Sensors. A bit more manual work involved compared to the iOS app which creates these for you already.

For the many other sensors like step count, SSID, etc you’re not going to find too many (if any?) alternatives for those. So hopefully the official Home Assistant iOS app gets fixed soon. It has more sensors than anything else and you can manually update them using automations which is a huge plus. Once that gets fixed, it’s the way to go IMO.

2 Likes

How do you update the sensors via an automation? I couldn’t find a service that would update those. Would it just be homeassistant.update_entity?

Hello any update about this topic?
Thank you

I have companion app on ipad and two iphones all running latest IOS 14.0.1. I have background refresh on for HA and location set to always, but sensors in HA won’t update in the background. They only update if I open the app.
Any suggestions?

Thanks!

Hi

I installed HA two days ago on a Raspberry Pi 4 and I’m having the same issue as described. Running the companion app on an iPhone XR, iOS 14.2 and background refresh switched on. However I only see updates for the sensors when I actually open up the app.

Any help would be massively appreciated! Thanks all

any solution yet?

no solutions? having same issue. iphone apphas been updated since but this has not been fixed…

There is no silver bullet as you’re all almost certainly experiencing different issues, or one of a few themes:

  • Remote access doesn’t work, e.g. out of your Wi-Fi network you cannot access HA
  • Background refresh hasn’t been “trained” - you need to teach the system that you use the app regularly for it to regularly update, unfortunately. This will also happen not at all on Low Power Mode and to varying degrees based on other battery status.

Background updates only occur on a very small set of situations:

  1. When the location changes, either about 500m of movement or in or out of a zone
  2. When the app does a background refresh, see above for limitation
  3. When an “update sensors” or “send location” Shortcuts.app shortcut is executed (e.g. as a personal automation)
  4. When the app is actively running in the foreground for some period of time, based on the “periodic” setting
  5. When the app initially starts
  6. When pulling to refresh inside the app

If you can definitely access the app with Wi-Fi disabled, and you’ve got Location Permission set to “Always” (note: Always will reset to While in Use after the initial launch, and the system will prompt often to try and get you to turn this off), you likely need to train the Background Refresh system.

One minor other issue that occasionally comes up is an incorrectly configured reverse proxy in front of HA that will prevent webhooks from being received.

As always, you can see when an error is occurring on e.g. location updates in the Event Log of the app. You can also hop in #ios_and_mac on Discord and we can work through a particular issue, likely using the full “export log” functionality (which includes a lot more data).

I have a pixel 3 phone and the background updates work perfectly when I charge my phone at night it will turn off the lights in the bedroom. The automation runs in a second. how could I train the iPhone to do the same thing?

To make the phone update charging status instantly, create a Personal Automation in Shortcuts.app to perform “Update Sensors” when charging status changes.

4 Likes

i just tried it today on multiple iphones and i get “could not run update sensors unsuccessful!” what is the issue and what is the solution?

i reset the app settings and set it up again and it worked

thanks, works well.

Answered clearly, now I can stop looking, thank you! :slight_smile:

Same here, I wanted to easy monitor the familys all phones and tablets… but we who use Samsung it works fine. I even see when its plugged in, when its discharging etc. And it updates the second I charge the phone.
My iphones in my housthold… just dead… But is this because of the HA app? Or is it because IOS sensors simply not updaing that often?

Thanks a lot, that’s totally solved my problem. I appreciate.