Skip to content

CoreTemp: refactor BLE runtime and added ANT+ HRM configurator - #4255

Merged
thyttan merged 7 commits into
espruino:masterfrom
zyf0717:split/coretemp-ble-hrm-configurator
Sep 23, 2026
Merged

thyttan merged 7 commits into
espruino:masterfrom
zyf0717:split/coretemp-ble-hrm-configurator

Conversation

@zyf0717

@zyf0717 zyf0717 commented Jun 19, 2026 •

Copy link
Copy Markdown
Contributor

Summary

  • Rework CoreTemp BLE lifecycle handling to support explicit pair/disconnect, reconnect backoff, cache rebuilds, pause/resume ownership, and status events.

  • Add CORE Control Point support for ANT+ HRM scan, pair, status, and clear workflows.

  • Add App Loader custom settings for background connection, widget visibility, debug logging, custom-profile mode, scan window, and default ANT+ HRM ID.

  • Add CoreTemp regression and emulator app-test coverage for BLE lifecycle, Control Point, HRM workflows, settings, and package manifest behavior.

  • Package coretemp.hrm.json, add deployable runtime modules, and bump CoreTemp to 0.11.

  • Preserve on-demand connections with separate Enable and Always On settings, and migrate legacy pairing and HRM settings.

  • Default Custom CORE only to enabled while preserving explicit saved settings; show unavailable skin temperature as n/a and indicate connected Health Thermometer fallback with an orange widget.

Validation

  • npm test
  • node apps/coretemp/tests/run.js
  • Verified branch contains only CoreTemp changes.
  • Tested on multiple Bangle.js 2 devices, multiple CORE and HEATSENSE devices, and PowerLabs Chest HRM, Polar H10, and Verity Sense ANT+ HRMs.
screenshot (1)

@zyf0717 zyf0717 changed the title CoreTemp: add BLE runtime and ANT+ HRM configurator CoreTemp: refactor BLE runtime and added ANT+ HRM configurator Jun 19, 2026
@zyf0717
zyf0717 marked this pull request as ready for review June 19, 2026 07:59
@zyf0717

zyf0717 commented Jun 22, 2026

Copy link
Copy Markdown
Contributor Author

@ihewitt looping you in as the original CoreTemp author. This PR substantially refactors CoreTemp’s BLE lifecycle and adds ANT+ HRM configuration/control-point support. I’d appreciate your review, especially around whether the new runtime ownership model, reconnect/cache behavior, and settings UX still fit the app’s intended design.

For detailed docs please see README.md.

@zyf0717
zyf0717 force-pushed the split/coretemp-ble-hrm-configurator branch from d77a674 to 2124ae7 Compare June 22, 2026 07:21
@ihewitt

ihewitt commented Jun 23, 2026

Copy link
Copy Markdown
Contributor

@ihewitt looping you in as the original CoreTemp author.

Apologies haven't had time to look through yet! And I didn't have my "authenticator" to hand to login to GitHub!!! 🤦‍♂️ I'll try to find the time tonight. 👍

@zyf0717

zyf0717 commented Jun 23, 2026

Copy link
Copy Markdown
Contributor Author

@ihewitt looping you in as the original CoreTemp author.

Apologies haven't had time to look through yet! And I didn't have my "authenticator" to hand to login to GitHub!!! 🤦‍♂️ I'll try to find the time tonight. 👍

No worries, and thanks for taking a look when you can.

I made these changes for a deployment use case on my side and thought they might be useful upstream. Since this significantly changes the CoreTemp runtime/connection model, I’d value your thoughts on whether this fits as an update to the existing app or should be split out.

Happy to adjust or split the PR as needed!

@zyf0717

zyf0717 commented Jul 10, 2026

Copy link
Copy Markdown
Contributor Author

Hi @ihewitt, just a gentle follow-up when you have a moment.

I now have downstream HeatSuite changes that depend on this CoreTemp work, and I’d ideally like to formalise the integration rather than end up with a fragmented deployment setup.

I’m mainly looking for a high-level steer on whether this direction is acceptable for the existing CoreTemp app, or whether you’d prefer it split out separately. Happy to make any changes needed from there — thanks!

@thyttan

thyttan commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

@zyf0717 @ihewitt where does this stand now? 🙂

@zyf0717

zyf0717 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

Hi @thyttan,

Thanks for checking in. This is still maintained from my side rather than actively developed — my organisation is using versions based on this work, so I’m still supporting.

Given BangleApps’ preference to extend existing apps rather than create near-duplicates, I’d prefer to continue maintaining CoreTemp in place. This PR largely preserves backward compatibility, with a couple of small migration issues I can address before merge if full backward compatibility is necessary.

Since @ihewitt appears to be inactive here, would it make sense for me to take on ongoing maintenance and be added alongside him in the app metadata?

@thyttan

thyttan commented Sep 17, 2026

Copy link
Copy Markdown
Collaborator

That all sounds good to me!

I don't know the app well. But keeping it backwards compatible for now is probably good 🙂‍↕️👍

For a reference on a way to migrate settings:

@zyf0717

zyf0717 commented Sep 17, 2026

Copy link
Copy Markdown
Contributor Author

@thyttan Thanks! I’ve pushed a follow-up using the RAM migration pattern, with backward-compatibility fixes and regression coverage. CI is passing, and I’ve added myself alongside @ihewitt in the metadata.

@zyf0717
zyf0717 force-pushed the split/coretemp-ble-hrm-configurator branch from 624f3f9 to 01ca84a Compare September 23, 2026 05:18
@thyttan

thyttan commented Sep 23, 2026

Copy link
Copy Markdown
Collaborator

I thought I already merged this. But obviously not. Do you want me to merge now?

@zyf0717

zyf0717 commented Sep 23, 2026

Copy link
Copy Markdown
Contributor Author

@thyttan tested and fixed a few bugs, ok to merge! Thanks 🙏

@thyttan
thyttan merged commit b1ea9de into espruino:master Sep 23, 2026
2 checks passed
@zyf0717
zyf0717 deleted the split/coretemp-ble-hrm-configurator branch September 23, 2026 12:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants