GithubHelp home page GithubHelp logo

domi2803 / heartwear Goto Github PK

View Code? Open in Web Editor NEW
41.0 1.0 5.0 3.47 MB

WearOS + Tizen app to integrate your heart rate sensor into OBS

License: GNU General Public License v3.0

JavaScript 36.64% HTML 2.21% CSS 4.78% Kotlin 15.15% C# 41.21%
heart-rate obs firebase-console wearos tizen smartwatch

heartwear's Introduction

HeartWear - Add your Heartrate into OBS

Heartwear is an app for wearOS and Tizen Smartwatches that can be used to integrate the heart rate sensor of your watch into your livestreams. The app uses Google Firebase as backend and stream your heart rate to a website with a personalized embed link, which can be integrated into OBS or any compatible streaming software as a Browser Source.

demonstration picture

How it works

  • Download the app on your smartwatch
  • Login with your Google Account on the smartwatch
  • Go to heartwear.web.app and login with the same Google Account
  • Grab the embed link and paste it into a OBS browser source
  • That's it! :)

This repository contains the full source code for the app. You can follow along if you want to deploy HeartWear on your own Firebase backend. If you just want a working version, you can buy the App on the Play Store and support me directly [ much apprechiated :) ]

Deploy it yourself

First, start by creating a firebase account at https://firebase.google.com/. The free plan will propably do. Create a new project on the Firebase console and then follow along with these steps:

Go into the backend folder and run

npm install

create a React build with

npm run-script build

Install the Firebase SDK with

npm i -g firebase-tools

and login to your Firebase account

firebase login

Run:

firebase use --add

and select the project you made on firebase.

Then run:

firebase deploy

Lastly, go into your Firebase console and go into Authentication. Go to Sign-In methods and enable Google Sign In.

And now you should be good to go on the backend side.


Go to your firebase dashboard and create a new Android app. Fill out the form and download the google-services.json file and copy it into /wearOS-app/app (there should be an empty file that indicates where to put the file)

Open the folder in Android Studio. You can edit the activity_main.xml so that it shows your url instead of mine.

Go to Gradle and select Android -> Signing Report and grab the SHA-1 and SHA-256 of the Debug Keystore that will be shown in the console.

If you don't have generated a Keystore before, type keytool -alias "AndroidDebugKey" -genkeypair in the Terminal of your Android Studio and give it a password. The rest of the fields after that don't matter so just press Enter.

Go to your home directory (C:\Users\YOURNAME) and look for a file named .keystore.

Rename .keystore to debug.keystore.

Now copy and paste it to (C:\Users\YOURNAME.android).

Re-run the signReport task to generate a new key for the App.

Go into your firebase console and add the hashes to your Android application. This is necessary so that Sign In with Google works properly.

Now compile the app and you should be ready to go.

Have fun! :)

heartwear's People

Contributors

domi2803 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar

heartwear's Issues

Blaze (pay-as-you-go) plan

Hi, when I try to do firebase deploy. I get a message that this can not be done with the free plan. Did I do something wrong or does this mean I have to activate the Blaze plan to be able to use this app?

! functions: package.json indicates an outdated version of firebase-functions.
Please upgrade using npm install --save firebase-functions@latest in your functions directory.

=== Deploying to 'projectName'...

i deploying database, functions
i database: checking rules syntax...

  • database: rules syntax for database projectName-default-rtdb is valid
    i functions: ensuring required API cloudfunctions.googleapis.com is enabled...
    i functions: ensuring required API cloudbuild.googleapis.com is enabled...
    ! functions: missing required API cloudbuild.googleapis.com. Enabling now...
  • functions: required API cloudfunctions.googleapis.com is enabled

Error: Your project projectName must be on the Blaze (pay-as-you-go) plan to complete this command. Required API cloudbuild.googleapis.com can't be enabled until the upgrade is complete. To upgrade, visit the following URL:

https://console.firebase.google.com/project/projectName/usage/details

Can't Fetch Data.

A few months ago i made a .ps1 script to write my heartrate into the registry, so i could get a custom sensor in hwinfo64.
For some reason my script is gone, i found a screenshot of the old scipt, but that doesn't work either.

Im trying go fetch the .json to access currentHR, but i can't seem to connect to the database.
Has anything been changed in the past months? Dunno when i lost it really.

This is all i got to go by, if i try toi run Invoke.WebRequest i dont get any script data.
Seems like i went directly for the database last time.
https://media.discordapp.net/attachments/519910908387000341/1101046336469598218/image.png?width=625&height=468

Server seem to have changed to s-euw1c-nss-2203.europe-west1.firebasedatabase.app, but changing that doesnt fix it, i'm just getting "Access Denied" :S

Any help is appreciated. I ran this as an service in the background since i wanted the HR in my my RTSS OSD and not OBS.

Edit: Trying this instead! https://github.com/Schnup89/HeartWear-UDP

Tizen 2.3.2?

Any instructions how to build for Tizen version 2.3.2?

[Feature Request] Heart Rate over Time

Great app, I've started using it for my recordings, and after some fiddling it works pretty well.

As I've been playing, I've noticed that there's not really any context for the current reading being shown on screen. I've been playing GTFO, a co-op horror game, and there's definitely some peaks, but not having some historical context (last ~5 readings?) means that when my heart rate spikes, it's just an update.

Adding an option for a graph next to the number could be one way to show some context for what's going on.

From an implementation perspective, it could probably be done on client for the web app side, meaning no updates to either the backend or the watch app to implement it either.

Making a Custom Hwinfo64 Sensor?

I'm trying to read the heartrate from the embedded link, but i aren't able to.
Misc. scraper addons for chrome doesn't work, "Invoke-WebRequest" doesn't seem to run the javescript so i can't log it with an powershell script either..

I want to save it to a txt file, use windows scheduler to look for changes and update an custom hwinfo sensor in regedit, i'd like to have my heartrate in my rtss overlay and aren't streaming with OBS..

[Change Request] Stress measurement

Hi, is it possible to also add the values of the stress measurement? And history look like you created for the HR Rate would be very nice.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.