@onasafari/hrm

0.0.1 • Public • Published

HRM

OBS + Web App

Heart Rate Monitor Client and Server for Interactive Virtual Fitness

HRM was built for my mom, myself, and her trainer, Tim, to continue personal workouts during the pandemic. HRM provides a web client + server solution to see real-time heart rate data from anywhere with a bluetooth, supported browser, and internet connection. TODO: add more security

How does it work?

  • Web bluetooth is an unstable, but really cool recent development that makes it easy to write websites that can send and receive bluetooth data. Standardized Bluetooth 4.0/Ant+ heart rate monitors are relatively cheap 25-60$ and you can start tracking realtime heartrate data with a supported chrome browser. Essentially, this software builds off of:
  1. Web bluetooth heart rate monitor demo
  2. websocket.io chat app. Instead of chatting with words, you're chatting with your heartrate data.
  3. Heart rate zones and colors use the simple max heart rate = 220-AGE and reports percentages of maximum heart rate.
  4. Tabata Interval fitness timer
  5. Awesome web server stuff (nginx, pm2, npm, jquery, bootstrap, letsencrypt, ....)

Running

npm install
npm start
#1- go to localhost:3000 to see aggregate heart rate data and use a tabata timer
#2- go to localhost:3000/hrm to log individual bluetooth heartrates
#3- go to localhost:3000/hrm_mock to send fake heartrate data 
Starting tabata server and client

After runing npm start, open browser to localhost:3000. Click the button to start logging a client heart rate. Open an additional browser to localhost:3000 to view the client heartrate data in realtime.

HRM bringup

Starting tabata server and client

Test multiple clients using the mock client utility localhost:3000/hrm_mock or connect multiple bluetooth interfaces if you have them.

HRM Mock

Using the tabata/fitness timer

Currently has a 5 second countdown and then will loop through work and rest periods indefinitely. Makes beeping noises.

HRM Tabata

For more detailed information:

Thanks

I would love to work with other people on improving this app. Ideally more personal trainers can continue providing guidance for improved fitness during the pandemic. I am releasing everything under an Apache 2.0 license.

Shout out to:

  • tim the trainer
  • My mom!
  • dogebot for web UI information
  • ilia for helping me with web server stuff

I tried a few different things before I got to this solution. Also, I have some more details here that I wrote on an exciting friday night during the pandemic: origins story.

Package Sidebar

Install

npm i @onasafari/hrm

Weekly Downloads

0

Version

0.0.1

License

SEE LICENSE IN license.md

Unpacked Size

87.1 MB

Total Files

46

Last publish

Collaborators

  • arii