Skip to content

Actively maintained Branch: Lots of bugfixes, huge application improvements #164

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 234 commits into
base: v1beta
Choose a base branch
from

Conversation

JaapvanEkris
Copy link
Contributor

@JaapvanEkris JaapvanEkris commented Mar 11, 2024

New functionality:

  • Introduction of the session manager, which allows setting up workout plans (intervals and splits). These can be set via the PM5 interface (ErgZone and EXR) and MQTT
  • Added support for ANT+ rowing metrics broadcast
  • Improved Bluetooth Low Energy interface:
    • Major upgrade of our PM5 interface, bringing it much closer to the official PM5 interface specification: apps like ErgZone, EXR and many others now work in PM5 mode in most scenarios (see the known limitations section for more info). This allows you to set up a workout in the session manager with ease, have force curves presented and record the data (adresses this request).
  • Much better integrations:
    • Added RowsAndAll.com and intervals.icu integration for workout reporting (i.e. automatic uploading of a result).
    • Added a MQTT peripheral. This reports metrics live to MQTT brokers and control home automation, etc. (see this discussion, this discussion and this request). The MQTT listener you to push workout plans to OpenRowingMonitor from home automation systems (see the integrations page for more information).
    • Added support for creating Garmin Fit-files, including reporting of distance per stroke, workout plan, intervals, splits and pauses. Files work with Garmin, Strava and intervals.icu
  • Improved user interface
    • Allow the user to change the GUI layout and metrics, including displaying the force curve
    • Allow user to turn on or off ANT+ and BLE functionality and dynamically switch between ANT+ and BLE HR monitors from the GUI

Added some bugfixes/robustness/accuracy improvements:

  • Drastic improvement of the architecture to make it more robust and more extensible
  • Major stack upgrades: Added support for the newest version of Raspberry Pi OS (Bookworm), moved from Node.js v16 (EOL) to Node.js v22 (current), removed a lot of unneeded npm packages and upgraded npm packages where possible, fixing a lot of security vulnerabilities.
  • Rewrite of the entire bluetooth stack which fixes the Bluetooth issues where Bluetooth will not work after a reboot and crashes after a setting change (see the related issue for more info)
  • Major performance improvements:
    • Improved the accuracy, responsiveness and efficiency of both the Linear and Quadratic the Theil-Sen algorithms. For larger 'flankLength' machines (12+ datapoints), this improved algorithm will also result in 50% reduction in CPU use, while increasing the responsiveness and accuracy of the forcecurve and powercurve. For smaller 'flankLength' machines it will improve less, but still improve.
    • We moved from Chromium to Firefox for the webkiosk service as it greatly reduces the CPU load, practically freeing up a complete CPU core.
  • All linear calculations (stroke detection, Drag calculation, recovery slope calculation) now use the Linear Theil-Sen algorithm, making this calculation more robust against outliers and stroke detection errors
  • Added a configuration sanity check which logs obvious errors and (if possible) repairs settings, after several users messed up their config and got completely stuck.
  • The configuration sanity check also provides an automated upgrade path for 0.8.4 users to 0.9.6, as all the newly added configuration items between these two versions are automatically detected, logged and repaired.
  • Added restart limits to prevent infinite boot loops of the app crashing and rebooting when there is a config error
  • Fixed the GPIO tick rollover, which led to a minor hickup in data in rows over 30 minutes
  • Made Flywheel.js more robust against faulty GPIO data
  • Improved the structure of the peripherals to allow a more robust BLE and ANT use
  • Fixed a bug in pause behaviour for magnetic rowers causing them to sttop permanently (fixes this bug).
  • Fixed a bug in the metrics presentation, which caused some metrics presented/recorded to be averaged too much.
  • Fixed a bug in restart behaviour that made the recorders crash (fixes this bug).
  • Upgraded ESLint and its configuration, our code is inspected beyond the use of spaces.
  • Introducing JSDoc in our code, to make our code easier to understand (see also).

Known issues

  • Our PM5 interface still has some minor limitations:
    • ErgZone and similar apps also can set a 'Calories' based workout. This interval type is still on our backlog, so it currently isn't supported yet. The PM5 interface will fail silently and will not send an error message on this.
    • ErgData will not work well with our PM5 interface: sometimes it can program OpenRowingMonitor, but you will not be able to save your workout, as we can't create the cryptographic hash to upload the workout results. This also causes a deadlock that hangs communication at both ends (kill the ErgData app to resolve this). As ErgData is propriatary to Concept2, we have decided against putting in any effort to resolve this (see issue 117).
  • Some Garmin watches have issues with our 'Cycling Power' and 'Cycling Speed and Cadence' Bluetooth profiles as a result of a change on Garmin's side in handling unencrypted Bluetooth commmunication. This affects all current and past versions of OpenRowingMonitor, and might be caused by Garmin (see issue 125).

Fixed a bug in the tick rollover (which seems to happen every 60 minutes of processtime).
Bugfix: Fixed a bug where a new year or month would crash the workoutrecorder due to a missing data directory

Several improvements:
* Added possibility of only creating RowingData file
* Improved HRR data when restarting a workout
A bit more defensive programming as one bad (NaN) measurement of CurrentDt will kill all metrics for the entire session.
To add insult to injury: by a typo in the error logging function, the app would crash if there was a recoverable error
Addittion of the interval type, as a preperation of the more complex workout schedules
Replaced the horrible ested If...then....else with a much more readable case statement to implement the Concept 2 table
Added a lot of sanity checks to the loading of the config.
Improvement of code quality
Fixed Lint errors
Removed sanity checks in RowingStatistics, as the configmanager centralises the parameter check
Removed sanity checks in RowingStatistics, as the configmanager centralises the parameter check
Added the ability to automatically fix forgotten or implausible settings when possible.
Added logic for more complex workouts: RowingStatistics will handle this completely independently
Update to facilitate more complex workouts. RowingStatistics will now manage the intervals completely independently and alert server.js only when the session has ended.
Added Intervals.icu to the list of compatible users of tcx files.
Updates to fix review comments
Added workout management to the role of RowingStatistics
Fixed Line error
Checked that the sanity check would fix all mew variables, allowing a 0.8.4 config file to be used with V1Beta without any crashes or issues.
Added a restart limit to the service definition to prevent an infinite bootloop
Added a restart limit to the service definition to prevent an infinite bootloop
On hindsight, the approach of letting the FSM handle all state transitions explicitly is much clearer
On hindsight, the approach of letting the FSM handle all state transitions explicitly is much clearer
Added a paragraph about handle-based sensors.
Added reason to modify hardware setup in documentation
Added link to software setup
JaapvanEkris and others added 21 commits February 5, 2024 15:49
* Switch to Node.js V20

* Failsafe for updating using the wrong branch

* Update to Node.js v20 and support for RPi OS Bookworm

* Update to Node.js V20

* Update to Node.js V20

* Update install.sh

* Update install.sh

* Update install.sh

* Update install.sh

* Update package.json

* Update package-lock.json
Update to fix an error in both Theil-Sen regressors, as the arrays used were not processed completely. Thanks to @Abasz for reporting.
Change the startup and powerdown behaviour to depend on Angular velocity, as that is constructed using the TS-calculation, reducing the dependency on an individual measurement.

Inserted more explicit memory management by setting values to null before destroying the node, in order to make the Garbage collector's work a bit easier. This fixes a lot of memory leaks.

Performance improvement of the Quadratic TS Series: Implementation of a lazy algorithm to calculate B, C and goodnessOfFit, avoiding the unneccessary calculation of them when not needed/used.

Improved coding style: Instead of making explicit function calls, we now expose the underlying series, allowing use of their functions directly.

Adds different rowers, including the model C (see laberning#157 )
@JaapvanEkris JaapvanEkris changed the title Functional improvements Application and Physics Engine, Bugfixes Huge functional improvements application, physics Engine and lots of Bugfixes Jan 15, 2025
# New functionality in 0.9.5

- Added **FIT-File support**: you an now automatically generate a FIT-file after a rowing session, which alows for a more detailed reporting than the tcx-format, and is commonly accepted by most platforms
- **Introduction of the session manager**, which provides support for intervals, splits, rest intervals and spontanuous pauses in the session and also adds these to the FIT, tcx and RowingData recordings. Please note, setting predetermined intervals and splits in a user friendly way (via PM5 and webinterface) is still a ToDo that is intended for 1.0.0.
- **Improvement of Magnetic rower support**: the new session manager makes sure that the session is nicely stopped, even when the flywheel has stopped quite abruptly before pause timeouts have time to kick in. This is the case on some magnetic rowers which have an extreme high drag, resulting in very short spin down times of their flywheel.

# Bugfixes and robustness improvements in 0.9.5

- **Improvement of the architecture**: we cleaned up the old architecture and went to a more message bus structure where clients are responsible for listening to the datatransmissions they are interested in. See [the architecture description](Architecture.md) for a deep-dive of the implementation. Key benefit is that this is more maintainable as it allows serving data more easily to totally different clients (webGUI, recorders and BLE/ANT+) with totally different needs, making future enhancements easier.
- **Improvement of Bluetooth stability**: we moved away from abandonware's BLE NoBle/BleNo implementation and moved to stoprocent's implementation, as that package is better maintained and works better with newer installs of BlueZ, which should fix some issues on Raspberry Pi Bookworm. Unfortunatly, none of the NoBle/BleNo descendents are immune to some specific BlueZ issues (see known issues).
- **Performance improvement of the TS estimator**, further reducing CPU load, which significantly improves accuracy of the measurements and metrics as the Linux kernel has an easier job keeping the time accurate.
- **Removed a lot of memory leaks**, although only being problematic in large simulations (i.e. over 3000K), we want to keep our code to behave nice
- **Improved robustness of the stroke detection algorithm**
- **Validation of the engine against a PM5 for over 3000KM**, where the deviation is a maximum of 0.1%

# Known issues in 0.9.5

- **Bluetooth Heartrate can't be switched dynamically**: due to some underlying changes in the OS, BLE heartrate monitors can't be activated through the GUI without crashing the BLE metrics broadcast (see [the description of issue 69](#69)). As this is an issue in the OS, and all previous versions of OpenRowingMonitor are also affected by this issue. Version 0.9.5 has a workaround implemented that mitigates this at startup. So configuring the use of a BLE heartrate monitor in the config file should work.
@JaapvanEkris JaapvanEkris changed the title Huge functional improvements application, physics Engine and lots of Bugfixes Lots of bugfixes, huge improvements application and physics Engine Feb 9, 2025
@JaapvanEkris
Copy link
Contributor Author

We just released version 0.9.5

New functionality in 0.9.5

  • Added FIT-File support: you can now automatically generate a FIT-file after a rowing session, which allows for a more detailed reporting than the tcx-format, and is commonly accepted by most platforms
  • Introduction of the session manager, which provides support for intervals, splits, rest intervals and spontaneous pauses in the session and also adds these to the FIT, tcx and RowingData recordings. Please note, setting predetermined intervals and splits in a user friendly way (via PM5 and webinterface) is still a ToDo that is intended for 1.0.0.
  • Improvement of Magnetic rower support: the new session manager makes sure that the session is nicely stopped, even when the flywheel has stopped quite abruptly before pause timeouts have time to kick in. This is the case on some magnetic rowers which have an extreme high drag, resulting in very short spin down times of their flywheel.

Bugfixes and robustness improvements in 0.9.5

  • Improvement of the architecture: we cleaned up the old architecture and went to a more message bus structure where clients are responsible for listening to the datatransmissions they are interested in. See the architecture description for a deep-dive of the implementation. Key benefit is that this is more maintainable as it allows serving data more easily to totally different clients (webGUI, recorders and BLE/ANT+) with totally different needs, making future enhancements easier.
  • Improvement of Bluetooth stability: we moved away from abandonware's BLE NoBle/BleNo implementation and moved to stoprocent's implementation, as that package is better maintained and works better with newer installs of BlueZ, which should fix some issues on Raspberry Pi Bookworm. Unfortunatly, none of the NoBle/BleNo descendents are immune to some specific BlueZ issues (see known issues).
  • Performance improvement of the TS estimator, further reducing CPU load, which significantly improves accuracy of the measurements and metrics as the Linux kernel has an easier job keeping the time accurate.
  • Removed a lot of memory leaks, although only being problematic in large simulations (i.e. over 3000K), we want to keep our code to behave nice
  • Improved robustness of the stroke detection algorithm
  • Validation of the engine against a PM5 for over 3000KM, where the deviation is a maximum of 0.1%

Known issues in 0.9.5

  • Bluetooth Heartrate can't be switched dynamically: due to some underlying changes in the OS, BLE heartrate monitors can't be activated through the GUI without crashing the BLE metrics broadcast (see the description of issue 69). As this is an issue in the OS, and all previous versions of OpenRowingMonitor are also affected by this issue. Version 0.9.5 has a workaround implemented that mitigates this at startup. So configuring the use of a BLE heartrate monitor in the config file should work.

@JaapvanEkris JaapvanEkris changed the title Lots of bugfixes, huge improvements application and physics Engine Actively maintained Branch: Lots of bugfixes, huge improvements application and physics Engine Feb 10, 2025
@JaapvanEkris JaapvanEkris changed the title Actively maintained Branch: Lots of bugfixes, huge improvements application and physics Engine Actively maintained Branch: Lots of bugfixes, huge application improvements May 16, 2025
…#105)

# Upgrade instructions for 0.9.6

> [!IMPORTANT]
> When upgrading from an existing install, several things have to be done by hand:
>
> - If you use an attached screen, you need to install firefox by `sudo apt-get install firefox`
> - If you use the automated Strava upload, you have to configure your Strava setup in `config.js` again. Please look at the [integrations manual](Integrations.md) for how to do this.

# New functionality in 0.9.6

- **Major upgrade of our PM5 interface**, bringing it much closer to the official PM5 interface specification: apps like [ErgZone](https://Erg.Zone), [EXR](https://exrgame.com) and many others now work in PM5 mode in most scenarios (there are some known limitations, see its summary). This allows you to set up a workout in the session manager with ease, have force curves presented and record the data (adresses [this request](#78)).
- **Added [RowsAndAll.com](https://rowsandall.com) and [intervals.icu](https://intervals.icu) integration** for workout reporting (i.e. automatic uploading of a result).
- **Added a MQTT peripheral**. This reports metrics live to MQTT brokers and control home automation, etc. (see [this discussion](laberning#43), [this discussion](#80) and [this request](#98)). The MQTT listener you to push workout plans to OpenRowingMonitor from home automation systems (see [the integrations page](Integrations.md) for more information).

# Bugfixes and robustness improvements in 0.9.6

- **Simplified Strava integration**, which now is in line with the rest of the integrations (see [this discussion](#64)) and greatly simplifying the backend-architecture
- **Rewrite of the entire bluetooth stack**, greatly improving stability and removing limitations. This also fixes the issue that heartrate device can't be switched dynamically (adresses the known limitation of version 0.9.5, reported in [this bug](#69), [this feature request](#93) and [this bug report](#94).
- **Fixed a bug in pause behaviour** for magnetic rowers causing them to sttop permanently (fixes [this bug](#96)).
- **Fixed a bug in the metrics presentation**, which caused some metrics presented/recorded to be averaged too much.
- **Fixed a bug in restart behaviour** that made the recorders crash (fixes [this bug](#100)).
- **Upgraded ESLint and its configuration**, our code is inspected beyond the use of spaces.
- **Introducing JSDoc** in our code, to make our code easier to understand ([see also](#90)).
- **Upgrade npm packages and node.js**: we cleaned house by removing a lot of unneeded npm packages, upgraded npm packages where we could and upgraded to Node.js v22 (current) to increase support. This makes our stack current and fixes some security vulnerabilities.
- We **moved from Chromium to Firefox** for the webkiosk service as it greatly reduces the CPU load, practically freeing up a complete CPU core.

# Known issues in 0.9.6

- Our PM5 interface still has some minor limitations:
  - ErgZone and similar apps also can set a 'Calories' based workout. This interval type is still on [our backlog](./backlog.md#soon), so it currently isn't supported yet. The PM5 interface will fail silently and will **not** send an error message on this.
  - ErgData will not work well with our PM5 interface: sometimes it can program OpenRowingMonitor, but you will **not** be able to save your workout, as we can't create the cryptographic hash to upload the workout results. This also causes a deadlock that hangs communication at both ends (kill the ErgData app to resolve this). As ErgData is propriatary to Concept2, we have decided to **not** put in any effort to resolve this (see [issue 117](#117)).
- Some Garmin watches have issues with our 'Cycling Power' and 'Cycling Speed and Cadence' Bluetooth profiles as a result of a change on their side in handling unencrypted Bluetooth commmunication. This affects all current and past versions of OpenRowingMonitor, and might be caused by Garmin (see [issue 125](#125)).
@JaapvanEkris
Copy link
Contributor Author

JaapvanEkris commented Jul 6, 2025

We just release version 0.9.6

New functionality in 0.9.6

  • Major upgrade of our PM5 interface, bringing it much closer to the official PM5 interface specification: apps like ErgZone, EXR and many others now work in PM5 mode in most scenarios (see the known limitations section for more info). This allows you to set up a workout in the session manager with ease, have force curves presented and record the data (adresses this request).
  • Added RowsAndAll.com and intervals.icu integration for workout reporting (i.e. automatic uploading of a result).
  • Added a MQTT peripheral. This reports metrics live to MQTT brokers and control home automation, etc. (see this discussion, this discussion and this request). The MQTT listener you to push workout plans to OpenRowingMonitor from home automation systems (see the integrations page for more information).

Bugfixes and robustness improvements in 0.9.6

  • Simplified Strava integration, which now is in line with the rest of the integrations (see this discussion) and greatly simplifying the backend-architecture
  • Rewrite of the entire bluetooth stack, greatly improving stability and removing limitations. This also fixes the issue that heartrate device can't be switched dynamically (adresses the known limitation of version 0.9.5, reported in this bug, this feature request and this bug report.
  • Fixed a bug in pause behaviour for magnetic rowers causing them to sttop permanently (fixes this bug).
  • Fixed a bug in the metrics presentation, which caused some metrics presented/recorded to be averaged too much.
  • Fixed a bug in restart behaviour that made the recorders crash (fixes this bug).
  • Upgraded ESLint and its configuration, our code is inspected beyond the use of spaces.
  • Introducing JSDoc in our code, to make our code easier to understand (see also).
  • Upgrade npm packages and node.js: we cleaned house by removing a lot of unneeded npm packages, upgraded npm packages where we could and upgraded to Node.js v22 (current) to increase support. This makes our stack current and fixes some security vulnerabilities.
  • We moved from Chromium to Firefox for the webkiosk service as it greatly reduces the CPU load, practically freeing up a complete CPU core.

Known issues in 0.9.6

  • Our PM5 interface still has some minor limitations:
    • ErgZone and similar apps also can set a 'Calories' based workout. This interval type is still on our backlog, so it currently isn't supported yet. The PM5 interface will fail silently and will not send an error message on this.
    • ErgData will not work well with our PM5 interface: sometimes it can program OpenRowingMonitor, but you will not be able to save your workout, as we can't create the cryptographic hash to upload the workout results. This also causes a deadlock that hangs communication at both ends (kill the ErgData app to resolve this). As ErgData is propriatary to Concept2, we have decided to not put in any effort to resolve this (see issue 117).
  • Some Garmin watches have issues with our 'Cycling Power' and 'Cycling Speed and Cadence' Bluetooth profiles as a result of a change on their side in handling unencrypted Bluetooth commmunication. This affects all current and past versions of OpenRowingMonitor, and might be caused by Garmin (see issue 125).

Upgrade instructions for 0.9.6

Important

When upgrading from an existing install, upgrade using sudo /bin/bash /opt/openrowingmonitor/updateopenrowingmonitor.sh (be aware you need to install from the jaapvanekris github branch!). Please be aware several things have to be done by hand:

  • If you use an attached screen, you need to install firefox by sudo apt-get install firefox
  • If you use the automated Strava upload, you have to configure your Strava setup in config.js again. Please look at the integrations manual for how to do this.

improved the RowerProfile for the NordicTrack RX800
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.

4 participants