2021-10-14 16:14:10 +00:00
|
|
|
# Health Tracking
|
|
|
|
|
2023-01-03 07:15:37 +00:00
|
|
|
Logs health data to a file in a defined interval, and provides an app to view it
|
2021-10-14 16:14:10 +00:00
|
|
|
|
|
|
|
## Usage
|
|
|
|
|
2024-02-15 20:20:33 +00:00
|
|
|
Once installed, health data is logged automatically. Entries are stored with a 10 minute interval.
|
2021-10-14 16:14:10 +00:00
|
|
|
|
|
|
|
To view data, run the `Health` app from your watch.
|
|
|
|
|
|
|
|
## Features
|
|
|
|
|
|
|
|
Stores:
|
|
|
|
|
2021-10-29 19:50:51 +00:00
|
|
|
* Heart rate
|
2023-12-10 08:18:21 +00:00
|
|
|
* Step count (can calculate distance if myprofile is installed and stride length is set)
|
2021-10-14 16:14:10 +00:00
|
|
|
* Movement
|
|
|
|
|
2021-10-29 19:50:51 +00:00
|
|
|
## Settings
|
|
|
|
|
|
|
|
* **Heart Rt** - Whether to monitor heart rate or not
|
|
|
|
* **Off** - Don't turn HRM on, but record heart rate if the HRM was turned on by another app/widget
|
2023-01-03 07:15:37 +00:00
|
|
|
* **3 Min** - Turn HRM on every 3 minutes (for each heath entry) and turn it off after 1 minute, or when a good reading is found
|
2021-10-29 19:50:51 +00:00
|
|
|
* **10 Min** - Turn HRM on every 10 minutes (for each heath entry) and turn it off after 2 minutes, or when a good reading is found
|
|
|
|
* **Always** - Keep HRM on all the time (more accurate recording, but reduces battery life to ~36 hours)
|
2023-01-03 11:52:23 +00:00
|
|
|
* **Daily Step Goal** - Default 10000, daily step goal for pedometer apps to use and for the step goal notification
|
|
|
|
* **Step Goal Notification** - True if you want a notification when the daily step goal is reached
|
2021-10-29 19:50:51 +00:00
|
|
|
|
|
|
|
|
2021-10-14 16:14:10 +00:00
|
|
|
## Technical Info
|
|
|
|
|
|
|
|
Once installed, the `health.boot.js` hooks onto the `Bangle.health` event and
|
|
|
|
writes data to a binary file (one per month).
|
|
|
|
|
|
|
|
A library (that can be used with `require("health").readXYZ` can then be used
|
|
|
|
to grab historical health info.
|
|
|
|
|
2022-02-02 19:57:44 +00:00
|
|
|
`boot.js` and `lib.js` include some constants that don't get inlined by the simple
|
|
|
|
minifier used in the App Loader, so we use the closure compiler to pre-minify them.
|
|
|
|
The easiest way to use it is to install `https://github.com/espruino/EspruinoDocs`
|
|
|
|
and run `EspruinoDocs/bin/minify.js lib.js lib.min.js`
|
|
|
|
|
2024-02-15 20:20:33 +00:00
|
|
|
HRM data is stored as a number representing the best/average value from a 10 minute period.
|
|
|
|
|
2021-10-14 16:14:10 +00:00
|
|
|
## TODO
|
|
|
|
|
|
|
|
* `interface` page for desktop to allow data to be viewed and exported in common formats
|
|
|
|
* More features in app:
|
|
|
|
* Step counting goal (ensure pedometers use this)
|
|
|
|
* Calendar view showing steps per day
|
|
|
|
* Yearly view
|
|
|
|
* Heart rate 'zone' graph
|
|
|
|
* .. other
|
2023-01-03 14:18:45 +00:00
|
|
|
|
|
|
|
## License
|
|
|
|
|
|
|
|
The graphs on the web interface use Chart.js, licensed under MIT License.
|