Note: I no longer stream to Twitch or own a Fitbit. You're welcome to try using it or to modify the code yourself, but I am unable to offer support if you get stuck.
I wanted a way to display my heart rate live on my Twitch stream using OBS. There was not a current method for doing that so Heart of Frogg was born!
- Download the heart-of-frogg repository to your machine
- The download contains the server and the HTML that will be displayed in OBS
- The server is compiled for Windows currently but is written in the Go programming language and can easily be compiled for other operating systems if needed
- Unzip the download
- Run the local server by double-clicking
heart-of-frogg.exe
- Install the "Heart of Frogg" app on your Fitbit
- For the Versa 3 and the Sense, use the phone paired to your Fitbit to tap this link and install the watch app when prompted
- For older devices, use the phone paired to your Fitbit to tap this link and install the watch app when prompted
- Input your computer's internal IP address (as shown by
heart-of-frogg.exe
on server start) and theheart-of-frogg.exe
server's port ("8080" by default) into the "Heart of Frogg" Fitbit app settings on your phone- NOTE: The port you enter in the Fitbit settings and the port in
config.toml
MUST match.
- NOTE: The port you enter in the Fitbit settings and the port in
- Start the "Heart of Frogg" watch app on your Fitbit device
- Create a web source in OBS that points to
http://localhost:8080/ui/index.html
- Play a game that gets your heart rate pumping!
If your watch isn't sending data to the server, check the following:
- Verify that the port you enter in the Fitbit settings and the port in
config.toml
are the same; they MUST match - Verify that the IP address you enter in the Fitbit settings is the correct IP of the computer that's running
heart-of-frogg.exe
- The IP addresses that
heart-of-frogg.exe
automatically displays is just a best guess of what your IP is; try manually finding your IP address (Heart of Frogg has only been tested with IPv4 IP addresses)
- The IP addresses that
- Restart the
heart-of-frogg.exe
server - Try running
heart-of-frogg.exe
as Administrator (right click onheart-of-frogg.exe
and select "Run as administrator")
The heart-of-frogg.exe
server defaults to using port 8080. If you already use port 8080 for something else, you'll need to change the server port. To do this, edit config.toml
to contain the port number you want to use. You'll need to restart the server and then update your Fitbit settings and OBS web source to use the new port number.
/ui/index.html
is what's shown in OBS. If you want to customize what it looks like, go ahead! Tweak to your liking and then refresh your OBS source to see your changes. See the "How It Works" section below for details.
- The
heart-of-frogg.exe
server listens for HTTP POST calls athttp://localhost:8080/heart/:rate
- The Fitbit app checks your heart rate and then makes an HTTP POST call with the heart rate value to the server (e.g.
http://192.168.1.101:8080/heart/86
) - OBS loads
/ui/index.html
as a source which uses JavaScript to periodically do an HTTP GET request tohttp://localhost:8080/heart
to retrieve your current heart rate as reported to the server by your watch