Skip to content

Application for streaming heart rate info from pulseoximeter straight to VRChat without using extra phone/web apps using Bluetooth and VRChat OSC

License

Notifications You must be signed in to change notification settings

DangerKiddy/HeartRateMonitorVRC

Repository files navigation

HeartRateMonitorVRC

e1af8ed2bd59eea3e71613963807320a
6c64df81b1fff43bbe6966cb85eb9ed0
(Those are two different gifs, that's why they are not synced)

An application for streaming heart rate data from a pulse oximeter directly to VRChat without the need for phone or web apps, using desktop Bluetooth and VRChat OSC. Alternatively, it can use the helper phone app but still without web apps and completely free.

Requirements

  • Pulseoximeter with BluetoothLE (Low energy) support, such as CooSpo H808S (Tested only with that device)
  • One of down below:
    • Bluetooth adapter for PC/Built-in Bluetooth in motherboard of PC
    • Or a phone with this app and PC connected to the same internet

Connecting via Bluetooth

  1. Open Bluetooth settings
    image

  2. Press "Add Bluetooth or other device"
    image

  3. Select "Bluetooth" and connect your pulseoximeter
    image
    For Windows 11 you must set Advanced bluetooth discovery
    image
    image

  4. Open HeartRateMonitorVRC
    image

  5. Press "Select device", choose your pulseoximeter and wait
    image

  6. Wait until it says "Subscribed to HR notifications" and shows your BPM
    image

Connecting via phone app

  1. Connect your PC and phone to the same internet
  2. Launch the HeartRateMonitorVRC on your PC
  3. Launch HeartRateMonitorVRC on your phone
  4. Turn on your pulseoximeter and press "Scan" button in the phone app
  5. Wait for 10 seconds until it displays all Bluetooth devices nearby
    • If you cannot see your device in the list press scan again until it shows. If it still not appeared then please refer to the issues page and create a new issue
  6. Select your pulseoximeter device and wait until your heart rate appears on PC application
  7. Done

Troubleshooting

Unable to get characteristics / Failed subcribing to HR notifications

Happens if your device is occupied by another device (i.e. connected to another device). If you're reconnecting then simply wait a bit and try again

Heart rate isn't sending anymore when using phone app

This issue happens when your phone blocks the screen/goes in sleep mode. This would be fixed in the future versions, but for now please find a way to keep your phone awake, such as enabling a 10 hour video

Integrating with VRChat

HeartRateMonitor sends OSC messages to VRChat port (9000) using parameters from HRtoVRChat_OSC and vrc-osc-miband-hrm, but also includes some exclusive parameters

Used parameters

Address Type Range Description Is Exclusive
/avatar/parameters/onesHR int 0-9 Ones spot in the Heart Rate reading
/avatar/parameters/tensHR int 0-9 Tens spot in the Heart Rate reading
/avatar/parameters/hundredsHR int 0-9 Hundreds spot in the Heart Rate reading
/avatar/parameters/isHRBeat bool True/False Estimation on when the heart is beating
/avatar/parameters/HRPercent float 0-1 Converted range of HR
/avatar/parameters/FullHRPercent float -1-1 Other converted range of HR
/avatar/parameters/HR int 0-255 Exact HR value
/avatar/parameters/Heartrate2 float 0-1 Converted range of HR
/avatar/parameters/RangePercent float 0-1 Range from lowest to highest calculated heart rate
/avatar/parameters/HeartrateLowest float 0-1 Converted range of Lowest HR for the whole session
/avatar/parameters/HeartrateHighest float 0-1 Converted range of Highest HR for the whole session

Building

To build the project you need to manually include Windows.winmd and System.Runtime.WindowsRuntime.dll in the project, which may be located here:

  • C:\Program Files (x86)\Windows Kits\10\UnionMetadata\10.0.22621.0\Windows.winmd (Also shipped in Release)
  • C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework.NETCore\v4.5\System.Runtime.WindowsRuntime.dll

About

Application for streaming heart rate info from pulseoximeter straight to VRChat without using extra phone/web apps using Bluetooth and VRChat OSC

Topics

Resources

License

Stars

Watchers

Forks

Contributors 2

  •  
  •  

Languages