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 “com.mc.miband.tasker.FellAsleep” (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.
Item:
Rules:
Switch MiBand_Vanja_FellAsleep
rule "MiBand_Vanja_FellAsleep"
when
Item MiBand_Vanja_FellAsleep changed to ON
//when we receive the fell asleep command
then
MiBand_Vanja_FellAsleep.postUpdate(OFF)
//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
end
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!
Need your help please
Hi, what do you need?
“That’s it. Here is a list of other intents that you can use”
I can not find this screen. (
reproduced by hand, in contrast
You are sleeping – your PC is collecting crypto. The Grasse Network uses 1% of your PC to collect artificial intelligence data from the Internet. Join for free. You can now connect your Solana wallet to Grass
Services are a community for DJs & fans that help you gain full access to exclusive electronic music.
The main target of our service is to show the world new upcoming talents as well as famous producers,
populations of music culture, and promotion of perspective projects. https://0daymusic.org
* Reseller1: Paypal, VISA, Mastercard Apple Pay, Google Pay, American Express, Bitcoin, Paysayfe, Sofort, Giro Pay, Klarna, Neosurf, iDeal, EPS, Bancontact, Wise, Przelewy24, Dotpay, blik, Alipay, WeChat Pay, UnionPay, Skrill, UPI, Paytm, STEAM, zGold, iTunes, Amazon, Revolut, N26, PIX, Venmo.
* Reseller2: AltCoins, Webmoney, Perfect Money.
* Server’s capacity: 418 TB MP3, FLAC, Labels, LIVESETS, Music Videos.
* Support: FTP, FTPS (File Transfer Protocol Secure), SFTP and HTTP, HTTPS.
* Updated on daily: 30GB-100GB, 300-2000 Albums, WEB, Promo, CDM, CDR, CDS, EP, LP, Vinyl…
* More 16 years Of archives.
* Overal server’s speed: 1 Gb/s.
* Easy to use: Most of genres are sorted by days.
* List: https://0daymusic.org/FTPtxt/
* Plan A: 30 EUR – 1 TB – 30 Days
* Plan B: 60 EUR – 3 TB – 90 Days
* Plan C: 100 EUR – 6 TB – 180 Days
* Plan D: 160 EUR – 12 TB – 360 Days
* Plan E: 20 EUR – 200 GB – 30 Days
* Plan F: 40 EUR – 600 GB – 90 Days
* Plan G: 70 EUR – 1.2 TB – 180 Days