I want to use presence detection in Home Assistant automations.
-
I want to use presence detection in Home Assistant automations. I'm using the companion app on Android. My Home Assistant installation is accessible from both external and internal URL.
I would have thought that configuring either external and internal URLs, or home network SSID, should be enough to allow Home Assistant to tell if my phone is home or not, but the app seems to want full location access to work properly.
I don't care if Home Assistant keeps a record of where I am (or rather, I would prefer if it didn't), I just want it to know if I'm home or not.
Any ideas?
@mjack Maybe just use ping and give your devices a set IP on your home network?
Its simple and works very well for me. -
@mjack Maybe just use ping and give your devices a set IP on your home network?
Its simple and works very well for me.Oh, clever! I'll give it a try, thanks!
-
I want to use presence detection in Home Assistant automations. I'm using the companion app on Android. My Home Assistant installation is accessible from both external and internal URL.
I would have thought that configuring either external and internal URLs, or home network SSID, should be enough to allow Home Assistant to tell if my phone is home or not, but the app seems to want full location access to work properly.
I don't care if Home Assistant keeps a record of where I am (or rather, I would prefer if it didn't), I just want it to know if I'm home or not.
Any ideas?
@mjack many OS‘s require location access to see the WiFi APs in the area, since that can be used to triangulate your location. You can turn on the permissions and then turn off the GPS sensor in the app if you don’t want to publish the info to your server.
WiFi- and especially network Ping-based presence will likely not work with a mobile phone, since they tend to drop off the network to save power. GPS has been rock solid for me, but if that isn’t for you, you could look into Bluetooth-based presence using the built-in options (I think some exist, but haven’t worked with them yet) or espresence / Bermuda (haven’t worked with them, either).
-
@mjack many OS‘s require location access to see the WiFi APs in the area, since that can be used to triangulate your location. You can turn on the permissions and then turn off the GPS sensor in the app if you don’t want to publish the info to your server.
WiFi- and especially network Ping-based presence will likely not work with a mobile phone, since they tend to drop off the network to save power. GPS has been rock solid for me, but if that isn’t for you, you could look into Bluetooth-based presence using the built-in options (I think some exist, but haven’t worked with them yet) or espresence / Bermuda (haven’t worked with them, either).
Thank you for the explanation and GPS sensor suggestion.
I like the principle of least privilege. It should be simple, as an app, to ask the OS one of:
1) are we connected to HomeSSID?
2) can we access Home Assistant through the internal URL?without requiring location access.
The app doesn't need to know the name of the SSID we are presently connected to, if any, and it doesn't need to know why we cannot connect to the URL.
Maybe this is more a question about Android capabilities.
-
Thank you for the explanation and GPS sensor suggestion.
I like the principle of least privilege. It should be simple, as an app, to ask the OS one of:
1) are we connected to HomeSSID?
2) can we access Home Assistant through the internal URL?without requiring location access.
The app doesn't need to know the name of the SSID we are presently connected to, if any, and it doesn't need to know why we cannot connect to the URL.
Maybe this is more a question about Android capabilities.
@mjack yes, I think it may be a OS thing, I‘m afraid. Though maybe the currently active WiFi name may be exposed without location permission, I‘m not sure (haven’t been an android user for a few years). If it is available without the permission, you should be able to see it in the list of sensors in the app settings, I would expect, like this:
-
@mjack yes, I think it may be a OS thing, I‘m afraid. Though maybe the currently active WiFi name may be exposed without location permission, I‘m not sure (haven’t been an android user for a few years). If it is available without the permission, you should be able to see it in the list of sensors in the app settings, I would expect, like this:
Unfortunately, I cannot turn BSSID sensor on in the companion app without granting location access.
-
Unfortunately, I cannot turn BSSID sensor on in the companion app without granting location access.
@mjack ah, as I suspected. Then there really isn’t any way around that, I‘m afraid. Not sure if the Bluetooth option I mentioned will work or if you would need to grant location access for that as well - haven’t used it, let alone on android.
-
@mjack ah, as I suspected. Then there really isn’t any way around that, I‘m afraid. Not sure if the Bluetooth option I mentioned will work or if you would need to grant location access for that as well - haven’t used it, let alone on android.
I run Home Assistant in a VM, without any Bluetooth capability, so not an option at present.
But I do have 2 Bluetooth thermometers, so maybe it's time to add a USB dongle
-
I run Home Assistant in a VM, without any Bluetooth capability, so not an option at present.
But I do have 2 Bluetooth thermometers, so maybe it's time to add a USB dongle
@mjack or get some ESPs and use the Bluetooth proxy firmware, if you need more coverage.
-
@mjack or get some ESPs and use the Bluetooth proxy firmware, if you need more coverage.
Nice tip, thanks!
-
I want to use presence detection in Home Assistant automations. I'm using the companion app on Android. My Home Assistant installation is accessible from both external and internal URL.
I would have thought that configuring either external and internal URLs, or home network SSID, should be enough to allow Home Assistant to tell if my phone is home or not, but the app seems to want full location access to work properly.
I don't care if Home Assistant keeps a record of where I am (or rather, I would prefer if it didn't), I just want it to know if I'm home or not.
Any ideas?
@mjack I am using this setup.
-
@mjack I am using this setup.
It's the "When" condition I'm struggling with.
I would like to find a way to let Home Assistant know whether I'm home or not, without giving the companion app full location access.