[RELEASE] BTLE Presence Sensor (Tile Mate)

thanks Brian, i will do that but what does the check beacon presence file do? as in this file

and do i need it?

Hi, ive altered my service file to match my folder structure but cant get the service to run. can someone point me in the right direction please? this is the last step!

heres my folder structure.

and this is my altered service file.

image

i cant see what ive done wrong.

Hi All, im really struggling with getting this last stage to work, i keep getting this error (below) ive created the directory structure, at least i think i have as the service file needs: home/pi/git/BTLE-Presence. and put all the files in it.

I install the service file, but im certain it needs to be in the root not the BTLE -Presence directory, but that shouldnt make any difference for testing it should it?

which directory should i install this file in?

tried installing and running from here still not cigar!

Are you starting the service with Sudo?

sudo systemctl start check_beacon_presence.service

This can be run from anywhere since you copied the .service file to /lib/systemd/system/

If you're getting errors starting the service, try running this and looking at the output:

sudo journalctl -u check_beacon_presence.service

ISSUE NOW SORTED, SOLOUTION BELOW.

Hi Brian, Ive started the you tube vid for this :wink:

all commands have been copied and pasted and are exactly as given here

thanks for getting back to me. here's the errors that im getting, from what i can see there's some sort of permission issue, but i don't know what.

I've set up the file system as you told me, home/pi/git/BTLE-Presence. I've written all the files in the BTLE-Presence directory via nano. it all works absolutely perfectly when started manually.

I've written the service directory in the root but tried it in the BLTE-Presence dir as well. running the command you gave above gives the following.

I googled the 2nd red error, and found the problem. the file im trying to execute automatically didnt have the required execute permissions and so i altered the with the command:

sudo chmod a+x filename-or-full-filepath

it all works now thanks.

1 Like

EDIT, sorted this out, need to swap from switch mode to repeat mode in the tag data. as per the instructions!!

Hi all.

im missing the RSSI of the device details, is there an updated driver ive missed

loving the reliability of this system, getting a few false reports maybe one a day. im hoping that will go as i roll out multiple monitor stations and use combined presence.

what mixtures of presence detection is everyone else using with these, and how reliable have you got it to be?

@brianwilson So I finally got everything up and running with the Raspberry Pi and Hubitat. Thank you for a great alternative presence app. I also wanted to let you and future users know that I found a quick way of identifying the MAC address of the Tiles because I found that whole process to be very frustrating. On Android I used an app called Bluetooth Scanner. I am not sure if there is an equivalent app on iOS. I then went as far away from my other Bluetooth devices as I could with my phone and the Tile. I then scanned with the app to see which device had the strongest RSSI signal which for me happened to be around -20dBm. Then I selected more information and the app identified the device as the Tile I was looking for. I put this MAC address in the check_beacon_presence.py and everything works. Hope that this is helpful for someone in the future.

1 Like

Nice. Yeah, iOS BT scanners can't show Mac address. I confirmed this worked on an Android device for me as well. Not all my tiles showed up as "Tile" named devices, so YMMV depending on age/type of device.

1 Like

I have a use case for this stuff and wanted to run this by you. I want to know if my cat is out in my garage by some sort of presence sensor (BTLE) seems to be the key thing here. With four family members and an older cat that sometimes desires to "get away" from our two younger cats and sometimes multiple foster kittens, we let him out in the garage. We have been using HE to set a light in the laundry room (pathway to garage) to blue to indicate that the cat is out in the garage but sometimes people forget to set the light or turn it white again when the cat is back in the house. I wanted the presence sensor to trigger the light in the laundry room (and on dashboards) and perhaps make an announcement that the cat is out in the garage.

Tile makes a "sticker" version that is 27mm diameter and only 7.3mm thick with a 150ft range. I could get that onto the collar with a 3D printed holder or maybe connect it to a harness and mount it so the tile is on his back. The cost for the 2 pack or 4 pack of "sticker tiles" and the cost for a RPi setup (I have no RPi experience but willing to get frustrated until I concur it) is not a problem if if prevents the cat from getting lost.

So all I would need are the tiles, a RPi, and ...? What RPi would be recommended? I'm willing to make this jump and if this works I might be able to put additional RPis in the house to track cats, lol.

Your work on this and with the HE community is awesome. Its people like you that are going to make my "Star Trek" smart home a reality one day.

Thank you for any help you can give me.

  • Norbert

I was surprised at how well a Pi Zero W worked. (W indicates wireless, which includes the BT radio.)

They are $10 if you get them without the header, which is not needed in this use case.

You would want to consider a case, and they are often just plexiglas/acrylic stacks that protect it from getting shorts. $7 from many sources.

Screen Shot 2021-03-08 at 9.50.57 PM

Can probably fit two of them side by side on top of the Hubitat Hub. (Not that you'd want to.. )

1 Like

So if the Tile "stick" puck has a range of 150 foot, then the RPi will know that the tile is within 150 foot-ish but not necessarily "in the garage", correct? I would need to instead get a BTLE beacon most likely for that?

Correct. A beacon would work but is still similar. My BT beacon has the power very low so I can only trigger it in that room. You could likely do the same with rssi info from the Pi.

1 Like

I took my pi to the bottom of the garden and did similar!

1 Like

you would need to set it up and play with it, the 150ft claim will be line of sight and then its probably a bit wishful!

When you set it all up you can select to show RSSI value in the HE device setting. I think i read somewhere here that you can use this a a rule setting ( i could be wrong) maybe you could set a rule that alerts you if the RSSI goes above a set level?

RSSI being a radio signal strength of some kind? I have NO clue about RPi but willing to learn. If I could pull this feat off, my wife would be impressed. Yeah, how things change with age, LOL.

So silly question. How does the RPi talk to the HE hub if it only has Bluetooth? Or does the Pi have WiFI to get onto the network? Would I need an Ethernet accessory or perhaps a WiFi accessory as well? If I'm gonna purchase this stuff I'd rather get everything in at once rather than in bits and pieces where I'm waiting for a delivery on one item that the delivery service will ultimately lose, lol.

Raspberry Pi Zero W specs

  • Dimensions: 65mm × 30mm × 5mm
  • SoC: Broadcom BCM2835
  • CPU: ARM11 running at 1GHz
  • RAM: 512MB
  • Wireless: 2.4GHz 802.11n wireless LAN
  • Bluetooth: Bluetooth Classic 4.1 and Bluetooth LE
  • Power: 5V, supplied via micro USB connector
  • Video & Audio: 1080P HD video & stereo audio via mini-HDMI connector
  • Storage: MicroSD card
  • Output: Micro USB
  • GPIO: 40-pin GPIO, unpopulated
  • Pins: Run mode, unpopulated; RCA composite, unpopulated
  • Camera Serial Interface (CSI)

the W means wireless.. WiFi & BT got added via a single chip that didn't exist with the non-W version.

1 Like

OK, so the RPi Zero-w or wh (either) is awesome. I can order a starter set so I get all that I need to set it up and get it programmed. Now for the beacon. I found a few things on Amazon (shocker) like this Blue Charm Beacon (https://tinyurl.com/y8btload) that has these features:

  • Our new generation compact beacon with a unique button trigger option. Long Range BLE 5.0 but also compatible with BLE 4.0. Shows battery level in broadcast. Button can be configured to trigger different broadcast.
  • Broadcasts your choice of iBeacon, Eddystone TLM, Eddystone URL, and/or Eddystone UID format. Eddystone TLM broadcasts battery strength, temperature, and broadcast count data every tenth broadcast.
  • Free configuration apps for iPhone & Android allow you to adjust settings according to your needs.
  • Transmit distance: 0.2-90 meters when using BLE 5.0. Selectable TX levels: -40, -20, -16, -12, -8, -4, 0, +4dBm
  • Our website has very detailed step-by-step instructions with multiple screenshots under the Quick Start Guide menu.

The size is right at just over the size of a quarter and about 1/4" to 3/8" thick which would be able to clip onto a cat collar and not act as an anchor (JK). And its encased with a battery that is replaceable. Does this sound like a beacon that would work with your code and the RPi?