Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Show unconnected but nearby bluetooth devices #1536

Open
iankaufmann opened this issue May 2, 2021 · 10 comments
Open

Show unconnected but nearby bluetooth devices #1536

iankaufmann opened this issue May 2, 2021 · 10 comments
Labels
enhancement New feature or request sensor-tracking

Comments

@iankaufmann
Copy link

Is your feature request related to a problem? Please describe.
No, just something that would be nice

Describe the solution you'd like
It would be great to see a list of unconnected but nearby bluetooth devices. Is that possible? Right now you can see devices that are listed in "paired devices" even if they are unplugged or far away/unconnectable. The only other attributes show devices you are fully connected to. I want to be able to sense that I am within range of a specific BT device. Kind of the opposite of the beacon functionality. It is not possible to put an internet connected ESP device for room assistant where I'm trying to accomplish this so I need the phone to "know" about the devices it can see. I don't need it to update nearly as frequently as a beacon would either. A "nearby_devices" attribute on the bluetooth_connection sensor would be a great feature!

Describe alternatives you've considered, if any
I've tried to rig up an alternate solution in Tasker and calling the [python_script.set_state](https://community.home-assistant.io/t/how-to-manually-set-state-value-of-sensor/43975/2) service via the HA Tasker plugin, but manually pushing sensor updates causes other issues and I'd prefer if HA handled it with it's state machine.

Additional context
I am sure that just like Tasker's "BT Near" state, there is some delay in between scans, and that is perfectly fine. But I have to think that this information is available to throw into the bluetooth_connection sensor.

Thanks!

@iankaufmann iankaufmann added the enhancement New feature or request label May 2, 2021
@dshokouhi
Copy link
Member

So you want to see the scan results of nearby devices? If we were to do something like this we wouldn't be able to scan for devices all the time but maybe as part of a short scan when updating sensors. So your looking for devices like a car as opposed to a beacon right?

@iankaufmann
Copy link
Author

Yep, that's exactly it! Trying to sense when I am in my wife's car but not connected to her bluetooth because only 1 device can be connected at once. In fact, tasker's BT near doesn't even detect it if she's already connected. I have installed a small usb bluetooth transceiver in the usb port of her car and that is what I'm trying to detect that I am within range of. I can think of other uses for this but that's what I'm trying to accomplish today... And I can do it with tasker but it's much more reliable if HA can just read that attribute.

@fortepc
Copy link

fortepc commented Aug 24, 2021

I posted to the forums with a request that's tangentially related to this (as well as #900) , but was redirected to this repo, so I'm posting this comment in both, I hope that's acceptable

I’d like to have the Home Assistant companion app able to track bluetooth devices, specifically bluetooth beacons (like a beacon from an ESPHome for example), but ideally the flexibility to scan for and track any bluetooth or BLE devices and pipe that info into Home Assistant would be super helpful. So ideally if it sees my bluetooth headphones.

I'd expect to have to manually register a BT device to the app, rather than just automatically track every device it sees, and I’d like it to support both stationary beacons and mobile beacons, by that I mean…

I’d like to be able to tell the HA app the BT device is stationary so that I can define a zone associated with that beacon and updating my phone's zone location when I’m within range of it.

I’d also to tell it a beacon is a mobile beacon, like for example a beacon in my backpack or on my bicycle, or in my wallet, or on my keys. I’d like to associate a beacon with a tracked device and anytime my phone sees that beacon it updated the location of that device to match my phone’s known location.

I know HA doesn’t currently have a great infrastructure for device tracking, Ideally they add a "Devices" or "Tracked Devices" section that is basically a clone of the “Person” tracking section. For now though I’d expect this feature just to use the devices defined in the known_devices.yaml, preferably with the ability to easily add new devices from the app so users don’t have to pre-setup their known_devices.yaml before they can use this feature.

@stale
Copy link

stale bot commented Jan 8, 2022

There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue now has been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@stale stale bot added the stale label Jan 8, 2022
@nicklipple
Copy link

Commenting to keep issue open. The companion app will transmit beacon but the solution described here is much better from a privacy perspective. I would like the app to report the beacons or devices it sees to my server instead of having my phone broadcast a beacon that would let others track me

@stale stale bot removed the stale label Feb 2, 2022
@cooperised
Copy link

cooperised commented Jun 20, 2022

How does this differ from #900? (Genuine question...)

@iankaufmann
Copy link
Author

How does this differ from #900? (Genuine question...)

Not by a lot, but that one specifically mentions BLE beacons, and what I posted was not limited to BLE. My post was regarding any Bluetooth device that the phone can currently see, but isn't connected to (like my car's stereo when it turns on).

Tasker has a "BT Near" function that used to work but sadly doesn't seem to anymore and that is exactly what I'm after. Don't know if it's possible.

@cooperised
Copy link

Now that #900 has been closed, this is top of my wish list. I have a few newer Hue bulbs that are always on and provide bluetooth connections for setup, so these would make perfect "beacons" if I could scan for nearby non-beacon bluetooth devices.

I realise this is not a helpful contribution, but it acts to bump the issue :-)

@ChrisAllen1982
Copy link

I would also like to see this feature. Currently using tasker to achieve this

@jagssai
Copy link

jagssai commented Apr 2, 2024

Hello, I've been working on a security system for my business for some time now, which combines person pressence detection with Frigate, motion sensors, vibration sensors, and door and window sensors to send notifications via Telegram with photos and videos of the events. Recently, there was an attempted robbery that we managed to prevent because the alarm went off when the thieves were on the roof, so they couldn't enter the office. However, from the camera footage, we could see that the thieves had cellphones. It would be nice to have a way to store the MAC addresses of nearby Bluetooth devices and the time they were detected, as this could serve as additional evidence to determine if a person or their phone were in the office when the alarm went off.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request sensor-tracking
Projects
None yet
Development

No branches or pull requests

7 participants