Skip to content

A custom Health Data Server written in Node.js to export your Heart Rate (and other stuff) live into a textfile, discord webhook, your webpage etc....

License

Notifications You must be signed in to change notification settings

AlexInABox/custom-hds

Repository files navigation

Contributors Forks Stargazers Issues MIT License


Logo

OUTDATED README

custom-hds

custom-hds - built for Health-Data-Server
Report Bug · Request Feature

Table of Contents
  1. About The Project
  2. Getting Started
  3. Usage
  4. Roadmap
  5. Contributing
  6. License
  7. Contact
  8. Acknowledgments

About The Project

(back to top)

Built With

  • Express

(back to top)

Getting Started

Funny project. Easy to use!

Prerequisites

This project requires NodeJS (version 8 or later) and NPM. Node and NPM are really easy to install. To make sure you have them available on your machine, try running the following command.

$ npm -v && node -v
6.4.1
v8.16.0

(your output should look something like this if and only if you have those tools installed. if not, consider installing them! duh)

Installation

  1. Clone the repo
    git clone https://github.com/alexinabox/custom-hds
  2. Install NPM packages
    npm install
  3. Edit the config.js file! (dont copy the following as a whole since comments dont work in json syntax)
{
    "userName": "larry", <-- the discord user to mention in the webhook
    "port": 3476, <-- port goes here (left as default in most cases)
    "timezone": "Europe/Amsterdam",  <-- your timezone goes here
    "data_save_type": "json",  <-- can be "json", "txt" or "both"
    "discordAppID": "1033806008008581240",  <---- leave as default for fancy heartrate icons (or create your own application at https://https://discord.com/developers)
    "webhookURL": "https://discord.com/api/webhooks/<id>/<secret>",  <--- add your discord webhook like this
    "heartRateMessageID": "<id>",  <---- message ID of the heartRate message
    "oxygenSaturationMessageID": "<id>",  <---- message ID of the oxygen message
    "pedoMeterMessageID": "<id>",  <---- message ID of the steps message
    "speedMessageID": "<id>",  <---- message ID of the speed message
    "focusStatusMessageID": "", <---- message ID of the focus message (WIP)
    "forwardingDestination": "", <--- the IP adress of any other custom-hds server you want to forward data to (dont forget the port!)
    "secretPass": "secretPass"  <--- a secret pass like this (use case: http://example.com/secretPass) (optional)
  }
  1. open the desired port in your firewall (optional)

  2. start the server:

    node index.js
  3. in the watch: click on advanced ip entry and add the ip your custom-hds server is running on

  1. profit

(back to top)

Daemonize

The daemonization of this application ensures that it always runs in the background and also starts itself on boot!


!!! WARNING !!! Before you deamonize this application, make sure to run custom-hds at least once on your machine using the commands above!


Create the windows backround service:

cd misc/
node createWinSvc.js

Remove the windows backround service:

cd misc/
node removeWinSvc.js

(back to top)

Usage

Like you can have your health data inside discord webhooks now. wooho.

For more examples, please refer to the non existent Documentation

(back to top)

Roadmap

  • dynamic icon showing the heartrate as a neat graphic (80% done)
  • endpoint for iPhone Focus status
  • turing machine
    • my teacher would love it!

See the open issues for a full list of proposed features (and known issues).

(back to top)

Contributing

Bla Bla Bla learning bla bla bla open-source bla bla bla greatly appreciated.

If you have a suggestion that would make this better, please fork the repo and create a pull request. You can also simply open an issue with the tag "enhancement". Don't forget to give the project a star! Thanks again!

  1. Fork the Project
  2. Create your Feature Branch (git checkout -b feature/AmazingFeature)
  3. Commit your Changes (git commit -m 'Add some AmazingFeature')
  4. Push to the Branch (git push origin feature/AmazingFeature)
  5. Open a Pull Request (write something neat so i know whats goin on)

(back to top)

License

Distributed under the GNU General Public License v3.0 License. See LICENSE.txt for more information.

(back to top)

Contact

AlexInABox - @wilder_Alex__ - main@alexinabox.de

Project Link: https://github.com/alexinabox/custom-hds

Website: https://alexinabox.de

Minor-Implementation-Example: https://alexinabox.de/me

(back to top)

Acknowledgments

  • big thanks to Rexios80 for creating HDS in the first place.

(back to top)

About

A custom Health Data Server written in Node.js to export your Heart Rate (and other stuff) live into a textfile, discord webhook, your webpage etc....

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published