BluetoothLE Tile - Detect on raspberry Pi?

Tile integration officially released today in 0.58.

Hi, wondering if you can tell me how this actually works. I have 4 tile entities, and all have been picked up in HA correctly, but all are just permanently shown as away status. I have tried several scenarios to try and trigger a different response but nothing can change it from showing each tile as away. I am using two tiles (gen 1) and have the app on my android phone and ipad. thx

Can you bump your log level to debug and paste back all of the Tile-related debug logs?

Never done that before, any pointers ? Also what would i be looking to show you ? As the state has never ever changed since adding them, do i need to attempt to get it to do something so you can work on it ?

Look for any lines that mention [homeassistant.components.device_tracker.tile].

You shouldn’t have to do anything, per se – the logs should still show the Tiles attempting to communicate with the Tile cloud. We can go from there.

ok wiill give it a go. I am currently trying to set up a simple alarm clock and struggling. I am so bad at this stuff!
Yaml is so sensitive !!!

1 Like

How does the run script continue to run do we have to daemonize it? Also it looks like the binary sensor is polling the log file, wont the log file become exponentially large if the script continues to run?

@Bit-River

My use-case is for presence and I followed the directions that @Bit-River gave me here:

https://community.home-assistant.io/t/multiple-ble-tile-accounts/

Problem I encountered (other than having to have all Tiles under one account as HASS support for Tiles appears to only support one account) is that it relies entirely on the app on your phone and even then, GPS coords are not necessarily updated often enough and certainly not reliable enough for presence (which is what I wanted it for, if I could use the locate function that would have been a bonus – and for $83 for a pair of sport Tiles, I would have really liked that. In retrospect, when they die, I’ll go with battery-replaceable workalikes.)

I bought a cheap ASUS BT400 BT USB dongle and using the Python script, HASS polls every 3 seconds to the script with a MAC address (which if you use the Tile app, is hidden so you can’t “see” it) which the script will respond in a TRUE/FALSE manner if it has seen it.

Works really well for me. My wife and I keep them on our car keys which usually follow us around so for me, this solution works really well as we use this method + nmap + Owntracks.

Not 100% sure this will help you but it helped me.

2 Likes

@chrisw

Thanks I think I’m starting to understand the method… couple of questions do you run this script with you hass instance or a separate pi zero? Second, once the script is running how do you keep it running?

I run it in the same instance as HASS runs. I don’t have a Pi but I do have an old box I re-purposed as a server running OpenMediaVault (NAS) which I run HASS from a venv on. I run the BLE python script from /etc/rc.local as indicated in the thread (it forks into the background) – I tried running it via systemd and init.d as the HASS user but didn’t have much luck (so it runs as root out of rc.local)

[email protected]:~/.homeassistant$ ls -la /etc/rc.local
-rwxr-xr-x 1 root root 365 Jan 26 06:27 /etc/rc.local

[email protected]:~/.homeassistant$ cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

/usr/bin/python3.4 /home/hass/homeassistant/ble_scan.py &

exit 0
1 Like

Thanks for the clearification I will have to read more on the /etc/rc.local I’m a less than intermediate Linux user so I’m slow going :stuck_out_tongue:

@chrisw