Multiple BLE Tile accounts

Hi Folks, just signed up as I discovered HASS a few days ago and have been going nuts with HA :slight_smile: Even went out and bought a bunch of Hue lights and such things, having a great time with this software getting my life automated!

Iā€™ve run into a problem I canā€™t seem to figure out with my configuration regarding BLE Tiles. My wife has a tile on her keychain and I have one on mine. I had originally set them up as two different accounts (with tile.com) but I canā€™t figure out (if possible) to have two accounts monitored by HASS:

device_tracker:
  • platform: tile
    username: me
    password: password
  • platform: tile
    username: wife
    password: password

This didnā€™t work, got a python error in the logs. What I ended up doing was transferring the tile from my wifes account to mine and only my account is specified. Doesnā€™t quite fit into the model weā€™re planning to use it for. Is there a way to have two tile.com accounts monitored in HASS? It works fine otherwise using a ā€œhomeā€ zone but the functionality of the tile is reduced as my wifeā€™s tile will ring my phone instead of hers.

Using HASS 0.61.1

Much appreciated!

For those who might be interested ā€“ I ended up moving all devices/tiles to one account. It works but only as a solution to the HASS side of things. I would have preferred to be able to support multiple tile.com accounts so that my wife and I could maintain our own collection of tiles/devices.

I suppose now I need to buy some happy bubbles to try to use them in beacon mode instead or use some other method for presence detection method I havenā€™t explored yet.

If youā€™re looking for simple detection of the Tiles, then thereā€™s this with a Raspberry Pi Zero.

It doesnā€™t require any link back to the Tile servers, registration, or anything like that.

Thanks! Iā€™ll give this a try. I assume it wonā€™t work if the tiles are already paired to a phone? I did some reading in the forum here and seems if the app is installed/tile paired, this method wonā€™t work? We do like the idea of having the functionality of the tile but Iā€™d be willing to accept it just being a wireless tag (of sorts) if I can get your method working.

So Iā€™m running HASS from OpenMediaVault (venv install) and just for fun, I did a ā€˜hcitool lescanā€™ and found the following devices:

2A:8D:93:F8:E0:E5 (unknown)
0F:02:ED:3A:95:39 (unknown)
17:0E:D1:7F:D4:CA (unknown)
54:BD:79:0E:90:9B (unknown)
35:CC:A1:0A:3D:E1 (unknown)

Did a MAC lookup, one is my Samsung TV ā€¦ not sure if the others are the tiles or not. Guess Iā€™ll need to shutdown the app(s) on both phones and see if I can see the tiles via BT from them to isolate them. In your example you noted youā€™re running Hassbian (which I assume is the port 5000 endpoint) so Iā€™ll need to find another way to get this data inserted into HASS but it looks promising :slight_smile:

Yeah, Iā€™d say the phone apps are still reserving access to the Tiles.

They should appear twice per device on that list, one with ā€˜Unknownā€™ and the other with ā€˜Tileā€™. Youā€™ll know you can use my little script once you see ā€˜Tileā€™ appear.

The port 5000 endpoint is for my little api script, not hassbian. So as long as you can get the python script running in your venv install, you should be fine.

I imagine youā€™ll have to change the IP in the sensor snippets to http://127.0.0.1:5000 if the bluetooth detection is on the same device as the scriptā€™s running on.

1 Like

If I can get this working Iā€™ll find a way to send you some beer bux :slight_smile: Really appreciate it.

1 Like

All the best with it, cheers!

Bingo! got it running in the venv :slight_smile: Just need to configure it start/stop with HASS and pull in the appropriate data as per your post.

1 Like

Iā€™ve had all of my devices in one Tile account from the start, but the result is that it doesnā€™t always show the correct location of both phones. Are you seeing the same issue?

It does update the location but itā€™s not real-time and definitely time-delayed. My original idea behind the Tile was for presence detection since BT/WiFi is not super reliable on modern smartphones (iPhone7/Zenfone3) due to sleep/power-saving mode. The other deficiency to Tile is that itā€™ll pair to the nearest/strongest device so if my wife and I are in the same room and my BT connection is slightly stronger (for whatever reason) and I do a key/phone locate, itā€™ll use the strongest device.

This is why Iā€™d rather use them as beacon (of sorts) for presence detection as ā€œstandardā€ operation of the system doesnā€™t really jive with what I want.

The reason I wanted to originally track two tile accounts was because each tile reports GPS location (via phone) which I figured be a good presence detection for ā€œhomeā€ and ā€œnot_homeā€ based on the coordinates of my home zone configuration.

EDIT: As far as HASS is concerned, the GPS location is always ā€œhomeā€ when in range even though via debug I can see it reporting different location. Ultimately, a beacon use-case would be a lot useful to me for HASS and Iā€™m now working on getting that up and running to see how accurate/responsive itā€™ll be.

OK, got everything cobbled together here and itā€™s working. Thereā€™s about a 30-40 second gap every so often (as you noted in the in the other thread) but fortunately the automation routines have a bigger gap to determine if someone is here/away. Definitely more reliable than tracking WiFi or BT.

Thanks again!

PSā€¦ Was serious about beer money :slight_smile:

@Bit-River how are you running the BLE scan script? I tried via systemd but it generates HTTP 500 errors.

Happy to hear itā€™s working for you :slight_smile:

I put it in /etc/rc.local, after the ā€˜fiā€™ and before the ā€˜exit 0ā€™ looks like this:

python3 /home/pi/ble_api.py &

Works every boot!

Donā€™t forget the ampersand!

Ahh, using rc.local never occurred to me :slight_smile: Thanks!