Thought I might share this quick script I knocked together to help with device tracking.
I have a bunch of raspberry pis throughout the house so I thought if I could use them as Bluetooth trackers it would help with presence detection.
All it does is check for devices and sends a custom mqtt payload with that devices state.
You can use your “hostname” in every Raspberry like your “Location”.
If you do that I suggest change your script, on line 25 and set line like next:
import socket
LOCATION = socket.gethostname()
If you do in this manner you save time to configure this in your script because you don’t need to edit for every device.
You only need to set different hostname for every Raspberry Pi and provide name like: laundry, room1, garden…