Skip to content

Heartrate web monitor for OBS and similar using Mi Band

Notifications You must be signed in to change notification settings

vasll/heartratemon-miband7

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

heartratemon-miband7

Getting real-time heartrate data from a Mi Band 7 in a nice way is impossible without a rooted phone unless you can get the auth API key from xiaomi or whatever auth your Mi Band manufacturer uses somehow.

With this method you install an app that shows your Mi Band 7 heartrate in a permanent notification, and you use Tasker along with a plugin to read the real-time heartrate from that notification, to then send it to an HTTP endpoint (the one in ./main.py).

This project is for the Mi Band 7 but the webapp can be taken and modified to suit any data source, with the Notify for Mi Band app you can use any Mi Band model that's supported.

Phone setup

Apps

  • Notify for Mi Band: Connects to the Mi Band 7, displays the BPM data in real time a permanent notification
    • Set continuous heart rate monitoring mode
  • AutoNotification: Tasker plugin to read notification data
    • When adding the AutoNotificationIntercept profile on tasker, the config will be done in this app, make it so it tracks the Notify for Mi Band app
  • Tasker: Automation tool used to send the BPM data to the HTTP endpoint
    1. Create AutoNotificationIntercept profile (You need the AutoNotification plugin listed above)
    2. Add HTTP Request Action to POST on http://<machine_ip>:8081
    3. In Body put %antexts()

For all apps remember to give the required permissions

PC setup

  1. cd web && npm ci - Install node modules
  2. pip install -r requirements.txt - Install python deps

Credits

  • Web graph modified from here