[monitor] Reliable, Multi-User, Distributed Bluetooth Occupancy/Presence Detection

First of all. Thanks @andrewjfreyer for all your effort and selflessly sharing it with us.

That said, I bought a Pi and got it running but apparently monitor can’t “auto detect” either of the known devices. I ended up setting monitor with the -r parameter and although it sometimes takes a quite a while to detect, it works.

How can I fix or improve this? I read the entire topic and saw someone saying something similar about his/her devices not broadcasting anything but ultimately found no solution other than setting up an app emulating a beacon which IMO kinda defeats the purpose of using monitor. Also read about triggers but at the moment I can’t use any ( will definitely work on that as it seems to be the ultimate fix ) but I’m curious why my devices aren’t working as the yours.

Hey there!

I was wondering, living in a 2 story house, how would I go about interference between each node? E.g. Kitchen on ground floor and Living room above on the first floor?

Ideally would like to set up one in each room and can imagine it’ll cause tripping each one … Is there anyway to ‘power down’ the BT radio power for example or limiting the range?

If I strategically place and could potential direct the BT signal in a certain direction, I’d only need 0.5-1 meter range

@daneboom
Did you solve this?

What are your known devices? Note that the -r parameter has been removed from beta. If you want periodic ping, the presence project is much more appropriate.

Two android phones running Android 7 and Android 8. And I’m using -r as a workaround until I (or you guys) figure this out. Or I’ll move to using triggers, so I’d like to stick with monitor as the ultimate solution.

1 Like

Have you been able to test that the Android phones actually broadcast bluetooth advertisements? I wrote on this earlier in the thread, but basically this:

Turn bluetooth off on the phones.

First ssh session:

sudo hcitool -lescan

Second ssh session:

sudo hcidump -a

You may see several advertisements in the second ssh window. Turn on bluetooth on your devices and you should nearly immediately see a new “random” advertisement. Turn bluetooth off, wait a moment, and try again. Hopefully you’ll see another different bluetooth advertisement when you turn bluetooth on again.

If you don’t see any advertisements, the phones may not be advertising at all.

2 Likes

Will try when I get home. I apologize for not understanding the topic well enough, everything is pretty new to me. Thank you for your time, sir!

Will try this too! Working well for you?

Yup, I changed it to once a day (at night) because I thought it was causing false triggers but I found a different bug so I change it back to restart every six hours.

1 Like

You’re still on the beta branch, yes? I’ve made some recent updates that have improved stability of the beta for me.

Well. No luck, tried with three different Androids (LG G5, OnePlus 3, Sony XA1 Plus) and none of them sent a packet no matter how many times I turned BT off and on. So am I out of luck?

1 Like

Hi @andrewjfreyer

My girlfriend just changed from an iphone 6s to a iphone XR and the new phone is not detected.
it does not also return a value when I do a name request : hcitool name (MAC)

Any feedbacks from the new iPhones ?

1 Like

Yes. Pair it to any Bluetooth device first. A car stereo, speakers, whatever. It worked for two people in this thread.

I wonder if we should do something like a FAQ. This thread has gotten pretty long.

2 Likes

As soon as it connects to something, I get a “hcitool name” reply
But few moments later … I am unable to get an answer

Is there a preference I can set somewhere to have the presence messages have the retain flag set? I’m running monitor via the systemd service.

1 Like

which is what I have done to my phones and none of them send an advert… I did test using the

As others have mentioned, try pairing with another Bluetooth device first. It appears that iPhones do not enable the Bluetooth radio fully unless and until they have been paired with something else

-x will retain messages

Perhaps the real issue is that these devices need to pair to a Bluetooth LE device, instead of a generic Bluetooth device. To conform to the Bluetooth protocol they will have to advertise.

Try with the --duplicates flag as well. There will be a lot more data, but you may be able to see the device reporting.