Model Name: iPhone 11
Software Version: 13.6
App version: 2020.5
Home Assistant Core Version: 0.113.3
Describe the bug: No notifications from the Home Assistant app
This worked flawlessly before the update to 2020.5
I already tried removing the integration, restarting HA, redownloading and connecting the app ...
Have you restarted home assistant after installing the app?
Have you restarted home assistant after installing the app?
yes
Can you go to notifications in the app configuration menu, then reset the PUSH ID and then restart Home Assistant again
Can you go to notifications in the app configuration menu, then reset the PUSH ID and then restart Home Assistant again
I did, still not working.
Can you please check the services page of the developer tools on home assistant and check for any notify.mobile_app services
Can you please check the services page of the developer tools on home assistant and check for any
notify.mobile_appservices
I just did and the service is gone now. It was there before the HA restart.
Ok, after a couple of restarts I'm now able to reproduce this.
I was able to address this by noticing I had a duplicate entity in Home Assistant. After deleting the other device and restarting Home Assistant notifications worked again.
When you tried to send notifications earlier, did you get a mobile_app.notify request entity couldn't be found error in the log. Can't remember the exact wording sorry.
Didn't work for me.
I started from scratch now. Reset the app. Removed integration in HA, restarted HA. Connected the app. Now no notify.mobile_app service is available.
I restarted HA again. Still no notify.mobile_app service available. No duplicate entities.
UPDATE: I checked the App and it said not registered for notifications (which is strange because i just set it up from scratch) -> reset Push ID -> restarted HA -> and now it works
What I also noticed is, is that iOS keeps the app settings, even after deleting the app and a device restart. I reinstalled the app after the iOS reboot and I was still connected to my HA instance.
Also thanks for the help and the app in general! <3
What I also noticed is, is that iOS keeps the app settings, even after deleting the app and a device restart. I reinstalled the app after the iOS reboot and I was still connected to my HA instance.
Yep this can be a right pain! I mean _feature_... There is another way to uninstall apps. If you go to iOS Settings>General>iPhone Storage, wait a few seconds for the list of App to Load, then scroll down to any app (Say Home Assistant here) and delete the app that way you should find it fully removes all the data. Is this issue ok to close now?
... Is this issue ok to close now?
It's ok for me at the moment. Though I bet if I reset everything again and start over i'll be running into the same issues. But I'm too afraid to try.
What I also noticed is, is that iOS keeps the app settings, even after deleting the app and a device restart. I reinstalled the app after the iOS reboot and I was still connected to my HA instance.
Yep this can be a right pain! I mean _feature_... There is another way to uninstall apps. If you go to iOS Settings>General>iPhone Storage, wait a few seconds for the list of App to Load, then scroll down to any app (Say Home Assistant here) and delete the app that way you should find it fully removes all the data. Is this issue ok to close now?
I was also surprised when reinstalling the app for debugging purposes. Is there any way we can possibly detect this and query the user upon the first start if they’d like to reset the app or continue with the existing settings?
The underlying error here, as Tom pointed out, is likely that the notify.xyz services need to be restarted when the push information changes, and the push information changes whenever you connect the app for the first time.
The connection information like access tokens and webhook information are stored in the Keychain -- a secure storage mechanism in the system -- which survives between app installs sort of incidentally. Other settings like privacy settings, in-app settings like Actions or whatnot, are stored in more volatile areas that will be cleared out on reinstallation. This is likely why you saw the Notifications show as Disabled -- they revert to 'off' on reinstallation.
I'd like to make the final onboarding screen (e.g. notification permissions) show up on reinstallation. As for the rest… we could detect this is happening, but I don't know how necessary it is -- it avoids some potential issues like: if we throw away this information, we'd be re-registering for webhooks using a new integration device ID (because Apple _does_ throw away the identifier it gives us when you install all of a vendor's apps) which could cause duplicate integrations.
I'd like to make the final onboarding screen (e.g. notification permissions) show up on reinstallation
please allow me a suggestion, after having hit the Allow buttons several times without any effect....:
Either have the click on the Allow button navigate to the relevant settings on the iPhone, or, at least, display a text the user has to go the settings and change some relevant settings there, and comeback after that to the onboarding screen.
As it is now, the Buttons are not really buttons and cause severe confusion ;-)
UPDATE: I checked the App and it said not registered for notifications (which is strange because i just set it up from scratch) -> reset Push ID -> restarted HA -> and now it works
This is what worked for me. Might need a “troubleshooting” section for this... Wonder if there’s a tracking you could do “clippy” style... “It looks like you’ve reset your PUSH ID a few times very recently, please restart the Home Assistant server. If that doesn’t work, please visit the docs
When I upgraded the client I deleted the existing devices as instructed by the wizard before adding them back.. However I just checked my logs and it looks like the notification service is complaining about duplicate objects..
Where would I find and delete these? They are configured via UI now not out of my core config, I double checked taht I didnt't have anything in configuration.yaml or notrifications.yaml ?
homeassistant.components.mobile_app.notify
WARNING (MainThread) [homeassistant.components.mobile_app.notify] Found duplicate device name
Ok my notifications seem to be working again and duplicates gone after stopping HA completely and starting it instead of just doing a restart from the UI.
No duplicate warnings in the log anymore as well.
I believe this issue is now resolved. If you are experiencing this issue in the future, you likely have more than 1 integration of the mobile_app in your HA's Configuration > Integrations list. Use the > and ••• buttons to delete all of the integrations for the device and restart the app.
If you are on HA <0.115, you will also need to do the cumbersome steps of restarting HA after restarting the app so that the notify.* services are updated.
Newer versions of the app should prevent duplicates, but the duplicates 2020.5 saw was largely due to the team change forcing us to lose access to persisted information, and we do not anticipate anything causing this issue to recur in the future. If the above isn't your root cause of notifications not working, please open a new ticket.