Amazfit / MiBand Home Automation with OpenHAB

Hello. I will show you a simple setup process for home automation with MiBand 3 smart watch and OpenHAB.

What you will need is:

  • Xiaomi MiBand or Amazfit watch
  • Android Phone
  • Notify & Fitness for Mi Band (Android application)
  • Tasker (Android application)

What you can get:

  • Fell Asleep – do some tasks when you asleep
  • Woke Up – do some tasks when you awake
  • Heart Rate, Step counter, Battery Level…

First you need to pair the watch or band with the MiFit/Zepp application. The second step is to download the Notify & Fitness for Mi Band, connect it to your MiFit/Zepp application and it should look something like this:


After you have successfully installed and configured the Notify & Fitness for Mi Band application we can proceed to the next step, Tasker. Tasker is one of the most powerful apps available for Android and is often used in Home Automation projects. 

After you install the Tasker application, configure it to automatically forward the intents sent from Fitness for Mi Band application to OpenHAB. Open Tasker and create a new event under System and Intent Received.



Here is one example: FellAsleep – which is very useful in bedroom. You can trigger OpenHAB to turn TV, Lights, Heater, etc. off. when you fall asleep. The name of the intent action should be “” (as shown in the picture below):



Furthermore, you need to create a task. In this instance I am going to create a HTTP Get task which triggers the OpenHAB, but you can make it also with MQTT or something third. Just write your ip/hostname from OpenHAB server. Also you need to put your Item name under Attributes – Item Name which we will trigger to ON.


Next step is to create Item and Rules in Openhab.



Switch MiBand_Vanja_FellAsleep

rule "MiBand_Vanja_FellAsleep"
Item MiBand_Vanja_FellAsleep changed to ON
//when we receive the fell asleep command
//turn the switch back to off because its a momentary trigger
sendCommand(Bedroom_Desk_Lamp_Power, OFF)
//turn off the Desk Lamp
sendCommand(Bedroom_TV_Power, OFF)
//turn off the TV
sendCommand(BedsideLight_Power, OFF)
//turn off the Bedside light

That’s it. Here is a list of other intents that you can use:

When you want to get heart rate, steps, etc. from mi band you need to use the %value keyword under attributes, like this:

And you can get something like this in your OpenHAB sitemap:

If you need help, let me know. Best regards!

Vanja Vršić

Facebook YouTube 

Tagged with: , , , , , , , ,
4 comments on “Amazfit / MiBand Home Automation with OpenHAB
  1. Hana OUERHANI says:

    Need your help please

  2. Alexander Parunov says:

    “That’s it. Here is a list of other intents that you can use”
    I can not find this screen. (

  3. Edelbrockxid says:

    reproduced by hand, in contrast

Leave a Reply

Your email address will not be published. Required fields are marked *