Uncategorized

Sleep as Android talks to Xiaomi Mi Band 1&2

It was a long quest. Starting with the introduction of the first version of the budget band from Xiaomi, we have been flooded with requests from you, the users of Sleep as Android, to make good use of the band.

Unfortunately, there was no documented protocol which we could use and the task seemed repeatedly possible and impossible with the efforts of various independent developers who seemed to crack the Bluetooth protocol that Mi Band used.

But Xiaomi always stroke back and changed the protocol.

After a long long long and seemingly impossible quest to get Mi Band talk to Sleep as Android, we got a word from Zdenek Horak, the author of Tools & MiBand (called MiBand Tools then) that he might be able to get this relationship working. But even for him, it was not an easy task, and even Zdenek felt at times that it’s an impossible thing.

But he didn’t give up. And finally, here we are.

Today, we can announce that Sleep as Android supports Xiaomi Mi Band 1&2!

 

How to:

For the integration to work, please buy & download the amazing Tools & Mi Band – the best Mi Band app on Android – Sleep as Android gets a full featured Mi Band support.
UPDATE: Sleep as Android is also supported by Notify & Fitness for Mi Band.Thanks Matteo!

Motion tracking (sleep phases tracking)

Enable Settings > Wearables > Use wearable. 

Heart rate measurement

You need to enable heart rate in Tools & Mi Band:

Go to Tools & Mi Band > Navigation drawer > Heart rate > Settings and set the interval at which you want heart rate to be measured. This will then send heart rate to Sleep as Android at selected rate during sleep tracking.

You also need to enable heart rate monitoring in Sleep as Android:

Enable Sleep as Android > Settings > Wearables > Heart rate monitoring.

And battery life? With a full charge, you get to 95% in the morning after a whole night’s track. So we are probably better off than the Pebble (RIP)…

CAUTION: Sorry Mi Band 1 users, the integration only works with the Mi Band 2 with the newer firmware. For Mi Band 1 it is not technically possible. No access to its data. Mi Band 1 has been integrated as well! Please see Now Sleep as Android talks Mi Band 1+2 (-1S)

156 thoughts on “Sleep as Android talks to Xiaomi Mi Band 1&2

  1. Does smart wake up work with the Mi Band? I ask because since I switched from using the smartphone sensors to the Mi Band 2, I get woke up at the exact alarm time and not at some point in the 30 minute window before. I’m wondering whether I’m missing some setting or whether it just works this way.

    I configured “Use wearable” and the heart rate settings in both apps as described above. What about the smartphone sensors (e.g. sonar)? Do they have to get turned off somehow or otherwise configured differently?

    Any hints are greatly appreciated.

  2. Currently, I’m running into strange synchronizations problems with MITool and Mi Band 2. I have sent them to you already.At this moment SAA seems to sometimes register no activity and no HR; sometimes there are two HR, and no activity, and sometimes all activity but no HR.
    I am wondering what happens if I add the Phaser to the mix. I ordered the Phaser already, so now I hope it will work well.

    I am hopeful, as SAA worked without problems for two years before I added the Mi Band.

    1. I just tested my new Mi Band 2 today. On test, at first it was a flat graph. Then I touched the Mi Band button, and THEN the sensor worked :’)
      The Mi Band 2 also has a “Lift wrist to view info” option. Maybe check that? (mine is turned off)

  3. Seconded! I got the test tracking to work once but doesn’t work on average. Last night was a flat graph. I specifically bought that mi band app to enable better sleep tracking. Ideas?

  4. It allows to do both motion detection and heart rate tracking, when it works, but even the motion taken from the hand alone should be better than phone readings form the bed, anyway.

    I speak from what I’ve read, I do not own the device, but intend to.

    1. Seem to have an issue wjere miband tools works, and the Mifit app work with my Miband 2, but Sleep as Android does not seem to be able to work. when I select ”’use wearables” and then “test sensor” the connection ultimately times out. Maybe an Android P issue?

      1. Exactly – currently there is an issue with mi band on Android P where it doesn’t work. The developer of Miband Tools is working on it.

  5. Hey all

    Started using mi band 2 with sleep as android and installed both mi fit and mi band tools.

    As far as i can tell i’ve set everything up acording to the above listed how to. giving all permissions the apps needed when setting things up

    Now this morning, my SAA only shows sound recordings that have been made, the activity and sleepphases are empty besides starting and waking up times
    in Mi Fit however it shows all data collected using the Mi Band 2 including heart rate.

    So my question is: How do i get SAA to actually use the data from my mi band 2??

    A few details below

    Using the honor 7x smartphone

    Latest versions of mi fit / mi band tools and sleep as android

    Testing wearable sensor on SAA doesnt record the band but it does register phone movement???? ()this i find weird)

    Hope someone can help me as i am out of ideas

    With regards

  6. is there somewhere I can track this issue with android p and the mi band 2? I have the issue too and I’m happy to help with diagnostics and information if that’s useful.

    1. The only one who can do something about this (as far as we know) is the Mi Band Tools developer. So the best thing would be to contact him and track the issue in the release notes of Mi Band Tools.

  7. After testing a bit with SaA and my MiBand 3 i found out that SaA can only track the motion sensor after tapping several times in the screen of the MiBand. Mostly it worked after waking up the screen twice by tapping and sliding up once…

    1. Hello, this issue should now be resolved. We have found that there was indeed an issue in Sleep as Android (a small typo goes a long way…)

  8. My sleep data seldom gets to SAA from my MI Band 2. I can see my sleep data in the MI Band app but not in SAA. The only way my data gets to SAA is if I initiate sleep tracking from within SAA itself. I dont want to do it this way because sometimes I forget. Help?

  9. Hi,

    Reading the Notify & Fitness page on the Play Store, I am seeing this:

    “All Mi Band supported: 3, 2, HRX, 1S, 1S, 1….
    Official app is not required.”

    Heck, the 1S is actually supported twice! 🙂

  10. Hi, I have a Mi Band 3. Using Sleep As Android, is it possible to make it so that the Mi Band vibrates when the alarm goes off? In other words, when the Sleep As Android alarm goes off there is no sound or vibration in the phone, the only alarm notification is the vibrating from the Mi Band. How can I do this?

    1. Hi, you could turn the phone alarm to silent and set the vibration on the Mi Band, so the alarm won’t make any sound on the phone, only initiate vibration on the gear:
      – in the Alarm settings (the per-alarm settings, not the default) > Ringtone > Silent (tick)
      – and then set the vibration in Settings > Wearables > Vibrate > From start.
      It is not possible to set this option as alarm default to prevent this “no sound alarm” being set accidentally to all future alarms.

    1. It isn’t possible to use Sonar and Mi Band at the same time. If you have Mi Band selected in the wearables section, Sleep will attempt to connect to it and if it connects, sonar will not be used.

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.