Update of the essential npm dependencies (#30)
* Update install.sh * Update package.json * Update package-lock.json * Update package.json * Update package-lock.json * Update package.json * Update package-lock.json * Update install.sh * Update README.md * Update installation.md * Update README.md * Create Release_Notes.md * Update Release_Notes.md * Update Release_Notes.md * Update Release_Notes.md * Update README.md * Update backlog.md * Update Release_Notes.md * Update Release_Notes.md * Update Release_Notes.md * Update Release_Notes.md * Update Release_Notes.md * Update rower_settings.md * Update physics_openrowingmonitor.md * Fixed Lint errors * Update installation.md * Fix Lint errors
This commit is contained in:
parent
2934feff92
commit
a434744ce1
|
|
@ -1,11 +1,10 @@
|
|||
# Open Rowing Monitor
|
||||
|
||||
[](https://github.com/laberning/openrowingmonitor/actions/workflows/node.js.yml)
|
||||
[](https://github.com/laberning/openrowingmonitor/actions/workflows/codeql-analysis.yml)
|
||||
[](https://github.com/laberning/openrowingmonitor/actions/workflows/pages/pages-build-deployment)
|
||||
[](https://github.com/JaapvanEkris/openrowingmonitor/actions/workflows/node.js.yml)
|
||||
[](https://github.com/JaapvanEkris/openrowingmonitor/actions/workflows/codeql-analysis.yml)
|
||||
|
||||
<!-- markdownlint-disable-next-line no-inline-html -->
|
||||
<img width="200" height="200" align="left" src="img/openrowingmonitor_icon.png" class="dropcap">
|
||||
<img width="200" height="200" align="left" src="img/openrowingmonitor_icon.png" alt="Open Rowing Monitor logo" class="dropcap">
|
||||
|
||||
Open Rowing Monitor is a free and open source performance monitor for rowing machines. It upgrades almost any rowing machine into a smart trainer that can be used with training applications and games.
|
||||
|
||||
|
|
@ -18,13 +17,13 @@ Open Rowing Monitor should run fine with any rowing machine that uses some kind
|
|||
Open Rowing Monitor aims to provide you with metrics directly, connect to watches, apps and games via bluetooth or ANT+ and allow you to export your data to the analysis tool of your choice. These features have been tested intensily, where most features have survived flawlessly over 3 million meters of rowing with different types of rowing machines.
|
||||
|
||||
<!-- markdownlint-disable-next-line no-inline-html -->
|
||||
<img src="img/openrowingmonitor_frontend.png" width="700"><br clear="left">
|
||||
<img src="img/openrowingmonitor_frontend.png" alt="Image showing the main Open Rowing Monitor screen" title="The main screen" width="700"><br clear="left">
|
||||
|
||||
The following items describe most of the current features in more detail.
|
||||
|
||||
### Rowing Metrics
|
||||
|
||||
Open Rowing Monitor implements a physics model to simulate the typical metrics of a rowing boat based on the pull on the handle. The physics model can be tuned to the specifics of a rower by changing some model parameters in the configuration file, where we also provide these [settings for machines known to us](Supported_Rowers.md). The underlying V1 physics engine has been validated against a Concept2 PM5 in 250 sessions (totalling 1.8 million meters), and results deviate less than 0.05% for every rowing session.
|
||||
Open Rowing Monitor implements a physics model to simulate the typical metrics of a rowing boat based on the pull on the handle. The physics model can be tuned to the specifics of a rower by changing some model parameters in the configuration file, where we also provide these [settings for machines known to us](Supported_Rowers.md). The underlying V1 physics engine has been validated against a Concept2 PM5 in over 300 sessions (totalling 2.5 million meters), and results deviate less than 0.05% for every individual rowing session.
|
||||
|
||||
Open Rowing Monitor can display the following key metrics on the user interface:
|
||||
|
||||
|
|
@ -50,7 +49,7 @@ It calculates and can export many other key rowing metrics, including Recovery H
|
|||
The web interface visualizes the basic rowing metrics on any device that can run a web browser (i.e. a smartphone that you attach to your rowing machine while training). It shows the rowing statistics in realtime. You can set up the user interface as you like, with the metrics you find important:
|
||||
|
||||
<!-- markdownlint-disable-next-line no-inline-html -->
|
||||
<img src="img/Metrics_Selection.png" width="700"><br clear="left">
|
||||
<img src="img/Metrics_Selection.png" title="The metrics selection screen" alt="Image showing the metrics selection screen" width="700"><br clear="left">
|
||||
|
||||
Via the Action tile, it can also be used to reset the training metrics and to select the type of bluetooth and ANT+ connection.
|
||||
|
||||
|
|
@ -88,25 +87,19 @@ Uploading your sessions to Strava is an integrated feature, for all other platfo
|
|||
|
||||
## Installation
|
||||
|
||||
You will need a Raspberry Pi Zero W, Raspberry Pi Zero 2 W, Raspberry Pi 3 or a Raspberry Pi 4 with a fresh installation of Raspberry Pi OS Lite for this (the 64Bit kernel is preferred). Connect to the device with SSH and initiate the following command to install Open Rowing Monitor as an automatically starting system service:
|
||||
|
||||
```zsh
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/laberning/openrowingmonitor/HEAD/install/install.sh)"
|
||||
```
|
||||
|
||||
Also have a look at the [Detailed Installation Instructions](installation.md) for more information on the software installation and for instructions on how to connect the rowing machine.
|
||||
You will need a Raspberry Pi Zero W, Raspberry Pi Zero 2 W, Raspberry Pi 3 or a Raspberry Pi 4 with a fresh installation of Raspberry Pi OS Lite for this (the 64Bit kernel is preferred). Connect to the device with SSH have a look at the [Detailed Installation Instructions](installation.md) for more information on the software installation and for instructions on how to connect the rowing machine. Don't have a Raspberry Pi, but do have an ESP32 lying about? No problem, our sister project ported [Open Rowing Monitor for the ESP32](https://github.com/Abasz/ESPRowingMonitor), which works well (although uses a bit less accurate math due to platform limitations).
|
||||
|
||||
## How it all started
|
||||
|
||||
Lars originally started this project, because his rowing machine (Sportstech WRX700) has a very simple computer and he wanted to build something with a clean interface that calculates more realistic metrics. Also, this was a good reason to learn a bit more about Bluetooth and all its specifics.
|
||||
[Lars Berning](https://github.com/laberning) originally started this project, because his rowing machine (Sportstech WRX700) had a very simple monitor and he wanted to build something with a clean interface that calculates more realistic metrics. Also, this was a good reason to learn a bit more about Bluetooth and all its specifics.
|
||||
|
||||
The original proof of concept version started as a sketch on an Arduino, but the web frontend and BLE needed the much more powerful Raspberry Pi. Maybe using a Raspberry Pi for this small IoT-project is a bit of an overkill, but it has the capacity for further features such as syncing training data or rowing games. And it has USB-Ports that you can use to charge your phone while rowing :-)
|
||||
The original proof of concept version started as a sketch on an Arduino, but the web frontend and BLE needed the much more powerful Raspberry Pi. Maybe using a Raspberry Pi for this small IoT-project was a bit of an overkill, but it has the capacity for more complex math and features such as syncing training data. There is a much appreciated sister project that ported [Open Rowing Monitor for the ESP32](https://github.com/Abasz/ESPRowingMonitor).
|
||||
|
||||
## Further information
|
||||
|
||||
This project is already in a very usable stage, but some things are still a bit rough on the edges. More functionality will be added in the future, so check the [Development Roadmap](backlog.md) if you are curious. Contributions are welcome, please read the [Contributing Guidelines](CONTRIBUTING.md) first.
|
||||
This project is already in a very stable stage, as it is used daily by many rowers. You can see its development [here in the Release notes](Release_Notes.md). However, being open source, it might contain some things that are still a bit rough on the edges. More functionality will be added in the future, so check the [Development Roadmap](backlog.md) if you are curious. Contributions are welcome, please read the [Contributing Guidelines](CONTRIBUTING.md) first.
|
||||
|
||||
Feel free to leave a message in the [GitHub Discussions](https://github.com/laberning/openrowingmonitor/discussions) if you have any questions or ideas related to this project.
|
||||
Feel free to leave a message in the [GitHub Discussions](https://github.com/JaapvanEkris/openrowingmonitor/discussions) if you have any questions or ideas related to this project.
|
||||
|
||||
Check the advanced information on the [Physics behind Open Rowing Monitor](physics_openrowingmonitor.md).
|
||||
|
||||
|
|
|
|||
|
|
@ -0,0 +1,66 @@
|
|||
# OpenRowingMonitor Release Notes
|
||||
|
||||
## From 0.8.4 to 0.9.0 (January 2024)
|
||||
|
||||
Main contributors: [Jaap van Ekris](https://github.com/JaapvanEkris) and [Abasz](https://github.com/Abasz)
|
||||
|
||||
### New functionality in 0.9.0
|
||||
|
||||
- Added support for ANT+ rowing metrics broadcast
|
||||
- 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 the option for more complex workouts, as a hook for the PM5 and webinterface (these are a ToDo where the PM5 workout interface is still in development)
|
||||
- Added reporting of PM5 Interval-types to the PM5
|
||||
|
||||
### Bugfixes and robustness improvements in 0.9.0
|
||||
|
||||
- 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.2 (old config) users to 0.9.0 (new config), 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
|
||||
- Fixed an application crash in the RowingData generation when the target directory doesn't exist yet
|
||||
- Improved the structure of the peripherals to allow a more robust BLE and ANT use
|
||||
- Improved the accuracy, responsiveness and efficiency of both the Linear and Quadratic the Theil-Sen algorithms. For larger 'flankLength' machines, this will result in 50% reduction in CPU use, while increasing the responsiveness and accuracy of the forcecurve and powercurve.
|
||||
- Drag calculation and recovery slope calculation are now down with Linear Theil-Sen algorithm, making this calculation more robust against outliers
|
||||
- Validation of the engine against a PM5 for over 3000KM, where the deviation is a maximum of 0.03%
|
||||
|
||||
## From 0.8.2 to 0.8.4 (January 2023)
|
||||
|
||||
Main contributors: [Jaap van Ekris](https://github.com/JaapvanEkris) and [Abasz](https://github.com/Abasz)
|
||||
|
||||
### New Functionality in 0.8.4
|
||||
|
||||
- New Metrics: Force curve, Peak force, average force, power curve, handle speed curve, VO2Max (early beta), Heart Rate Recovery. All have over 1000 kilometers of testing under their belt, and have sown to work reliably;
|
||||
- Improved metrics through BLE: Based on the new engine, many metrics are added to both FTMS Rower and PM5, making it as complete as it can be. Most metrics also have over a 1000 km of testing with EXR, and both types of interface have been used with EXR intensly.
|
||||
- New export format: There is a RowingData export, which can export all metrics in .csv, which is accepted by both RowingData and RowsAndAll. It is also useable for users to read their data into Excel. This export brings the force curve to users, although it will require a small subscription to see it;
|
||||
- Simpler set-up: a better out-of-the-box experience for new users. We trimmed the number of required settings, and for many cases we’ve succeeded: several settings are brought down to their key elements (like a minimal handle force, which can be set more easily fror all rowers) or can be told by looking at the logs (like the recovery slope). For several other settings, their need to set them perfectly has been reduced, requiring less tweaking before Open Rowing Monitor starts producing good data. To support this, there also is a new setup document, to help users set up their own rower;
|
||||
- Switch to 64Bit: ORM supports the 64 Bit core, which has a PREEEMPT-kernel. The setup-script accepts this as well, as this should be the preferred kernel to use. The PREEMPT-kernel is optimized for low latency measurements, like IoT applications. As PREEMPT kernels can handle a lot higher priority for the GPIO-thread, this setting has been switched from a binary setting to a priority setting.
|
||||
- An initial stub for session mangement: As a first step towards sessions and splits, a session object in Server.js is added as a placeholder for session targets. If unfilled, the code will act as in version 0.8.2: you can row without any limitations. If a target is set, it will termintate the session at the exact right time. As is with the PM5, ORM counts down if a target is set. The current stub isn't ideal yet, as we want the user to be able to set these targets through the webGUI or through BLE. However, it is a first step towards functional completeness as it lays a preliminary foundation for such functionality.
|
||||
|
||||
### Bugfixes and robustness improvements in 0.8.4
|
||||
|
||||
- Totally renewed rowing engine: Linear and Quadratic Regression models are now the core of the rowing engine. This model is much more robust against noise, and thus removing the need for any noise filtering from OpenRowingMonitor for any of the known rowers. In the over 1000 kilometers of testing, it has proven to work extremely reliable and robust;
|
||||
- Improved logging: the logging has been more focussed on helping the user fix a bad setting. I removed several metrics, but added several others as they tell much more about the underlying state of the engine and its settings (for example the drive time and drive length). Goal is to have users be able to tune their engine based on the log.
|
||||
- Finite State Machine based state management: OpenRowingEngine will now maintain an explicit state for the rower, and RowingStatistics will maintain an explicit state for the session. Aside reducing the code complexity significantly, it greatly impoved robustness.
|
||||
- Added a new GPIO-library, making measurement of the flywheel data much more accurate and allowing to "debounce" the measurements, as many sensors have this issue
|
||||
|
||||
## From 0.8.1 to 0.8.2 (Febuary 2022)
|
||||
|
||||
Main contributor: [Lars Berning](https://github.com/laberning)
|
||||
|
||||
### New Functionality in 0.8.2
|
||||
|
||||
- Added Strava support
|
||||
|
||||
## From 0.8.0 to 0.8.1 (September 2021)
|
||||
|
||||
Main contributor: [Jaap van Ekris](https://github.com/JaapvanEkris)
|
||||
|
||||
### Bugfixes and robustness improvements in 0.8.1
|
||||
|
||||
- Refactoring of the Rowing Engine, as [Dave Vernooy's engine (ErgWare)](https://dvernooy.github.io/projects/ergware/) is good, but its variable naming leaves a bit to be desired.
|
||||
|
||||
## 0.7.0 (March 2021)
|
||||
|
||||
Initial release, Main contributor: [Lars Berning](https://github.com/laberning), based on [Dave Vernooy's physics engine (ErgWare)](https://dvernooy.github.io/projects/ergware/)
|
||||
|
|
@ -16,7 +16,7 @@ The following rowers are known to work, or are even actively supported:
|
|||
| ForceUSA | R3 | Air Rower | Flywheel | No | Supported | ForceUSA_R3 | Yes | Yes | None | - |
|
||||
| Johnson | JAR5100 | Air Rower | Flywheel | Yes, add magnets and sensor | Configuration known | - | Yes | Yes | None | [this discussion](https://github.com/laberning/openrowingmonitor/discussions/139) |
|
||||
| NordicTrack | RX800 | Hybrid Magnetic and Air rower | Flywheel | None | Full support | NordicTrack_RX800 | Yes | Yes | None | Also known under ProForm brand |
|
||||
| Sportstech | WRX700 | Water rower | Impellor | Add one magnet | Active support | Sportstech_WRX700 | Yes | Yes | Static drag | see [Sportstech WRX700 setup](hardware_setup_WRX700.md)
|
||||
| Sportstech | WRX700 | Water rower | Impellor | Add one magnet | Active support | Sportstech_WRX700 | Yes | Yes | Static drag | see [Sportstech WRX700 setup](hardware_setup_WRX700.md) |
|
||||
| White label | Air Rower | Air rower | Fywheel | None | Supported | Generic_Air_Rower | Yes | Yes | None | Sold under different brand names |
|
||||
| Open ergo | - | Air rower | Flywheel | Addition of magnets en sensor | Known to work | - | Yes | Yes | None | Machine specific profile is needed, but is done before, see [example 1](https://github.com/laberning/openrowingmonitor/discussions/80), [example 2](https://github.com/laberning/openrowingmonitor/discussions/105) and [example 3](https://github.com/laberning/openrowingmonitor/discussions/115) |
|
||||
|
||||
|
|
|
|||
|
|
@ -19,5 +19,4 @@ If you would like to contribute to this project, please read the [Contributing G
|
|||
|
||||
## Ideas
|
||||
|
||||
* add video playback to the Web UI
|
||||
* implement or integrate some rowing games (i.e. a little 2D or 3D, game implemented as Web Component)
|
||||
* Add sounds and indicators for training zones
|
||||
|
|
|
|||
|
|
@ -30,24 +30,105 @@ This guide roughly explains how to set up the rowing software and hardware.
|
|||
Connect to the device with SSH and initiate the following command to set up all required dependencies and to install Open Rowing Monitor as an automatically starting system service:
|
||||
|
||||
```zsh
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/laberning/openrowingmonitor/HEAD/install/install.sh)"
|
||||
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/JaapvanEkris/openrowingmonitor/v1beta_updates/install/install.sh)"
|
||||
```
|
||||
|
||||
### Updating to a new version
|
||||
### Check if OpenRowingMonitor runs without issue
|
||||
|
||||
Open Rowing Monitor does not provide proper releases (yet), but you can update to the latest development version with this command:
|
||||
Next, check you need to do is to check the status of the Open Rowing Monitor service, which you can do with the command:
|
||||
|
||||
```zsh
|
||||
updateopenrowingmonitor.sh
|
||||
sudo systemctl status openrowingmonitor
|
||||
```
|
||||
|
||||
### Running Open Rowing Monitor without root permissions (optional)
|
||||
Which typically results in the following response (with some additional logging):
|
||||
|
||||
The default installation will run Open Rowing Monitor with root permissions. You can also run it as normal user by modifying the following system services:
|
||||
```zsh
|
||||
● openrowingmonitor.service - Open Rowing Monitor
|
||||
Loaded: loaded (/lib/systemd/system/openrowingmonitor.service; enabled; vendor preset: enabled)
|
||||
Active: active (running) since Sun 2022-09-04 10:27:31 CEST; 12h ago
|
||||
Main PID: 755 (npm start)
|
||||
Tasks: 48 (limit: 8986)
|
||||
CPU: 6min 48.869s
|
||||
CGroup: /system.slice/openrowingmonitor.service
|
||||
├─755 npm start
|
||||
├─808 sh /tmp/start-6f31a085.sh
|
||||
├─809 node app/server.js
|
||||
├─866 /usr/bin/node ./app/gpio/GpioTimerService.js
|
||||
└─872 /usr/bin/node ./app/ble/CentralService.js
|
||||
```
|
||||
|
||||
#### To use BLE and open the Web-Server on port 80
|
||||
Please check if there are no errors reported.
|
||||
|
||||
Issue the following command:
|
||||
Please note that the process identification numbers will differ.
|
||||
|
||||
You can also look at the the log output of the OpenRowingMonitor-service by putting the following in the command-line:
|
||||
|
||||
```zsh
|
||||
sudo journalctl -u openrowingmonitor
|
||||
```
|
||||
|
||||
This allows you to see the current state of the rower. Typically this will show:
|
||||
|
||||
```zsh
|
||||
Sep 12 20:37:45 roeimachine systemd[1]: Started Open Rowing Monitor.
|
||||
Sep 12 20:38:03 roeimachine npm[751]: > openrowingmonitor@0.9.0 start
|
||||
Sep 12 20:38:03 roeimachine npm[751]: > node app/server.js
|
||||
Sep 12 20:38:06 roeimachine npm[802]: ==== Open Rowing Monitor 0.9.0 ====
|
||||
Sep 12 20:38:06 roeimachine npm[802]: Setting priority for the main server thread to -5
|
||||
Sep 12 20:38:06 roeimachine npm[802]: Session settings: distance limit none meters, time limit none seconds
|
||||
Sep 12 20:38:06 roeimachine npm[802]: bluetooth profile: Concept2 PM5
|
||||
Sep 12 20:38:06 roeimachine npm[802]: webserver running on port 80
|
||||
Sep 12 20:38:06 roeimachine npm[862]: Setting priority for the Gpio-service to -7
|
||||
Sep 12 20:38:09 roeimachine npm[802]: websocket client connected
|
||||
```
|
||||
|
||||
Please check if there are no errors reported. The above snippet shows that OpenRowingMonitor is running, and that bluetooth and the webserver are alive, and that the webclient has connected.
|
||||
|
||||
### Check if OpenRowingMonitor screen runs without issue (if installed)
|
||||
|
||||
Next, check you need to do is to check the status of the Open Rowing Monitor service, which you can do with the command:
|
||||
|
||||
```zsh
|
||||
sudo systemctl status webbrowserkiosk
|
||||
```
|
||||
|
||||
Which typically results in the following response (with some additional logging):
|
||||
|
||||
```zsh
|
||||
● webbrowserkiosk.service - X11 Web Browser Kiosk
|
||||
Loaded: loaded (/lib/systemd/system/webbrowserkiosk.service; enabled; vendor preset: enabled)
|
||||
Active: active (running) since Wed 2024-01-31 23:46:27 CET; 11h ago
|
||||
Main PID: 746 (xinit)
|
||||
Tasks: 82 (limit: 8755)
|
||||
CPU: 2min 50.292s
|
||||
CGroup: /system.slice/webbrowserkiosk.service
|
||||
├─746 xinit /opt/openrowingmonitor/install/webbrowserkiosk.sh -- -nocursor
|
||||
├─747 /usr/lib/xorg/Xorg :0 -nocursor
|
||||
├─769 sh /opt/openrowingmonitor/install/webbrowserkiosk.sh
|
||||
├─774 /usr/bin/openbox --startup /usr/lib/aarch64-linux-gnu/openbox-autostart OPENBOX
|
||||
├─777 /usr/lib/chromium-browser/chromium-browser --enable-pinch --disable-infobars --disable-features=AudioServiceSandbox --kiosk --noerrdialogs --ignore-certificate-errors --disable-session-crashed-bubble --disable-pinch ->
|
||||
├─804 /usr/lib/chromium-browser/chrome_crashpad_handler --monitor-self --monitor-self-annotation=ptype=crashpad-handler --database=/home/pi/.config/chromium/Crash Reports --annotation=channel=Built on Debian , running on De>
|
||||
├─806 /usr/lib/chromium-browser/chrome_crashpad_handler --no-periodic-tasks --monitor-self-annotation=ptype=crashpad-handler --database=/home/pi/.config/chromium/Crash Reports --annotation=channel=Built on Debian , running >
|
||||
├─810 /usr/lib/chromium-browser/chromium-browser --type=zygote --no-zygote-sandbox --crashpad-handler-pid=0 --enable-crash-reporter=,Built on Debian , running on Debian 11 --noerrdialogs --change-stack-guard-on-fork=enable
|
||||
├─811 /usr/lib/chromium-browser/chromium-browser --type=zygote --crashpad-handler-pid=0 --enable-crash-reporter=,Built on Debian , running on Debian 11 --noerrdialogs --change-stack-guard-on-fork=enable
|
||||
├─820 /usr/lib/chromium-browser/chromium-browser --type=zygote --crashpad-handler-pid=0 --enable-crash-reporter=,Built on Debian , running on Debian 11 --noerrdialogs --change-stack-guard-on-fork=enable
|
||||
├─845 /usr/lib/chromium-browser/chromium-browser --type=gpu-process --enable-low-end-device-mode --ozone-platform=x11 --crashpad-handler-pid=0 --enable-crash-reporter=,Built on Debian , running on Debian 11 --noerrdialogs ->
|
||||
├─850 /usr/lib/chromium-browser/chromium-browser --type=utility --utility-sub-type=network.mojom.NetworkService --lang=en-US --service-sandbox-type=none --ignore-certificate-errors --ignore-certificate-errors --crashpad-han>
|
||||
├─858 /usr/lib/chromium-browser/chromium-browser --type=utility --utility-sub-type=storage.mojom.StorageService --lang=en-US --service-sandbox-type=utility --ignore-certificate-errors --ignore-certificate-errors --crashpad->
|
||||
├─877 /usr/lib/chromium-browser/chromium-browser --type=broker
|
||||
└─884 /usr/lib/chromium-browser/chromium-browser --type=renderer --crashpad-handler-pid=0 --enable-crash-reporter=,Built on Debian , running on Debian 11 --noerrdialogs --change-stack-guard-on-fork=enable --first-renderer-p>
|
||||
```
|
||||
|
||||
Please check if there are no errors reported.
|
||||
|
||||
Please note that the process identification numbers will differ.
|
||||
|
||||
### To use BLE and open the Web-Server on port 80
|
||||
|
||||
#### Running Open Rowing Monitor without root permissions (optional)
|
||||
|
||||
The default installation will run Open Rowing Monitor with root permissions. You can also run it as normal user by issueing the following command:
|
||||
|
||||
```zsh
|
||||
sudo setcap cap_net_bind_service,cap_net_raw=+eip $(eval readlink -f `which node`)
|
||||
|
|
@ -68,8 +149,8 @@ Basically all that's left to do is hook up your sensor to the GPIO pins of the R
|
|||
|
||||
Open Rowing Monitor reads the sensor signal from GPIO port 17 and expects it to pull on GND if the sensor is closed. To get a stable reading you should add a pull-up resistor to that pin. I prefer to use the internal resistor of the Raspberry Pi to keep the wiring simple but of course you can also go with an external circuit.
|
||||
|
||||

|
||||
*Internal wiring of Raspberry Pi*
|
||||
<!-- markdownlint-disable-next-line no-inline-html -->
|
||||
<img src="img/raspberrypi_internal_wiring.jpg" alt="Image showing the internal wiring of Raspberry Pi" title="Internal wiring of the Raspberry Pi" width="700"><br clear="left">
|
||||
|
||||
The internal pull-up can be enabled as described [here](https://www.raspberrypi.org/documentation/configuration/config-txt/gpio.md). So its as simple as adding the following to `/boot/config.txt` and then rebooting the device.
|
||||
|
||||
|
|
@ -85,12 +166,13 @@ How to connect this to your rowing machine is specific to your device. You need
|
|||
|
||||
If your machine isn't listed, you can still follow this generic manual for hardware setup, and [adjust the software settings following the settings adjustment guide](rower_settings.md).
|
||||
|
||||

|
||||
*Connecting the reed sensor*
|
||||
<!-- markdownlint-disable-next-line no-inline-html -->
|
||||
<img src="img/raspberrypi_reedsensor_wiring.jpg" alt="Image showing the connection of the reed sensor" title="Connecting the reed sensor" width="700"><br clear="left">
|
||||
|
||||
If you do not have and does not have something like this or if the sensor is not accessible, you can still build something similar quite easily. Some ideas on what to use:
|
||||
|
||||
* Reed sensor (i.e. of an old bike tachometer)
|
||||
* HAL effect sensor
|
||||
* PAS sensor (i.e. from an E-bike)
|
||||
* Optical chopper wheel
|
||||
|
||||
|
|
@ -98,6 +180,29 @@ If you do not have and does not have something like this or if the sensor is not
|
|||
|
||||
You should now adjust the rower specific parameters in `config/config.js` to suit your rowing machine. You should select a specific rower from the `rowerProfiles.js`, or create your own settings following this [guide for creating the rower specific settings](rower_settings.md). Also have a look at `config/default.config.js` to see what additional config parameters are available to suit your needs.
|
||||
|
||||
Once all parameters are set, look at the the log output of the OpenRowingMonitor-service by putting the following in the command-line:
|
||||
|
||||
```zsh
|
||||
sudo journalctl -u openrowingmonitor
|
||||
```
|
||||
|
||||
This allows you to see the current state of the rower. Typically this will show:
|
||||
|
||||
```zsh
|
||||
Sep 12 20:37:45 roeimachine systemd[1]: Started Open Rowing Monitor.
|
||||
Sep 12 20:38:03 roeimachine npm[751]: > openrowingmonitor@0.9.0 start
|
||||
Sep 12 20:38:03 roeimachine npm[751]: > node app/server.js
|
||||
Sep 12 20:38:06 roeimachine npm[802]: ==== Open Rowing Monitor 0.9.0 ====
|
||||
Sep 12 20:38:06 roeimachine npm[802]: Setting priority for the main server thread to -5
|
||||
Sep 12 20:38:06 roeimachine npm[802]: Session settings: distance limit none meters, time limit none seconds
|
||||
Sep 12 20:38:06 roeimachine npm[802]: bluetooth profile: Concept2 PM5
|
||||
Sep 12 20:38:06 roeimachine npm[802]: webserver running on port 80
|
||||
Sep 12 20:38:06 roeimachine npm[862]: Setting priority for the Gpio-service to -7
|
||||
Sep 12 20:38:09 roeimachine npm[802]: websocket client connected
|
||||
```
|
||||
|
||||
Please check if there are no errors reported, especially for configuration parameters. OpenRowingMonitor will report if it detects abnormal or missing parameters.
|
||||
|
||||
### Setting up Strava upload
|
||||
|
||||
Part of the specific parameters in `config/config.js` are the Strava settings. To use this, you have to create a Strava API Application as described [here](https://developers.strava.com/docs/getting-started/#account) and use the corresponding values. When creating your Strava API application, set the "Authorization Callback Domain" to the IP address of your Raspberry Pi.
|
||||
|
|
@ -108,3 +213,11 @@ Once you get your Strava credentials, you can add them in `config/config.js`:
|
|||
stravaClientId: "StravaClientID",
|
||||
stravaClientSecret: "client_secret_string_from_the_Strava_API",
|
||||
```
|
||||
|
||||
## Updating OpenRowingMonitor to a new version
|
||||
|
||||
Open Rowing Monitor does not provide proper releases (yet), but you can update to the latest development version with this command:
|
||||
|
||||
```zsh
|
||||
updateopenrowingmonitor.sh
|
||||
```
|
||||
|
|
|
|||
|
|
@ -11,12 +11,15 @@ Before we analyze the physics of a rowing engine, we first need to define the ba
|
|||
|
||||
### Physical systems in a rower
|
||||
|
||||
A rowing machine effectively has two fundamental movements: a **linear** (the rowing person moving up and down the rail, or a boat moving forward) and a **rotational** where the energy that the rower inputs in the system is absorbed through a flywheel (either a solid one, or a liquid one) [[1]](#1).
|
||||
A rowing machine effectively has two fundamental movements:
|
||||
|
||||
<img src="img/physics/indoorrower.png" width="700">
|
||||
* a **linear** movement (the rowing person moving up and down the rail, or a boat moving forward) and
|
||||
* a **rotational** movement where the energy that the rower inputs in the system is absorbed through a flywheel (either a solid one, or a liquid one) [[1]](#1).
|
||||
|
||||
<!-- markdownlint-disable-next-line no-emphasis-as-header -->
|
||||
*A basic view of an indoor rower*
|
||||
Physically these movements are related, as they are connected by a chain or belt, allowing the rowing person to move the flywheel. This is shown in the following figure:
|
||||
|
||||
<img src="img/physics/indoorrower.png" alt="Image showing a rowing machine with its linear and rotational energy systems" width="700">
|
||||
<span class="caption">A basic view of an indoor rower's energy systems</span>
|
||||
|
||||
The linear and rotational speeds are related: the stronger/faster you pull in the linear direction, the faster the flywheel will rotate. The rotation of the flywheel simulates the effect of a boat in the water: after the stroke, the boat will continue to glide only be dampened by the drag of the boat, so does the flywheel.
|
||||
|
||||
|
|
@ -41,8 +44,7 @@ stateDiagram-v2
|
|||
Recovery --> Drive
|
||||
```
|
||||
|
||||
<!-- markdownlint-disable-next-line no-emphasis-as-header -->
|
||||
*Basic phases of a rowing stroke*
|
||||
<span class="caption">Basic phases of a rowing stroke</span>
|
||||
|
||||
On an indoor rower, the rowing cycle will always start with a stroke, followed by a recovery. We define them as follows:
|
||||
|
||||
|
|
@ -202,14 +204,13 @@ stateDiagram-v2
|
|||
Recovery --> Recovery: Flywheel<br>isn't powered
|
||||
```
|
||||
|
||||
<!-- markdownlint-disable-next-line no-emphasis-as-header -->
|
||||
*Finite state machine of rowing cycle*
|
||||
<span class="caption">Finite state machine of rowing cycle</span>
|
||||
|
||||
From the perspective of Open Rowing Monitor, there only is a stream of *CurrentDt*'s, which should form the basis of this detection:
|
||||
|
||||
The following picture shows the time between impulses through time:
|
||||

|
||||
*example currentDt Measurements of flywheel*
|
||||
<img src="img/physics/flywheelmeasurement.png" alt="Image showing the currentDt measurements of the flywheel through time" width="700">
|
||||
<span class="caption">example currentDt Measurements of a flywheel</span>
|
||||
|
||||
Open Rowing Monitor combines two types of force detection, which work independently: *basic force detection* and *advanced stroke detection*. Both can detect a stroke accuratly, and the combination has proven its use.
|
||||
|
||||
|
|
@ -227,8 +228,8 @@ In the remainder of this paragraph, we describe the underlying physics of both t
|
|||
|
||||
One of the key indicator is the acceleration/decelleration of the flywheel. Looking at a simple visualisation of the rowing stroke, we try to achieve the following:
|
||||
|
||||

|
||||
*Impulses, impulse lengths and rowing cycle phases*
|
||||
<img src="img/physics/rowingcycle.png" alt="Image showing the relation between Impulses, impulse lengths and rowing cycle phases" width="700">
|
||||
<span class="caption">Impulses, impulse lengths and rowing cycle phases</span>
|
||||
|
||||
Here we plot the *currentDt* against its sequence number. So, a high *currentDt* means a long time between impulses (so a low *angular velocity*), and a low *currentDt* means that there is a short time between impulses (so a high *angular velocity*).
|
||||
|
||||
|
|
@ -246,8 +247,8 @@ In Open Rowing Monitor, the settings allow for using the more robust ascending/d
|
|||
|
||||
The more advanced, but more vulnerable approach depends on the calculated torque. When looking at *CurrentDt* and Torque over time, we get the following picture:
|
||||
|
||||

|
||||
*Average currentDt (red) and Acceleration (blue) of a single stroke on a rowing machine*
|
||||
<img src="img/physics/currentdtandacceleration.png" alt="Image showing the average currentDt curves of a rowing machine" width="700">
|
||||
<span class="caption">Average currentDt (red) and Acceleration (blue) of a single stroke on a rowing machine</span>
|
||||
|
||||
In this graph, we plot *currentDt* and Torque against the time in the stroke. As soon as the Torque of the flywheel becomes below the 0, the *currentDt* begins to lengthen again (i.e. the flywheel is decelerating). As indicated earlier, this is the trigger for the basic force detection algorithm (i.e. when *minumumRecoverySlope* is set to 0): when the *currentDt* starts to lengthen, the drive-phase is considered complete.
|
||||
|
||||
|
|
@ -263,11 +264,11 @@ Open Rowing Monitor only will get impulses at discrete points in time. As Open R
|
|||
|
||||
Knowing that *Time since start*, Angular Velocity ω, Angular Acceleration α, flywheel Torque τ and dragfactor k have been determined in a robust manner by `engine/Flywheel.js`, `engine/Rower.js` can now transform these key rotational metrics in linear metrics. This is done in the `handleRotationImpulse()` function of `engine/Rower.js`, where based on the flywheel state, the relevant metrics are calculated. The following metrics need to be determined:
|
||||
|
||||
* The estimated **power produced** by the rower (in Watts): the power the rower produced during the stroke;
|
||||
* The estimated **power produced** by the rower (in Watts, denoted with P): the power the rower produced during the stroke;
|
||||
|
||||
* The estimated **Linear Velocity** of the boat (in Meters/Second): the speed at which the boat is expected to travel;
|
||||
* The estimated **Linear Velocity** of the boat (in Meters/Second, denoted with u): the speed at which the boat is expected to travel;
|
||||
|
||||
* The estimated **Linear Distance** of the boat (in Meters): the distance the boat is expected to travel;
|
||||
* The estimated **Linear Distance** of the boat (in Meters, denoted with s): the distance the boat is expected to travel;
|
||||
|
||||
* The estimated **Drive length** (in meters): the estimated distance travelled by the handle during the drive phase;
|
||||
|
||||
|
|
@ -474,7 +475,8 @@ However, there are some current practical objections against using these more co
|
|||
|
||||
We also observe specific practical issues, which could result in structurally overfitting the dataset, nihilating its noise reduction effect. As the following sample of three rotations of a Concept2 flywheel shows, due to production tolerances or deliberate design constructs, there are **systematic** errors in the data due to magnet placement or magnet polarity. This results in systematic issues in the datastream:
|
||||
|
||||
<img src="img/Concept2_RowErg_Construction_tolerances.jpg" width="700">
|
||||
<img src="img/Concept2_RowErg_Construction_tolerances.jpg" alt="Image showing the sinoid measurement deviations of a Concept 2 RowErg over three full flywheel rotations" width="700">
|
||||
<span class="caption">Deviation of the Concept 2 RowErg</span>
|
||||
|
||||
Fitting a quadratic curve with at least two full rotations of data (in this case, 12 datapoints) seems to reduce the noise to very acceptable levels. In our view, fitting a third-degree polynomial would result in a better fit with these systematic errors, but resulting in a much less robust signal.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,7 +1,7 @@
|
|||
# Guide for rower specific settings
|
||||
|
||||
<!-- markdownlint-disable no-inline-html -->
|
||||
This guide helps you to adjust the rowing monitor specifically for a new type of rower or even for your specific use, when the supported rowers don't suffice (you can [find a list of supported rowers here](Supported_Rowers.md)). In this manual, we will guide you through the settings needed to get your machine working. This is a work in progress, and please get in touch through the [GitHub Discussions](https://github.com/laberning/openrowingmonitor/discussions) when you run into problems.
|
||||
This guide helps you to adjust the rowing monitor specifically for a new type of rower or even for your specific use, when the supported rowers don't suffice (you can [find a list of supported rowers here](Supported_Rowers.md)). In this manual, we will guide you through the settings needed to get your machine working. This is a work in progress, and please get in touch through the [GitHub Discussions](https://github.com/JaapvanEkris/openrowingmonitor/discussions) when you run into problems.
|
||||
|
||||
In this manual, we cover the following topics:
|
||||
|
||||
|
|
@ -100,7 +100,7 @@ You can use the following commands on the command line to restart after a config
|
|||
|
||||
After rowing a bit, there should be a csv file created with raw data. If no strokes or pauses are detected, you can force the writing of these files by pushing the reset button on the GUI. Please read this data in Excel (it is in US format, so you might need to adapt it to your local settings), to check if it is sufficiently clean. After loading it into Excel, you can visualise it, and probably see something similar to the following:
|
||||
|
||||
<img src="img/CurrentDt_curve.jpg" width="700">
|
||||
<img src="img/CurrentDt_curve.jpg" alt="A curve showing the typical progress of currentDt" width="700">
|
||||
|
||||
When the line goes up, the time between impulses from the flywheel goes up, and thus the flywheel is decellerating. When the line goes down, the time between impulses decreases, and thus the flywheel is accelerating. In the first decellerating flank, we see some noise, which Open Rowing Monitor an deal with perfectly. However, looking at the bottom of the first acceleration flank, we see a series of heavy downward spikes. This could be start-up noise, but it also could be systematic across the rowing session. This is problematic as it throws off both stroke detection and many metrics. Typically, it signals an issue in the mechanical construction of the sensor: the frame and sensor vibrate at high speeds, resulting in much noise. Fixing this type of errors is key. We adress two familiar measurement quality issues:
|
||||
|
||||
|
|
@ -111,7 +111,7 @@ When the line goes up, the time between impulses from the flywheel goes up, and
|
|||
|
||||
A specific issue to be aware of is *switch bounce*, which typically is seen as a valid signal followed by a very short spike. When looking at a set of plotted signals in Excel, it manafests itself as the following:
|
||||
|
||||
<img src="img/CurrentDt_With_Lots_Of_Bounce.jpg" width="700">
|
||||
<img src="img/CurrentDt_With_Lots_Of_Bounce.jpg" alt="A scatter plot showing the typical progress of currentDt with switch bounce" width="700">
|
||||
|
||||
As this example scatterplot curve shows, you can vaguely recognize the typical rowing curve in the measurements between 0.02 and 0.08 seconds. However, you also see a lot of very small spikes where the measurements are below 0.01 seconds. Actually there are so many spikes that it masks the real signal completely for Open Rowing Monitor. It contains sections where the time between pulses is 0.0001 seconds, which would mean that the flywheel would be spinning at 120.000 RPM, which physically is impossible for a simple bicycle wheel used in this example. This type of scater plot and the underlying data clearly suggests that the sensor picks up the magnet twice or more. This is a measurement quality issue that must be adressed.
|
||||
|
||||
|
|
@ -124,7 +124,7 @@ The preferred solution is to fix the physical underlying cause, this is a better
|
|||
|
||||
Another specific issue to watch out for are systemic errors in the magnet placement. For exmple, these 18 pulses from a Concept2 RowErg show a nice clean signal, but also a systematic error, that follows a 6 impulse cycle. As the RowErg has 6 magnets, it is very likely that it is caused by magnets not being perfectly aligned (for example due to production tollerances):
|
||||
|
||||
<img src="img/Concept2_RowErg_Construction_tolerances.jpg" width="700">
|
||||
<img src="img/Concept2_RowErg_Construction_tolerances.jpg" alt="A curve showing the typical Concept 2 RowErg Sinoid deviation of currentDt for three cycles" width="700">
|
||||
|
||||
In some cases, changing the magnet placing or orientation can fix this completely (see for example [this discussion](https://github.com/laberning/openrowingmonitor/discussions/87)), which yields very good results and near-perfect data. Sometimes, you can't fix this or you are unwilling to physically modify the machine. Open Rowing Monitor can handle this kind of systematic error, as long as the *flankLength* (described later) is set to at least two full rotations (in this case, 12 impulses *flankLength* for a 6 magnet machine).
|
||||
|
||||
|
|
@ -185,7 +185,7 @@ Another option is to change the *gpioPollingInterval*, which determines how accu
|
|||
|
||||
A good quality curve of the time between impulses (as captured in the raw datafiles) looks like this:
|
||||
|
||||
<img src="img/maximumTimeBetweenImpulses.jpg" width="700">
|
||||
<img src="img/maximumTimeBetweenImpulses.jpg" alt="A curve showing the typical progress of currentDt throughout several strokes" width="700">
|
||||
|
||||
Here, aside from the startup and spindown, the blue line shows that the impulses typically vary between 0.035 and 0.120 seconds. The red line depicts the *maximumTimeBetweenImpulses*, which is set to 0.120 seconds. When using the raw datafiles, realise that the goal is to distinguish good normal strokes from noise. So at startup it is quite accepted that the flywheel starts too slow to produce valid data during the biggest part of the first drive phase. Also at the end of a session the flywheel should spin down out of valid ranges again. So *maximumTimeBetweenImpulses* could be set lower, sometimes even hitting the "peaks" of the curves, without causing issues in normal use of Open Rowing Monitor (it will add warnings in the logs). Similarily, *minimumTimeBetweenImpulses* could be slightly increased to include some valleys, without causing much issues.
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
#!/bin/bash
|
||||
#
|
||||
# Open Rowing Monitor, https://github.com/laberning/openrowingmonitor
|
||||
# Open Rowing Monitor, https://github.com/JaapvanEkris/openrowingmonitor
|
||||
#
|
||||
# Installation script for Open Rowing Monitor, use at your own risk!
|
||||
#
|
||||
|
|
@ -50,7 +50,7 @@ ask() {
|
|||
|
||||
CURRENT_DIR=$(pwd)
|
||||
INSTALL_DIR="/opt/openrowingmonitor"
|
||||
GIT_REMOTE="https://github.com/laberning/openrowingmonitor.git"
|
||||
GIT_REMOTE="https://github.com/JaapvanEkris/openrowingmonitor.git"
|
||||
|
||||
print "This script will set up Open Rowing Monitor on one of the following devices"
|
||||
print " Raspberry Pi Zero W or WH"
|
||||
|
|
@ -158,14 +158,14 @@ cd $INSTALL_DIR
|
|||
# get project code from repository
|
||||
sudo git init -q
|
||||
# older versions of git would use 'master' instead of 'main' for the default branch
|
||||
sudo git checkout -q -b main
|
||||
sudo git checkout -q -b v1beta_updates
|
||||
sudo git config remote.origin.url $GIT_REMOTE
|
||||
sudo git config remote.origin.fetch +refs/heads/*:refs/remotes/origin/*
|
||||
# prevent altering line endings
|
||||
sudo git config core.autocrlf false
|
||||
sudo git fetch --force origin
|
||||
sudo git fetch --force --tags origin
|
||||
sudo git reset --hard origin/main
|
||||
sudo git reset --hard origin/v1beta_updates
|
||||
|
||||
# add bin directory to the system path
|
||||
echo "export PATH=\"\$PATH:$INSTALL_DIR/bin\"" >> ~/.bashrc
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load Diff
28
package.json
28
package.json
|
|
@ -1,13 +1,13 @@
|
|||
{
|
||||
"name": "openrowingmonitor",
|
||||
"version": "0.8.2",
|
||||
"version": "0.9.0",
|
||||
"description": "A free and open source performance monitor for rowing machines",
|
||||
"main": "app/server.js",
|
||||
"author": "Lars Berning",
|
||||
"author": "Jaap van Ekris",
|
||||
"license": "GPL-3.0",
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "https://github.com/laberning/openrowingmonitor.git"
|
||||
"url": "https://github.com/JaapvanEkris/openrowingmonitor.git"
|
||||
},
|
||||
"type": "module",
|
||||
"engines": {
|
||||
|
|
@ -31,24 +31,24 @@
|
|||
"pre-commit": "npm run lint && npm test"
|
||||
},
|
||||
"dependencies": {
|
||||
"@abandonware/bleno": "0.5.1-4",
|
||||
"@abandonware/noble": "1.9.2-15",
|
||||
"chart.js": "^4.2.1",
|
||||
"@abandonware/bleno": "^0.6.1",
|
||||
"@abandonware/noble": "^1.9.2-23",
|
||||
"chart.js": "^4.4.1",
|
||||
"chartjs-plugin-datalabels": "^2.2.0",
|
||||
"finalhandler": "1.1.2",
|
||||
"finalhandler": "^1.2.0",
|
||||
"form-data": "4.0.0",
|
||||
"incyclist-ant-plus": "^0.1.15",
|
||||
"incyclist-ant-plus": "^0.3.1",
|
||||
"lit": "2.1.3",
|
||||
"loglevel": "1.8.0",
|
||||
"loglevel": "^1.9.1",
|
||||
"nosleep.js": "0.12.0",
|
||||
"pigpio": "3.3.1",
|
||||
"serve-static": "1.14.2",
|
||||
"ws": "8.5.0",
|
||||
"xml2js": "0.4.23"
|
||||
"serve-static": "^1.15.0",
|
||||
"ws": "^8.16.0",
|
||||
"xml2js": "^0.6.2"
|
||||
},
|
||||
"//fix1Comment": "version 0.5.3-8 currently does not work with bleno",
|
||||
"optionalDependencies": {
|
||||
"@abandonware/bluetooth-hci-socket": "0.5.3-7"
|
||||
"@abandonware/bluetooth-hci-socket": "^0.5.3-10"
|
||||
},
|
||||
"//fix2Comment": "a hacky fix to not install the optional dependency xpc-connect which has a security issue",
|
||||
"overrides": {
|
||||
|
|
@ -83,6 +83,6 @@
|
|||
"simple-git-hooks": "2.7.0",
|
||||
"snowpack": "3.8.8",
|
||||
"tar": "6.1.11",
|
||||
"uvu": "0.5.3"
|
||||
"uvu": "^0.5.6"
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue