Notifications to phone - what’s going on under the hood?

I have the HA app on my iPhone. It’s configured to connect via the local network, there’s no remote access to my HA.Works great and when I leave the house it loses connection as expected.

But I can still get notifications on my phone - even when not on the lan. This is really useful and something I didn’t expect.

The notifications are sent as an action in an automation using the Service “Notifications: send a notification message using the mobile_app_phonename integration.

Question is how does it work? How does the notification reach my phone when I’m not on the lan? Just interested.

Thanks

Thanks for that.

Doesn’t really explain anything for me unfortunately.

I get the app ‘registers’ with HA so HA can offer the update service. There is some unique ID for my phone and HA sends notifications to some server somewhere that actually is responsible for delivering the notification.

I’m guessing an Apple server and the unique ID for the phone is generated using some apple process. Not something covered in the linked docs. Nice of them (if it is them!).

Apologies, just checked the second set of docs. Google are providing the servers - nice of them then!