Projects
Mi Band and openHAB
The watch on my wrist notices I’ve fallen asleep, and the smart home switches off the lamp, TV and night light.
- Mi Band 3 / Amazfit: watch events go to the phone.
- Tasker: sends an HTTP call to the openHAB server.
- openHAB rule: switches devices off, and can pass on heart rate too.
How it works
- The watch is paired with the Mi Fit / Zepp app.
- Notify & Fitness for Mi Band forwards watch events (a button press, "fell asleep") as Android intents.
- Tasker catches them with an Intent Received trigger and sends an HTTP GET to the openHAB server, switching a dedicated item ON.
- An openHAB rule turns off the desk lamp, TV and bedside light, then the item resets to OFF as a momentary trigger.
The same approach can pass heart rate or step data (via %value) into an openHAB sitemap.