Skip to content

A Beat Saber Counters+ custom counter that displays your heart rate in game.

License

Notifications You must be signed in to change notification settings

loving2/HRCounter

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

94 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

HRCounter

A Beat Saber Counters+ custom counter that displays your heart rate in game.

Supports BLE HR Monitor, Apple Watch, Fitbit, Galaxy Watch, WearOS and more!

It also supports anything that Pulsoid and HypeRate support!

⚠️DEPRECATION NOTICE⚠️

1. Pulsoid Feed Link is DEPRECATED and will stop working in Feb 2022. Please download the latest version and see below for instructions!

2. Due to HypeRate API changes on Feb 5, 2022, HypeRate will not work on HRCounter version 1.4.1 and below. Please download the latest version!

Requirements

These can be downloaded from BeatMods or using Mod Assistant.

Alternatively, you can also download them from their github repo.

HOW TO USE

  1. Make sure all the required mods are working correctly
  2. Download the latest release and extract the files into Beat Saber/Plugins/
  3. Run the game once
  4. Depend on your devices, follow the instructions below to configure the auto generated config file.
  5. Run the game and enable this counter in Counter+'s counter configuration page

The config file is at Beat Saber/UserData/HRCounter.json

DATA SOURCES

Pulsoid

⚠️ Pulsoid Feed Link is DEPRECATED. Follow below to set up new version config.

  1. Open your pulsoid widgets configuration page and configure your default widget.
  2. Copy the last part of the widget link as shown in this here. pulsoid widget conig screenshot
  3. Paste this in the config file as "PulsoidWidgetID": "ff7936d8-██████████████20086244".
  4. Set the value of DataSource to "Pulsoid".

HypeRate

  1. In the HypeRate app on your phone or watch, there is the session ID, which is also the few hex digits at the end of your overlay link.
  2. Change the value of HypeRateSessionID to yours in the config file.
  3. Set the value of DataSource to "HypeRate".

For example, if your overlay link is https://app.hyperate.io/12ab, then your session ID is 12ab and the config will look like "HypeRateSessionID": "12ab"

Fitbit

  1. Follow the instruction on FitbitHRtoWS and set up your heart rate broadcast.
  2. Change the value of FitbitWebSocket to "ws://YOUR_IP:YOUR_PORT/".
  3. Set the value of DataSource to "FitbitHRtoWS"

For example, "FitbitWebSocket": "ws://localhost:8080/", or "FitbitWebSocket": "ws://192.168.1.100:8080/",

YUR App

  1. Download and start YUR from Steam
  2. Set the value of DataSource to "YUR APP"

HR MONITORS

BLE Compatible HR Monitor

  1. Download Pulsoid on your phone and set up heart rate broadcast.
  2. Follow instruction for Pulsoid above.

Galaxy Watch

  1. Use HeartRateToWeb and this app on your watch.
  2. Follow the instrucrion on their github page to set up heart rate broadcast. Make sure you download the first realease, the csharp one is bugged.
  3. Use from file or from /hr endpoint in the OBS section of HeartRateToWeb instructions.
  4. If you decide to use "from file", then use the path to the hr.txt file generated by HeartRateToWeb as file:///PATH/TO/THE/FILE.
  5. If you decide to use "/hr endpoint", then enter the feedlink as http://YOUR_IP:YOUR_PORT/hr

For example: "FeedLink": "file:///D:/example/folder/hr.txt", and "FeedLink": "http://192.168.1.100:6547/hr",

Apple Watch

  1. Download HypeRate on your iPhone and Apple Watch.
  2. Follow instructions for HypeRate above

Note: You need to have testflight since HypeRate is still in beta.

Special thanks to iPixelGalaxy for testing!

WearOS Smart Watch

There are 2 options.

  1. Use Heart for Bluetooth on your watch and use it as a BLE heart rate monitor. Then download Pulsoid on your phone and follow instructions for Pulsoid above
  2. Use HypeRate which you can download it on the play store and follow instructions for HypeRate above

Depending on your watch, monitoring quality may not be as good as a dedicated heart rate monitor.

Others

When this mod is requesting hr data, it expects a string containing one of these:

  • A json contains key bpm with int type value and an optional key measured_at with string type value.
  • Only numerical digits. (Regex ^\d+$)

It can be in a file or can be requested from a link. Then set DataSource to "WebRequest" and the link.

More data sources and devices are planned to be supported. See below.

Open an issue if there is a device or data source you want me to support!

Settings

Most options can be changed in game.

Here is a table for all the setting options if you want to edit config file instead.

Field Type Default Description
LogHR bool false Whether the received HR data will be logged
DataSource string "WebRequest" The data source you want to use to get hr data
HypeRateSessionID string "-1" Session ID for HypeRate, it is also the the few hex digits at the end of your overlay link.
PulsoidWidgetID string "NotSet" Widget ID for HypeRate, it is also the last part of your widget link.
FitbitWebSocket string "ws://localhost:8080/" WebSocket Link for FitbitHRtoWS
FeedLink string "NotSet" Your pulsoid feed link
Colorize bool true Whether the hr value will be colorized by the following 4 detail settings
HideDuringReplay bool true Hide this counter while in a replay
HRLow int 120 The lower bound heart rate for when the color gredient will start
HRHigh int 180 The upper bound heart rate for when the color gredient will end
LowColor string "#00FF00" (Green) The RGB color in hex that where your hr is not higher than HRLow. This is also the starting point of color gredient.
HighColor string "#FF0000" (Red) The RGB color in hex that where your hr is higher than HRHigh. This is also the end point of color gredient.
MidColor string "#FFFF00" (Yellow) The RGB color in hex which is the middle point of color gredient.
PauseHR int 200 The heart rate that game pause will be triggered
AutoPause bool false Whether the mod will pause the game if heart rate reaches PauseHR

Data Sources To Be Supported

Open an issue if there is a device or data source you want me to support!

Notes

  • Remember to exit the game first before editing config files.
  • Please open an issue if you have problem using this or found a bug.
  • The beautiful lightshow map in the screenshot is !bsr 17726

About

A Beat Saber Counters+ custom counter that displays your heart rate in game.

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • C# 100.0%