BangleApps/apps/health
Anton 2e4cb8eb11 Fix no-unused-vars in existing apps 2024-03-04 21:34:50 +01:00
..
ChangeLog health: move strideLength to new app myprofile 2023-12-10 09:18:21 +01:00
README.md health: add hrm info to readme 2024-02-15 21:20:33 +01:00
app-icon.js new 'health' app for 2v11, improved bangle2 launcher 2021-10-14 17:14:10 +01:00
app.js health: include step data for today 2023-12-11 07:32:58 +01:00
app.png new 'health' app for 2v11, improved bangle2 launcher 2021-10-14 17:14:10 +01:00
boot.js Correct calculation of daily summary for movement 2023-08-01 16:14:55 -05:00
boot.min.js health 0.25: lib.read* methods now return correctly scaled movement 2023-08-04 09:36:18 +01:00
chart.min.js Add bar graphs 2023-01-04 08:18:26 +01:00
interface.html health/interface: replace moving average with average 2023-11-20 07:47:53 +01:00
lib.js Fix no-unused-vars in existing apps 2024-03-04 21:34:50 +01:00
lib.min.js fix minified lib after update 2023-08-09 15:16:11 +01:00
metadata.json health: calculate distance from steps 2023-12-03 20:45:28 +01:00
settings.js Update apps to remove default boolean formatters 2024-01-08 21:53:11 +00:00

README.md

Health Tracking

Logs health data to a file in a defined interval, and provides an app to view it

Usage

Once installed, health data is logged automatically. Entries are stored with a 10 minute interval.

To view data, run the Health app from your watch.

Features

Stores:

  • Heart rate
  • Step count (can calculate distance if myprofile is installed and stride length is set)
  • Movement

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
    • 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
    • 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)
  • 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

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.

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

HRM data is stored as a number representing the best/average value from a 10 minute period.

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

License

The graphs on the web interface use Chart.js, licensed under MIT License.