This is a super rudimentary adapter to connect a ProtoFlux websocket client (or any websocket client really) to a heartbeat tracking wristband I quickly whipped together to help a user on Resonite.
It's based on https://vard88508.github.io/vrc-osc-miband-hrm/, which implements a browser interface that connects to the wristband via Bluetooth and then connects to the vrc-osc-hrm.exe via websocket, which forwards the messages as OSC to VRChat. This script basically replaces that executable, so the website talks directly to the relay script, which will forward all messages it receives to every connected websocket client.
- Install required package with pip (
pip install websockets
) - Launch this script (
python -m ./server.py
) - Open https://vard88508.github.io/vrc-osc-miband-hrm/html/ in your browser, it should automatically connect to the relay (on
ws://localhost:3228
) - Connect your heartrate monitor (Follow instructions https://vard88508.github.io/vrc-osc-miband-hrm/#usage, just launch this script instead of the vrc-osc-hrm.exe)
- Connect a compatible websocket client (for example implemented in ProtoFlux for Resonite) to
ws://localhost:3229
That's it! The websocket client should now receive every message sent by the heartbeat tracking wristband. If you filter out everything that's not an integer, you now have the BPM readings to do whatever you want with!