Closed fti7 closed 2 years ago
Adding other beacons such as those used for contact tracing might also be an idea.
Since those change all the time, the only useful metric would probably be to have a total count of unique IDs around you
I totally think this would take room tracking to a new level, by adding a static tracker device like an simple ESP32 to announce a static MAC or UUID to a specific room the Companion app could pick it up and announce the presence by its BLE and RSSI signal strength to Home Assistant,
You may also reuse existing devices in a room like Bluetooth speakers or other devices that uses static BLE
Another option, rather than sensing BLE messages, send them instead, and let roomassistant or ESP32 mqtt room devices pick up the room based location of the phone.
This has the benefit of keeping the Companion code quite dumb, i.e. every second send a BLE message, vs attempting to track distances via rssi of various local BLE beacons.
There are a couple of Android apps that do this, e.g. Beacon Simulator and Beaconscope, but neither persist with Bluetooth or phone restarts. Beacon simulator is open source and on GitHub (mobile here so won't link sorry).
@Alfiegerner could be an light option but would require extra hardware in your rooms, if it could detect existing devices (speakers/google home etc) you alredy have would make it more userfriendly.
Hi @PerJarlemark
Thanks for your consideration of this. I think lots of users of room-assistant and esp32-mqtt-room, and in general people who wanted to keep separate device tracking system so other items like bags, cars etc can be tracked would like this.
I'm mindful of not derailing this issue though - let me know if you'd like to create a new one.
Thanks!
Are there any new docs from Google on this? The linked docs seem to point to this feature being deprecated.
Warning: The Google beacon platform is deprecated as of December 7, 2020. The platform will shut down on April 1, 2021. After this shut down, beacons will no longer be supported within the Nearby Messages API.
@dshokouhi okey, didn´t know, but think it still can be build in to HA app
Google's Prioxinity Beacons APIs continues to work to detect beacons when programmed inside a custom app https://stackoverflow.com/questions/58482475/is-google-deprecating-beacon-service-their-announcement-is-ambiguous
I've split add some comments on enhancement request I found for transmitting beacons #960.
I've suggested a possible start on there that I could take up on making a pull request for the Android app, @dshokouhi @PerJarlemark would you mind having a look to see if it's worth me digging into?
@dshokouhi I believe google pulled the api but ble scanners can still sense the devices. It would be great if the companion could know my room location based on the closest google home, it would save me buying extra hardware :)
I posted to the forums with a request that's tangentially related to this (as well as #1536 ), 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.
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.
bump
bump
This would be awesome. My use case is that I live in a large apartment building on the top floor. When I'm at the elevator closest to my apartment, I still have WiFi so using it as a detector is not extremely unreliable. Also, if I'm outside in the courtyard closest to my apartment (taking the dog out), WiFi still works. I'd love to hide a BLE Beacon in the elevator or in one of the Fire Extinguisher Cabinets in my building, so that when I'm walking away from my apartment, HA could recognize that am no longer at my apartment. I have many neighbors and friends close by and several restaurants that we frequent in our building. So GPS is often unreliable because we just aren't "far enough away" for it to recognize we're not home. Things like, eating dinner, going to the apartment gym, or playing with the dog outside (like 5 times a day) are often not even noticed. I'd love to be able to use a beacon for the companion app to pick up I'm getting on the elevator or walking away from my apartment, and then make sure my door is locked, turn off lights, etc. Coming back, it would even be awesome if it could unlock my door, turn on lights, etc. I may even try to put some effort into it and see if I can submit a PR to help with this, as it would be pretty awesome.
Best use case for me would be that I cannot find any other way to automate the unlocking and locking of my car when coming near it or walking away from it. The car is integrated into HA with the Mercedes Integration but I have no reliable way of saying when I'm near or away from the car. A zone that would be variable would do the job but zones only take fixed GPS locations and aren't currently dynamic.
I started working on this feature and will open a Pull Request once I tested it and verified it is stable. At the moment my implementation will add one additional sensor which represents the distance to the nearest beacon and the UUID of it in the attributes. So for room presence you would have to match the UUID to you room in Home Assistant. I don't want to add an extra sensor for each beacon, cause this would clutter the Home Assistant very fast, but if anyone has a better Idea how to implement it, please let me know
@Adi146 This would be awesome! You are wonderful! I even had a moment of thinking how cool it would be for me to use for Home Assistant to know if my dog is with me or not based on a beacon. If she's with me, turn out all the lights, if she's not, leave some dim so she can see to get around. I love the thought of what all can be done with the beacons!
I started working on this feature and will open a Pull Request once I tested it and verified it is stable. At the moment my implementation will add one additional sensor which represents the distance to the nearest beacon and the UUID of it in the attributes. So for room presence you would have to match the UUID to you room in Home Assistant. I don't want to add an extra sensor for each beacon, cause this would clutter the Home Assistant very fast, but if anyone has a better Idea how to implement it, please let me know
Thanks for looking into this!
As far as an implementation goes maybe it makes sense to have this sensor behave more like the Bluetooth Connection sensor? The state of the sensor would represent the total amount of Bluetooth beacons within range and then the attributes of the sensor can include anything relevant to each beacon found so users can create their own template sensors if they need to track a certain device.
@dshokouhi Thanks for you suggestion but I'm afraid that is not so easy. The problem is that attributes of sensor do not update on home assistant when the actual state of the sensor stays the same. So you wouldn't see the distance changes of the beacons because the count value as you suggested would stay the same. However I could report the distance to the nearest beacon in the state and list all others in the attributes or something like that.
Ah good call didn't think about that.
Then maybe it makes sense for the state to not only include the distance but also an identifier in case the values are the same for 2 devices in close proximity?
That way it can be as unique as possible.
@Adi146 Fantastic work, just been checking out the PR. Any idea what the status of the review is? Would be great to see this merged.
Describe the solution you'd like It would be very cool if the App could additionally report nearby BLE Beacons (Eddystone) Since they will never appear in "unpaired devices"
https://developers.google.com/nearby/messages/android/get-beacon-messages
Would be very nice for Room/Presence Tracking. Just Report the Eddystone UID + Signal/Distance of all Recieved ones