Control IoT devices with a Xiaomi Mi Band 2
Smartwatches can be rather expensive and tend to be known for their poor battery life. On the other hand, Xiaomi's Mi band 2 is cheap and its battery lasts for up to 20 days. However, the Mi band 2 is mainly limited to fitness tracking funtioncs, at least without the appropriate apps. The objective of this project was to take advantage of the Mi Band 2's connection with a smartphone to control IoT devices.
Using the app called Mi Band 2 func button, taps on the Mi band 2 buttons can trigger Tasker tasks on a smartphone. Thus, using Tasker's MQTT plugin, the Mi band 2 can control IoT devices.
The app called Mi Band tools provides tasker with the ability to send custom notifications to the band. Thus, visual and haptic feedback can be provided to the band when tapping its button. For example, a notification saying "OK" can be displayed when the lights are turned on by tapping the button.
I setup tasker so that a triple tap on the Mi band 2 enables a menu by showing the user the menu item currently selected. Triple tapping again triggers the selected item. Single taps cycle through menu items in ascending order while double taps cycles in descending order.
The Tasker profiles are available on my Github