SSID sensor in the HA app is unreliable. Looking for an alternative

I’m using the HA app’s SSID sensor to determine if I’m home or not and trigger certain automations based on that. Unfortunately, I’m noticing that it’s very unreliable. Examples for situations where that was very apparent were: I left the house for a bit and took my phone with me. After I returned home, it wouldn’t detect that I was back for 6 hours, until I unlocked my device and opened the HA app. This happend a bunch of times.
Another time, my device seemed to have randomly disconnected from the Wi-Fi for a bit and I had the same problem.

Alternatives I tried out:

  • The device tracker of my (FritzBox 7490) router’s HA integration; it also had a random disconnect for hours. Also, it had too much of a delay between me leaving the house/network and it noticing.
  • The HA app’s Geolocation Tracker (which is what HA’s device tracker uses). It also had the problem of the location not updating for hours, but at least it’s not terribly inaccurate and seems to at least always correctly report whether I’m within that zone I set as my home in HA, as far as I can see so far from its sensor history. I will try using it for a while as long as there is no better solution.

What methods did you people have success with?

  • iPhone 12 mini, iOS 16.5
  • HA app 2025.3
  • Core 2025.2.5
  • Supervisor 2025.04.0
  • Operating System 14.2
  • Frontend 20250221.0

Hi Arsalan, are you using mobile data & is your mobile connecting to your HA outside of your network?

You could always try our local Bluetooth implementation with the Theengs Gateway Add-on.

1 Like

Hi, yes to both questions. I always connect to HA via its external URL I configured via port forwarding on my router with Duckdns.

I suppose this isn’t useable with a Home Assistant Yellow? I’m not seeing Bluetooth being listed as a feature on its product page.

I make do with my router’s ubus device tracker. It uses the router’s Wi-Fi station table to decide whether I’m online or not. Unless your phone aggressively shuts off Wi-Fi, that works well.

Anything BLE beacon related has a hardcoded 3 minute transition from present to absent. That’s useless to me.

Correct, it does require Bluetooth, but you could always use an ESP32 as an external Bluetooth proxy antenna receiver with OpenMQTTGateway installed on it, forwarding your iPhone BLE broadcasts to the Theengs gateway Add-on.

With Theengs Gateway you can set the timeout, as well as the scanning frequency to any times and durations you want and require, so definitely no 3 minute limit there.

I’m starting to suspect this is the cause of the OP’s issues.

1 Like

iPhones do shut off WiFi when they go into sleep/standby, but they constantly send out BLE beacon messages, that’s why Bluetooth is the most reliable and fastest detection for iPhones, iPad, Apple Watches and AirPods :wink:

4 Likes

@DigiH Regarding the Theengs Gateway: Will a Raspberry Pi Zero W used as its hardware be sufficient to do the job in my case? Not planning on using it for anything other than detecting the presence of my iPhone.

That should be more than enough, yes, even though I haven’t tried it on a RPi Zero W myself here, only on RPi 3 and above so far.

Best to have a look at the latest post in this issue :wink:

1 Like

Yes this is fairly cool. And it has the privacy preserving aspects of Apple Find My, which is extra nice.

I have been thinking that I would like to use Bluetooth with my Android phone to establish my presence with or without Wi-Fi working. I was not aware that there was this thing called theengs gateway that allows me to do that. If I could get my phone to also broadcast Bluetooth packets privately like the iPhone does, then that would be perfect. Unfortunately, Android does not seem to have this feature and neither does it seem to be the case that the Home Assistant Companion app supports that. The closest I would be able to get to is to have the Companion application start beaconing whenever I’m close by my house, which is something that I can do using an application that I already have on my phone called phone profiles plus. But the beaconing is by no means privacy-preserving.

Ideas?

With Android it is a bit of a different story, as Android is very quit on the Bluetooth front, compared to Apple devices. You can, however, use a Bluetooth Beacon app on Android (e. g. Beacon Scope), which also sends regular iBeacon broadcasts. And if entering the custom UUID

54686565-6E67-732D-6942-6561636F6E31

yo9u will also get auto-discovery of the Android phone as a BLE device tracker.

This is for Android version which do have a static Bluetooth MAC address, but as more modern Android versions also randomise the MAC addresses, the UUID

54686565-6E67-732D-6942-6561636F6E32

would need to be entered. This would also require an IRK (Identity Resolving Key) though, which I really do no0t know if and how this is possible to get for modern Android versions.

The static issue on Android with Beacon Scope has been reported as working fine by users though.

This integration has been working well for me for several years now.

As a secondary check I also use Apple Home automations (“when someone leaves/arrives home”) to toggle an input_boolean exported via HomeKit Bridge. This requires an Apple TV or HomePod for external access (I prefer not to do my own outside port forwarding).

And since I have several esp32-based esphome devices (plugs, sensors, etc), I’ve added Bluetooth proxying to those, instead of setting up a separate server, to detect my Phone and Watch broadcasts with the Private BLE Device integration.

So if your phone stays connected, can’t you just use zones?

I have same issue with SSID sensor, it always reads Unknown. Connection type sensor (cellular/wifi) works properly. Companion app log…

It’s literally telling you that you need to set your home SSID in the companion app settings

Where? I see no such setting.

Why? Apps are capable of getting the current ssid, what is the point of setting it manually in an app?

Companion App settings > Servers & Device (select your server) > Home network

Home url is set, otherwise I couldn’t access HomeAssistant, but there’s no ssid setting.

One expects ‘sensor.phone_ssid’ to just return the current wifi ssid (if connected).