updates documentation

This commit is contained in:
Lars Berning 2021-04-01 22:05:05 +02:00
parent 89883dab2d
commit 870fc53fc8
6 changed files with 11936 additions and 75 deletions

View File

@ -38,11 +38,21 @@ Open Rowing Monitor also implements different Bluetooth Low Energy (BLE) protoco
Fitness Machine Service (FTMS) is a standardized GATT protocol for different types of fitness machines. Open Rowing Monitor currently supports the type **FTMS Rower** and simulates the type **FTMS Indoor Bike**.
**FTMS Rower** allows all rower specific metrics (such as stroke rate) to be present, unfortunately not many training applications exist that support this type (the only one I'm aware of is Kinomap but let me know if there are more).
**FTMS Rower:** This is the FTMS profile for rowing machines and supports all rowing specific metrics (such as stroke rate). So far not many training applications for this profile exist, but the market is evolving. I've successfully tested it with [EXR](https://www.exrgame.com), [MyHomeFit](https://myhomefit.de) and [Kinomap](https://www.kinomap.com).
**FTMS Indoor Bike** is widely adopted by training applications for bike training. The simulated Indoor Bike offers metrics such as power and distance to the biking application. So why not use your rowing machine to row up a mountain in Zwift, Bkool, Sufferfest or similar :-)
**FTMS Indoor Bike:** This FTMS profile is used by Smart Bike Trainers and widely adopted by training applications for bike training. It does not support rowing specific metrics. But we can present metrics such as power and distance to the biking application. So why not use your virtual rowing bike to row up a mountain in [Zwift](https://www.zwift.com), [Bkool](https://www.bkool.com), [The Sufferfest](https://thesufferfest.com) or similar :-)
**Concept2 PM** Open Rowing Monitor also implements part of the Concept2 PM Bluetooth Smart Communication Interface Definition. This is still work in progress and only implements the most common parts of the spec, so it will not work with all applications that support the C2 rowing machines.
**Concept2 PM:** Open Rowing Monitor also implements part of the Concept2 PM Bluetooth Smart Communication Interface Definition. This is still work in progress and only implements the most common parts of the spec, so it will not work with all applications that support C2 rowing machines. It currently works with all the samples from [The Erg Arcade](https://ergarcade.com), i.e. you can [row in the clouds](https://ergarcade.github.io/mrdoob-clouds/). This also works very well with [EXR](https://www.exrgame.com).
## Installation
You will need a Raspberry Pi 3 or 4 with a fresh installation of Raspberry Pi OS Lite for this. 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)"
```
Also have a look at the [Detailed Installation Instructions](doc/installation.md) for more information on the software installation and for instructions on how to connect the rowing machine.
## How it all started
@ -56,8 +66,6 @@ This project is already in a very usable stage, but some things are still a bit
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.
Here are some basic [Installation Instructions](doc/installation.md).
I plan to add more features, here is the [Development Roadmap](doc/backlog.md).
This project uses some great work by others, see the [Attribution here](doc/attribution.md).

View File

@ -46,9 +46,9 @@
</div>
<div class="col">
<div class="label">
<svg aria-hidden="true" focusable="false" class="icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 303.46 303.46">
<path fill="currentColor" d="m 227.09519,291.792 c -9.27334,6.46902 -18.50229,6.42126 -27.35848,0 V 166.229 C 179.68478,128.57023 170.63825,79.235679 170.55482,65.615681 L 170.555,23.006274 C 170.39325,3.814744 175.68769,3.03457 189.68037,2.933 l 46.51584,1.538e-4 C 251.41795,2.9332041 256.53801,3.7540456 256.277,23 v 42.754971 c 0.0831,13.51506 -10.25538,62.158079 -29.18168,100.474139 z"/>
<path fill="currentColor" d="m 78.96229,10.659928 c 9.273338,-6.8927389 18.926007,-7.2686989 27.35848,0 V 136.22293 c 20.05193,37.65877 29.09846,86.99331 29.18189,100.61331 l -1.8e-4,42.60941 c 0.16175,19.19153 -5.13269,19.9717 -19.12537,20.07327 l -46.51584,-1.5e-4 c -15.22174,-5e-5 -20.3418,-0.8209 -20.08079,-20.06685 v -42.75497 c -0.0831,-13.51506 10.25538,-62.15807 29.18168,-100.47413 z"/>
<svg aria-hidden="true" focusable="false" class="icon" role="img" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 512 512">
<path fill="currentColor" d="m 420.20605,468.95387 33.11371,-33.1137 c 5.22683,-5.22684 8.77492,-17.24658 3.54807,-22.47345 l -2.40714,-2.40718 c -5.22685,-5.22685 -24.05986,3.18856 -30.46144,6.8845 L 208.43041,202.27519 C 197.48359,161.4211 171.36396,110.7189 139.6182,78.964771 L 104.97336,44.31993 C 84.074343,23.420923 78.962098,22.904081 62.197813,39.66838 L 24.014429,77.851751 C 9.0221901,92.843993 7.7868003,99.708469 28.685812,120.60748 l 34.653205,34.65321 c 30.664056,30.66402 82.456343,57.8654 123.310393,68.8122 l 215.56885,215.56886 c -3.69593,6.40155 -12.11135,25.23463 -6.88448,30.46145 l 2.40718,2.40715 c 5.2185,5.21846 17.23824,1.67039 22.46509,-3.55648 z"/>
<path fill="currentColor" d="M 93.111861,469.41843 59.998156,436.30471 c -5.226842,-5.22684 -8.774914,-17.24659 -3.548088,-22.47344 l 2.407166,-2.40717 c 5.226836,-5.22685 24.059868,3.18854 30.46142,6.88449 L 304.88751,202.73974 c 10.94682,-40.85409 37.06645,-91.55629 68.81223,-123.310429 L 408.34455,44.78448 c 20.89903,-20.899007 26.01127,-21.415839 42.77554,-4.65156 l 38.18338,38.183384 c 14.99224,14.992241 16.22764,21.856706 -4.67138,42.755726 l -34.65319,34.6532 c -30.66405,30.66404 -82.45634,57.8654 -123.31038,68.8122 L 111.09965,440.10631 c 3.69593,6.40153 12.11135,25.23461 6.88448,30.46143 l -2.40718,2.40716 c -5.21849,5.21846 -17.23824,1.67038 -22.465089,-3.55647 z"/>
</svg>
</div>
<div class="content">

View File

@ -1,6 +1,6 @@
# Set up of Open Rowing Monitor
This guide roughly explains how to set up your device. I will probably build an automated installation script from this later.
This guide roughly explains how to set up the rowing software and hardware.
## Requirements
@ -13,73 +13,29 @@ This guide roughly explains how to set up your device. I will probably build an
## Software Installation
### Set up the Raspberry Pi
### Initialization of the Raspberry Pi
* Install **Raspberry Pi OS Lite** on the SD Card i.e. with the [Raspberry Pi Imager](https://www.raspberrypi.org/software)
* Connect the device to your network ([headless](https://www.raspberrypi.org/documentation/configuration/wireless/headless.md) or via [command line](https://www.raspberrypi.org/documentation/configuration/wireless/wireless-cli.md))
* Enable [SSH](https://www.raspberrypi.org/documentation/remote-access/ssh/README.md)
### Open a SSH-Connection and set up the dependencies
### Installation of the Open Rowing Monitor
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
sudo apt-get update
sudo apt-get dist-upgrade
sudo systemctl disable bluetooth
sudo apt-get install bluetooth bluez libbluetooth-dev libudev-dev
/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/laberning/openrowingmonitor/HEAD/install/install.sh)"
```
### Install Node.js
```zsh
curl -fsSL https://deb.nodesource.com/setup_14.x | bash -
apt-get install -y nodejs
```
### If you want to run Bluetooth Low Energy and the webserver on port 80 without root
### If you want to run Bluetooth Low Energy and the Web-Server on port 80 without root
```zsh
sudo setcap cap_net_bind_service,cap_net_raw=+eip $(eval readlink -f `which node`)
```
### Download Open Rowing Monitor and install dependencies
```zsh
curl -LJO https://github.com/laberning/openrowingmonitor/archive/main.zip
unzip main.zip -d ~/openrowingmonitor
rm main.zip
cd ~/openrowingmonitor
npm install
```
### Configuration and Startup
You should now be able to start the Rowing Monitor: `npm start`
You should now adjust the rower specific parameters in `app/engine/RowingEngine.js` to suit your rowing machine.
### Automatically start Open Rowing Monitor while booting
Create file `/lib/systemd/system/openrowingmonitor.service` with the following content:
```Properties
[Unit]
Description=Open Rowing Monitor
After=multi-user.target
[Service]
Type=simple
User=pi
# Restart=on-failure
WorkingDirectory=/home/pi/openrowingmonitor
ExecStart=/bin/bash -c 'PATH=/home/pi/.nvm/versions/node/v14.15.5/bin:$PATH exec npm start'
[Install]
WantedBy=multi-user.target
```
## Hardware Installation
Basically all that's left to do is hook up your sensor to the GPIO pins of the Raspberry Pi.
Basically all that's left to do is hook up your sensor to the GPIO pins of the Raspberry Pi and configure the rowing machine specific parameters of the software.
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.
@ -98,8 +54,10 @@ How to connect this to your rowing machine is specific to your device. You need
![Connecting the reed sensor](img/raspberrypi_reedsensor_wiring.jpg)
*Connecting the reed sensor*
If your machine does not have something like this or if the sensor is not acessible, you can still build something similar quite easily. Some ideas on what to use:
If your machine 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)
* PAS sensor (i.e. from an E-bike)
* Optical chopper wheel
You should now adjust the rower specific parameters in `app/engine/RowingEngine.js` to suit your rowing machine.

View File

@ -20,23 +20,26 @@ cancel() {
}
print "Installation script for Open Rowing Monitor"
print
print "This script will set up Open Rowing Monitor on a Raspberry Pi 3 / 4 with Raspberry Pi OS (Lite)."
print "You should only run this script on a SD Card that does not contain any important data."
print
if [[ "$(uname -n)" != "raspberrypi" ]]; then
cancel "This script currently only works on Raspberry Pi OS, you will have to do a manual installation."
fi
print "This script will set up Open Rowing Monitor on a Raspberry Pi 3 / 4 with Raspberry Pi OS (lite)."
print "You should only run this script on a SD Card that does not contain any important other data."
VERSION=$(grep -oP '(?<=^VERSION=).+' /etc/os-release | tr -d '"')
if [[ $VERSION != "10 (buster)" ]]; then
print "Warning: So far this install script has only been tested with Raspberry Pi OS 10 (buster)."
print "You are running Raspberry Pi OS $VERSION, are you sure that you want to continue?"
fi
print
read -p "Press RETURN to continue or CTRL + C to abort"
print "installing dependencies..."
print
print "Installing System dependencies..."
sudo apt-get -y update
sudo apt-get -y dist-upgrade
sudo systemctl disable bluetooth
@ -45,7 +48,8 @@ sudo apt-get -y install bluetooth bluez libbluetooth-dev libudev-dev git
curl -fsSL https://deb.nodesource.com/setup_14.x | sudo -E bash -
sudo apt-get install -y nodejs
print "installing openrowingmonitor..."
print
print "Installing Open Rowing Monitor..."
INSTALL_DIR="/opt/openrowingmonitor"
GIT_REMOTE="https://github.com/laberning/openrowingmonitor.git"
@ -68,14 +72,18 @@ sudo git reset --hard origin/main
# otherwise node-gyp would fail while building the system dependencies
sudo npm config set user 0
print "downloading and compiling dependencies..."
print
print "Downloading and compiling Runtime dependencies..."
sudo npm install
sudo npm run build
print
print "Setting up Open Rowing Monitor as autostarting system service..."
sudo cp install/openrowingmonitor.service /lib/systemd/system/
sudo systemctl daemon-reload
sudo systemctl enable openrowingmonitor
sudo systemctl restart openrowingmonitor
print "installation finished"
print "Open Rowing Monitor should now be up and running... (open http://<ip-of-this-device> to verify)"
print
print "Installation of Open Rowing Monitor finished"
print "Open Rowing Monitor should now be up and running."

12
package-lock.json generated
View File

@ -2974,9 +2974,9 @@
}
},
"snowpack": {
"version": "3.1.2",
"resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.1.2.tgz",
"integrity": "sha512-LsYlBNjB/t/p5QP434Pa1TqjyuX8VtXiYQaAWZkOn1d1TVKEt7nigMBr8Z+EDXYn6YlLXYKHXDvv/NhUS7Ri9A==",
"version": "3.2.2",
"resolved": "https://registry.npmjs.org/snowpack/-/snowpack-3.2.2.tgz",
"integrity": "sha512-lt2FEFpvrWSBhFPlQxDr2hG7hnyucLEh7QSJqUUcAljrt8UoWJjTZlvZ4shGiJLkNjxMgGrJKj37y08/9OvXMw==",
"dev": true,
"requires": {
"cli-spinners": "^2.5.0",
@ -3148,9 +3148,9 @@
},
"dependencies": {
"ajv": {
"version": "8.0.2",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.2.tgz",
"integrity": "sha512-V0HGxJd0PiDF0ecHYIesTOqfd1gJguwQUOYfMfAWnRsWQEXfc5ifbUFhD3Wjc+O+y7VAqL+g07prq9gHQ/JOZQ==",
"version": "8.0.3",
"resolved": "https://registry.npmjs.org/ajv/-/ajv-8.0.3.tgz",
"integrity": "sha512-Df6NAivu9KpZw+q8ySijAgLvr1mUA5ihkRvCLCxpdYR21ann5yIuN+PpFxmweSj7i3yjJ0x5LN5KVs0RRzskAQ==",
"dev": true,
"requires": {
"fast-deep-equal": "^3.1.1",

File diff suppressed because it is too large Load Diff