With default settings, an arrival scan is triggered by the random, untraceable, advertisement packet transmitted from your phone. Depart scans are triggered by a timeout. Either or both are triggered also by the MQTT triggers you mentioned.
Thatâs somewhat confusing, I know. I hope it will be more clear as I develop the documentation further, but in answer to your question, Iâll try an analogy:
Your phone is constantly shouting into the Bluetooth environment, âI can connect! I can connect!â so that everyone nearby can hear. But, your phone isnât advertising its identity so no one who hears this shout knows who is shouting. A dark room with an unknown voice.
In response to hearing one of these shouts, monitor
shouts back asking for each of the phones it believes are absent, âis Rob here? is Katie here? is Andrew here? is Jonathon here?â
In response, your phone (and any of the other three) shouts back, âYes! Rob is here!â Ok. Great. monitor
marks your phone as present.
After a period of time defind in your settings, monitor
will ask again, âis Rob still here?â
In response, your phone (and any of the other three still present) shouts back, âYes! Rob is here!â
In addition, in response to particular MQTT triggers, monitor
will ask, âis Rob still here?â (only if your phone is currently marked as present) or âis Rob here?â (only if your phone is currently marked as absent).
Beacons behave a bit differently. Some perriodically shout âGary is here!â whereas some should âI am Steveâ so we have to treat beacons a bit differently. Most wont respond if we ask whether theyâre there, so we just have to wait for them to identify themselves.
Random Advertisement = âI can connect!â
Arrival scan = âis Rob here?â
Depart scan = âis Rob still here?â
So, with default settings, arrival and depart scans will be triggered automatically. If you like, you can also trigger arrival scans or departure scans from MQTT.
If you set monitor
to trigger arrive and depart scans only on MQTT, the script will ignore random advertisements entirely.
Personally, I have my system set to depart scan only when triggered by my exterior door sensors. This configuration speeds up detection of departure substantially.
Does this analogy makes sense?