Connecting Smartband
Moderator: Martin
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Connecting Smartband
So the Mi Band 2 just came back in retail and i decided to go and buy one for a couple of bucks.
Now i'm trying to connect Automagic with it which seems to work according to the Bluetooth settings inside Android.
And when i execute an action "connect/disconnect bluetooth device" by itself (when you edit the block and execute it), it executes successfully.
Yet when i try to choose a device from another action of the wearables category with the [...] button, Automagic shows the screen message "no device available".
Am i missing a step here?
Now i'm trying to connect Automagic with it which seems to work according to the Bluetooth settings inside Android.
And when i execute an action "connect/disconnect bluetooth device" by itself (when you edit the block and execute it), it executes successfully.
Yet when i try to choose a device from another action of the wearables category with the [...] button, Automagic shows the screen message "no device available".
Am i missing a step here?
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Connecting Smartband
You abandoned waiting for the Mi band 3 with NFC?
I can find the MB2 when using LP 5.1. But can't find it anymore in Oreo 8.1. There is no way we can connect the band directly to Automagic (even you can search it in the action). I have to use the Mi Band 2 Func button first, connect it. Then use the single, double, triple tap to send intent to Automagic to make it work. Lift wrist also work but will drain more battery. Probably this should be requested as feature.
I can find the MB2 when using LP 5.1. But can't find it anymore in Oreo 8.1. There is no way we can connect the band directly to Automagic (even you can search it in the action). I have to use the Mi Band 2 Func button first, connect it. Then use the single, double, triple tap to send intent to Automagic to make it work. Lift wrist also work but will drain more battery. Probably this should be requested as feature.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
No the wait for the MB3 with NFC continues.
But i thought it'll be nice to already get used to, and get to know some concepts (and hopefully create/test already some flows with it).
All with the price for a cheap dinner for 2
So if i'm understanding this correct: The OS needs confirmation & directions on BT-activity in order to pass the BT information to the application/activity?
And for this step i need an app like Mi Band 2 Func button?
And how has "wrist lift" have to do with this?
P.S.:
Is it just me? I always found Bluetooth a bit tacky. It never seems really clear on how connection is being established/maintained.
There always seem to be a lot of loose ends/links in the chain depending on what devices you're trying to interface.
Whenever i achieved any BT-connection, the initial response always was: "Oh wow, it worked". This response shouldn't be normal
But i thought it'll be nice to already get used to, and get to know some concepts (and hopefully create/test already some flows with it).
All with the price for a cheap dinner for 2

So if i'm understanding this correct: The OS needs confirmation & directions on BT-activity in order to pass the BT information to the application/activity?
And for this step i need an app like Mi Band 2 Func button?
And how has "wrist lift" have to do with this?
P.S.:
Is it just me? I always found Bluetooth a bit tacky. It never seems really clear on how connection is being established/maintained.
There always seem to be a lot of loose ends/links in the chain depending on what devices you're trying to interface.
Whenever i achieved any BT-connection, the initial response always was: "Oh wow, it worked". This response shouldn't be normal

Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
Never mind this bit. I've read the app description of the Mi Band 2 Func Button.digitalstone wrote:And how has "wrist lift" have to do with this?
--EDIT--
So i've installed Mi Band 2 Func Button, but completely fails to maintain a stable connection.
It is in a constant loop like:
Connected! Battery: 83%
[5 seconds of stability]
Failed to connect!
--EDIT 2--
Got it.
Found the Mi Fit app somewhat confusing with all it's bells and whistles.
So i froze it with Titanium

But i figured that (of course) the Mi Fit app must function as an interface between the MB2 and Android.
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
The left-over questions i would like to ask are:
- Is the 'AndroidWear' category of triggers, conditions and actions usable with ONLY certain smartwear's applications?
- If so, should Tasker actually be installed for "Mi 2 Band Func Button" to work with (and from there to send some type of intent, or perhaps http-request workaround with 127.0.0.1, to Automagic) or is there an alternative?
- Is the 'AndroidWear' category of triggers, conditions and actions usable with ONLY certain smartwear's applications?
- If so, should Tasker actually be installed for "Mi 2 Band Func Button" to work with (and from there to send some type of intent, or perhaps http-request workaround with 127.0.0.1, to Automagic) or is there an alternative?
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Connecting Smartband
Ooops, I forgot your post. One hidden thing you need to do is you must open Mi Fit before using Mi Band 2 Func button. Yes, as you have found out.
Those wearable action are for android wear, not for smartband with its own proprietary OS such as Mi Band 2. No tasker needed, Automagic can received the intent broadcast directly using Trigger General Broadcast. Just fill in mb2_tap1, mb2_tap2 etc in the General Broadcast. Each tap require one Trigger. (you can put them all in the same flow and split it using multiple parallel expression)
Those wearable action are for android wear, not for smartband with its own proprietary OS such as Mi Band 2. No tasker needed, Automagic can received the intent broadcast directly using Trigger General Broadcast. Just fill in mb2_tap1, mb2_tap2 etc in the General Broadcast. Each tap require one Trigger. (you can put them all in the same flow and split it using multiple parallel expression)
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
Dude, don't ever say oops again. You're spending so much time on being a huge help already.
For your answers: thanks!
For your answers: thanks!
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
Big chances are that i was too quick...
Which field does the "mb2_tap1" etc have to be applied to?
I've tried multiple possible solutions.
But my best guess right now (and still failing) is:
Action field: mb2_tap1
Action Intent Extra's: value=getString("command")
Nothing happens when i tap the Mi Band 2

Which field does the "mb2_tap1" etc have to be applied to?
I've tried multiple possible solutions.
But my best guess right now (and still failing) is:
Action field: mb2_tap1
Action Intent Extra's: value=getString("command")
Nothing happens when i tap the Mi Band 2
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)
Re: Connecting Smartband

The trigger General Broadcast only need to have the mb2_tap1. No other parameter anymore, no extras. The flow just got trigger when the MB2FB send the intent. If the flow doesn't get triggered, most likely it is the connection that hang up or the app itself frozen. Try to force stop it or disconnect and connect again. I have a lot of force close when using this app. And I can't test it anymore in Oreo 8.1, as one of the function from this app is obselete in Nougat above. Installs fine but always force close when opening.
Index of Automagic useful thread List of my other useful posts (and others')
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
Xiaomi Redmi Note 5 (whyred), AOSP Extended v6.7 build 20200310 Official, Android Pie 9.0, Rooted.
- digitalstone
- Posts: 342
- Joined: 21 Oct 2017 12:36
- Location: The Netherlands
Re: Connecting Smartband
Now it's my time to go 'woops'.
I forgot to let the Func Button application send a broadcast (Send Command to Tasker).
But... it's completely working now. And i got a way better understanding of broadcasts... Bluetooth as well, since i've been looking up all sorts of info about it.
Thanks, this was a good one!
What phone do you have now? Does it have Oreo and was it necessary to make that switch so bad that you need to adjust all sorts of flows?
I forgot to let the Func Button application send a broadcast (Send Command to Tasker).
But... it's completely working now. And i got a way better understanding of broadcasts... Bluetooth as well, since i've been looking up all sorts of info about it.
Thanks, this was a good one!
What phone do you have now? Does it have Oreo and was it necessary to make that switch so bad that you need to adjust all sorts of flows?
Phone: LG Nexus 5X (rooted vanilla Android 7.1.2)