I actually tried that but It wouldn’t work either. I also looked at the activity trackers I have and they won’t show up either once paired with a phone.
Yeah my miband2 would work until paired. Fitbits seem to work fine. I had some luck unplugging the Google home then powering up again to get it to detect and report rssi values. Do you have the Google home set to a static IP address also?
Everything in my house is set to static.
I have had some success with my op6t using that option. Although not as reliably as a Fitbit. Not sure why? I am thinking of getting a https://www.beaconzone.co.uk/Wearable/iB001W
Make sure you’re looking for your Bluetooth Mac address, not the wifi Mac address.
I’ve been attempting to recreate @botts’s setup using a single template sensor, and I’m close! Below is the template I created to contain the name of the Google Home device with the strongest signal for a given BT MAC. Unfortunately, although it works correctly, it never updates after the initial HA startup. Does anyone know how I might HA to periodically re-evaluate the result of the template and update the sensor?
platform: template
sensors:
jasons_phone_location:
value_template: >
{% set ns = namespace() %}
{% set ns.maxsignal = -100 %}
{% set ns.trackername = "" %}
{% for item in states.device_tracker
if item.state == 'home'
and item.attributes.scanner == 'GoogleHomeDeviceScanner'
and item.attributes.btle_mac_address == '94:65:2d:6d:e8:83' %}
{% if (item.attributes.rssi | int) > ns.maxsignal %}
{% set ns.maxsignal = (item.attributes.rssi | int) %}
{% set ns.trackername = item.attributes.ghname %}
{% endif %}
{% endfor %}
{{ ns.trackername }}
I figured it out. I created an automation that calls the service homeassistant.update_entity
every 15 seconds.
@JayWll I knew there would be a more elegant way of doing it! Nice work! Just need to learn how to write something that way! Also the update_entity has removed the issue of a Google home going “offline”
@JayWll could this be incorporated for the scanning? https://www.home-assistant.io/docs/configuration/platform_options/ ?
I just did a quick test, and unfortunately not. At the top of that page it says that those options work with components that are based on the ‘entity’ class. I don’t fully grasp what that means, except that I guess the device_tracker components that get created when the Google Home identifies a new BT device are presumably not based on the entity class.
All in all, this turned out to be less useful than I’d hoped. I found a tile mate at the office we’d received a Christmas Gift from an old vendor so I took it home and attached it to my dog. He gets picked up by one of the Google Homes we have from time to time but generally he’s not found by any of them, even though he actually spends ~80% of his time very close to either the Home Mini we have in the bedroom, or the Home we have in the kitchen.
It’s a similar story for my phone, which is in the bedroom with me (orange) all through the night but mostly shows up as not being found (purple).
I’m definitely interested if anyone has any tips and tricks. For now I’m just glad that I stole the tile I’m using rather than paying for it
Have you changed the rssi?
@ludeeus
I have been playing around with this device tracker, and it seems pretty cool.
I noticed one thing though…
When the tracker is enabled, all off my six GH speakers become “discoverable” (one in each room).
Looking at “ghlocalapi/bluetooth.py”, I can see that “scan_for_devices” makes it discoverable.
Is that really necessary?
I’m asking because I live in an area where people like to connect to random devices and mess around.
No, that should no longer be necessary.
hmm, I’ve setup ,my FitBit Flex2 and it works, ONLY if it is not already connected with the phone. When the Bluetooth is turned ON on my phone and the Fitbit in proximity of the phone, the FitBit is connected to the phone, therefore not accessible to HASS anymore… kinda’ defeats the purpose if I disconnect it to the phone. Is this use case the same for you @botts ?
You could add the sensor.time as an entity_id to the template sensor. That would force the sensor to re-evaluate every minute (see some example towards the bottom of the page)
Just make sure you also setup the sensor.time sensor in your config (I missed that step before and was frustrated for a long time…)
Thanks for sharing, but the iPhone app doesn’t have these options except the All-Day Sync. At this point Fitbit with iPhone will only work if the BT is turned OFF on the iPhone, or perhaps if you disconnect the Bluetooth connectivity with the FitBit.
To contribute my experience… I have 2 Google Homes and 3 Google Home minis, a Google Pixel 2 XL, 2 Fitbit Charge 3s, and an iPhone SE. I very much wanted this to work, but it simply won’t reliably.
Things I have tried…
- Pairing both phones with all 5 Google Homes
- Unpairing my Fitbits
- Keeping my Fitbits paired
- Power cycling all my devices (… all 9 of them)
- Power cycling the Home Assistant app & machine
- Altering the default values for Device Trackers
Problems I continue to encounter…
- GHs simply don’t update their status
- I have left my phone across the room and tried all of the above
- GHs don’t update consistently
- I have 2 GH Minis in my bedroom on either side of the bed, but I can never get the LEFT one to pair
- RSSI values have never shown up
It’s really disappointing, as this looks like a super cool component for a lot of reasons.
Hi all,
Been futzing with stuff and oh man, the possibilities…
But ultimately I concur. The only thing I could reliably track was my laptop while it was open.
FWIW, the rssi was accurate enough that I had some good room detection going with 3 GHM. If I could get things to reliably ping the GhM this would be the bees knees.
I was using some maths to figure out which it was closest to in a template_sensor config