My home assistant setup is super simple: pre-configured Home Assistant Green box, Zigbee dongle and some assorted Zigbee devices scattered around my home. I have the Home Assistant app on my phone to see the Dashboard while I’m at home, but since I never configured the box to be accessible from outside of my network, I obviously can’t see the Dashboard if I’m not at home. Very basic stuff so far.

A few weeks ago, I built a little automation. I shoved a vibration sensor into my doorbell box (it’s one of those that uses an electric motor to hit an actual bell) and when it detects the doorbell ringing, it flickers my light and sends a notification that says “ding dong” to my phone. The purpose is just to hear the doorbell ring when I have headphones on. The lights work perfectly fine, the notification is a bit delayed sometimes because I probably don’t give the App enough permissions to hang out in the background all the time. I’ve never felt like fixing it though, since the lights are good enough by themselves.

Now I’m on my first longer trip since setting up that automation and I’ve noticed that I occasionally get the “dong dong” notification on my phone. First few times I’ve ignored it, because I assumed it’s just old notifications that got queued while I was home but didn’t fire until the app was allowed to sync. But the notifications started coming in at way too reasonable times and I checked in with my husband at home – turns out they’re actually completely correct and I’m getting actual real-time notifications for the doorbell ringing.

But like - how?! I thought my Home Assistant Green box isn’t set up to send anything to the outside world?! I can’t see my dashboard from other networks, so why would notifications be any different? Does anyone have any ideas as to why I’m getting those notifications?

edit: Thought it would make sense to include a screenshot of my settings; As you see, my home assistant URL is a local IP address. I have no idea why my phone would be able to talk to that? It can’t talk to my local-IP-only Jellyfin server either, so why would this be any different?

  • KexPilot@lemmy.world
    link
    fedilink
    English
    arrow-up
    16
    ·
    2 days ago

    In general, notifications on Android don’t go through apps, that would require apps to run all the time and consume too much battery. They instead are going through a notification provider (google in the default case). This is why your notifications arrive, but you have no other connections to your HA.

    Edit for clarification: HA uploads it to google servers (which of course doesn’t need port forwarding) and your phone then polls them from google.

    • python@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      4
      ·
      2 days ago

      Oh, that makes things even more mysterious! I’m running GrapheneOS and while this Profile does have Google Services installed, they’re still pretty restricted. I would have thought that they’d need some sort of notification-related privilege to relay those notifications to me :0

      • KexPilot@lemmy.world
        link
        fedilink
        English
        arrow-up
        6
        ·
        2 days ago

        It might be not this simple in case of notification providers, the notifications are somehow sent in the name of the app I guess. And don’t forget: in general, this principle is true for most of your apps that send notifications. I.e. if you are getting Signal or Facebook notifications, it uses the same principle.

        Btw, google is not the only notification service for android. Check up on Unified Push, there are many alternatives to do this, and there are some apps that support these alternatives in their non-play-store builds.

        • python@lemmy.worldOP
          link
          fedilink
          English
          arrow-up
          3
          ·
          2 days ago

          Great tip, thanks! I’ll take a look at it since I definitely would prefer it if apps didn’t just talk to Google without asking me first. Kinda crazy how hard it is to even know about all the cracks that Google creeps in through 🥲

    • python@lemmy.worldOP
      link
      fedilink
      English
      arrow-up
      3
      ·
      2 days ago

      I don’t think so! At least I don’t know what a Nabu Casa is, and I have no recollection of ever setting up any VPN or tunneling shenanigans in my home network. I know there’s services like Tailscale or that one everyone uses to play Minecraft together (Hamachi?) but they weren’t something that I felt like fiddling with yet. I only moved into that apartment like 2-3 months ago, so all the network stuff is pretty recent, I think I would have remembered it if I set up some VPN thing haha

  • deafboy@lemmy.world
    link
    fedilink
    English
    arrow-up
    2
    ·
    2 days ago

    And here I am trying to make those same notifications work even when I am at home, and it’s still 50/50. And if they do go through, I always get 2 of them in a row.