Skip to content

Starts a local HTTP server and WebSocket server used for sending Bluetooth heartrate data across devices on your local network.

License

Notifications You must be signed in to change notification settings

zfox23/bluetooth-heartrate-over-http

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

bluetooth-heartrate-over-http

Starts a local HTTP server and WebSocket server used for sending Bluetooth heartrate data across devices on your local network.

I developed this because:

  1. I wanted to learn more about WebSockets.
  2. I wanted to write some code to allow me to show my heart rate data in an OBS scene without using something that already existed.
  3. I don't have a Bluetooth adapter for my PC, so I needed a way to get heart rate data from my HRM -> my phone -> my PC -> OBS.

Here's what the output of this project looks like in OBS:

I'm wearing a Basis Peak in this screencap. Any Bluetooth heartrate monitor will work. However, certain Bluetooth Smart heartrate monitors, such as the Wahoo Tickr Fit, will probably not work.

Prerequisites

  1. Google Chrome and Microsoft Edge are the only two browsers that support the necessary Web APIs that allow Bluetooth heartrate monitors to communicate with the browser, so make sure you're using one of those browsers.
  2. Ensure you have NodeJS installed.
    • If you are asked if you want to install some "build tools", make sure you say yes to install them.
    • We're using NodeJS v14.15.1.
  3. Clone this repository using git clone <repo URL>.
  4. Open a PowerShell/Command Prompt/Terminal window (depending on your OS) and cd into the directory containing this repository.
  5. Run npm install to download and install the NodeJS prerequisites for both the client component of this project.
  6. Run cd server, then npm install to download and install the NodeJS prerequisites for the server component of this project.

Running Locally

  1. Open a PowerShell/Command Prompt/Terminal window (depending on your OS) and cd into the directory containing this repository.
  2. Type npm run start from the directory containing this repository,

This will start up a local webpack-dev-server which will serve the "Bluetooth Heartrate Over HTTP" site to you on port 80.

Then, open Chrome or Edge and type your computer's internal IP address into your address bar, then press Enter.

Follow the instructions on the page to continue.

Once a Bluetooth heartrate monitor is transmitting data to the WebSocket server via the browser, you can navigate a different browser on the same network to that same internal IP address and see the live heartrate data. You can even point an OBS Web source at that IP address and you'll get live heartrate data within OBS!

About

Starts a local HTTP server and WebSocket server used for sending Bluetooth heartrate data across devices on your local network.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published