[General Accessories] Bonoboo:
Alert if bracelet missing (not near phone)

Also check other useful additions for Mi Band

What is this

In some cases capsule can very easily press out from the bracelet, especially if it's unoriginal.

You can fasten it inside by many ways: tape, glue, plastic ring etc.

This app / Tasker profile will notify you if bracelet far away – probably, lost.

If you already lost it follow this instruction

How it works

Created using Tasker: via App Factory project exported into standalone APK

At first manual launch filling variables

Now always after specified period of time app / Tasker will check for bracelet by scanning BT-devices near

Used condition "if not near" and matching name. Optionally you can enter MAC-address, which is important if around can be several bands

If bracelet not near (distance 10-15 meters) phone will vibrate and show notification: No connection to bracelet. Is it on your hand?

If screen off and there is audio file: also will be played sound

Settings description

If you want change settings: clean app data or delete it and install again.

For Tasker: change variables.

– Scan every (sec.) - how often look for bracelet, in seconds. Default 300 = 5 minutes. Minimum - 60

– Paired / unlock on 5.0? – only for app: do you use Smart Lock feature or paired bracelet with a phone (in Settings)?

– Several Mi Band's? – if you often have several bracelets near: 1 - yes, 0 - no

– MAC-address – if yes, enter MAC-address of your bracelet (how to find: Mi Fit > menu > Settings > tap on the firmware version)

– Bracelet name – name of the bracelet, default "MI"

– Log? – write to file /sdcard/noconnect.txt time and date of any lack of communication with bracelet

– Ignore silent? – at playing sound this will disable any interrupt mode and/or silent/vibrate and then restore it's previous state

To control interrupt mode on Lollipop you need enable access to notifications for app / Tasker

About battery discharge

If screen on – scanning will run every 30 seconds (more can't be set due Tasker limitation).

If off – scan every 5 minutes (can be changed, but minimum 1 minute).

This holds CPU in awake state (wakelock) for 3-5 seconds, during this time bracelet usually responds.

So for 24 hours phone will not "deep-sleep" for 10 minutes. It's very small and doesn't have noticeable impact to battery.

But if the bracelet not near CPU will work all search timeout – 15 seconds instead 3-5.

Also in my tests with scanning every minute it had no effect on bracelet battery.

Important notes, please read

– False positives are rare and can only be if band for some reason didn't respond to search request

– Notify when you temporarily moving away from the phone for 10-15 meters over given time to scan – it's not surprising

– It notify you once, next will be only after finding bracelet and loss of communication again

– You should always keep Bluetooth on

– It NOT scan if Bluetooth off and therefore not work

– It NOT depend from connection with Mi Fit app

– To disable scanning: turn off BT or "freeze" / delete app / turn off profile

– Add app Mi Band Anti-Lost / Tasker in exceptions of your task-killer and Stamina

– Use at your own risk, I can't guarantee that app will run smoothly (and don't forget to fasten capsule)

Installation

1. Install latest version of Mi Fit app (at least 1.2.911 fine)

2. Open it > menu at the top right > My profile > Fitness Center > enable BLE Broadcast

3. Download and install application below post (Mi_Band_Anti_Lost.apk)

4. Run it. Enter all settings, details above

5. You can hide it's icon from launcher, we don't need it anymore

6. If you want a sound with notification when screen is off: place short MP3 or OGG file with name lost in /sdcard

7. If you using modded Mi Fit app with notifications: configure vibration for Mi Band Anti-Lost app, so you immediately understand whether is there bracelet or not

Installation if you use Tasker

Important: profile will overwrite interval / timeout checks BT when screen on and all if off (Tasker > menu > Preferences > Monitor)

If you not satisfied with these and other recommended changes to the Tasker settings – use standalone app above.

1. Install latest version of Mi Fit app (at least 1.2.911 fine)

2. Open it > menu at the top right > My profile > Fitness Center > enable BLE Broadcast

3. Download below post profile (Mi_Band_Anti_Lost.prf.zip)

4. File from ZIP copy to /sdcard/Tasker/profiles

5. Tasker > tap on the tab Profiles > Import > Mi_Band_Anti_Lost

6. Start same name task. Enter all settings, details above

7. If you using Smart Lock: tap on profile > Device not near > uncheck Unpaired Devices

8. If you want a sound with notification when screen is off: place short MP3 or OGG file with name lost in /sdcard

9. If you using modded Mi Fit app with notifications: configure vibration for Tasker, so you immediately understand whether is there bracelet or not

10. In this case you also need to disable Tasker > menu > Preferences > Preferences > Run In Foreground to hide persistent notification

11. If there is an errors when you open Tasker (if band not paired): disable Tasker > menu > Preferences > Misc > Popup Errors/Warnings

Changelog

2.2

– Added option to ignore any interrupt mode and/or silent/vibrate to play notification sound

2.1

– Compatibility with Smart Lock on Android 5.0 or if bracelet paired with phone (in Settings)

– Added ability to specify name of the bracelet (if someone renamed after pairing)

2.0

– Very different, more reliable search method: via Bluetooth near

– Configuring frequency scanning when screen off

– Optional input MAC-address in case if there can be few bracelets near

– You can select sound for notification when screen off

– Optional logging of lack of communication

– For Tasker: instead project all now packed into profile

– For Tasker: now no error that log file doesn't exist

1.0

– First very imperfect and now non-functional version