This fork fixes an issue where an invalid heart rate (between 0 and -10) can sometimes get written by watches whenever the sensor couldn't get the current heart rate, which looks weird and happens periodically even if the user is wearing the watch correctly, it would be better to keep the last known valid heart rate (even if it may be outdated) rather than display an invalid heart rate.
Unfortunately doesn't fix the root cause, but only requires modifications on the PC side rather than on the watch, which is a lot more difficult.
Only a Python version will be provided, I don't personally see much of a point for the C# version, as this software is really lightweight and barebones anyway.
If you have python3+ installed you can launch the program in a Powershell by typing :
PS > C:\Users\username\Downloads\heartbeat>python main.py [port]
You can start with :
user@localhost~/Downloads/heartbeat$ python3 main.py [port]
There is multiple way to use the heartbeat on OBS, you can choose to read directly from the file, from the heartbeat endpoint or the obs endpoint.
On OBS, you can add a text source, be sure to select "read from a file", and select the hr.txt file in the same directory of your
executable. OBS will take care of refreshing the content automaticly.
Only on Windows as far as I know, you can add a Browser source on your OBS, and enter the following
address : http://localhost:6547/hr this will output the heartrate at this time.
This is NOT refreshed every time.
This is why this project is made, OBS. If you have some knowledge in HTML / CSS and know where to copy/paste code, then you will be able to make your own template.
The /obs endpoint output a HTML page with support of CSS and JS.
jQuery will be used to refresh the heartrate in real time.
Add a browser source with http://localost:6547/obs and OBS will start to show the webpage you created.