Skip to content

About

Raspberry Pi bridge: use a SmartRow pulley with the SmartRow app and FTMS fitness apps (Peloton) at the same time.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Repository files navigation

SmartRowBridge

Row on a SmartRow with the Peloton app - and keep using the SmartRow app at the same time.

The SmartRow pulley only talks to the SmartRow app. The app can broadcast your rowing to a list of other apps, but Peloton is not one of them: the Peloton app can connect to that broadcast, but it reads the data wrongly (the distance rowed, for example, climbs far too fast). This bridge fills that gap: a Raspberry Pi holds the only Bluetooth connection the pulley allows and re-publishes it as two devices:

  • PiRower - a standard Bluetooth fitness machine (FTMS rower), which the Peloton app can connect to;
  • SmartRow - a byte-for-byte copy of your pulley, for the SmartRow app (force curves and all).

Both apps record the same strokes. Switch the Pi on, pull the handle, open your apps.

The bridge on a Raspberry Pi 4 with the optional screen, showing watts, strokes per minute, pace and metres while rowing

Do you need this? Only if the app you want is Peloton, or another app that accepts a standard Bluetooth rower but that the SmartRow app cannot broadcast to. At the time of writing the SmartRow app broadcasts to EXR, Kinomap, Zwift, Bitgym, Regatta, ImersU, Holofit and ErgZone (SmartRow's FAQ has the current list). If your app is on that list, the SmartRow app already does the job without any extra hardware.

SmartRow pulley ──BLE──> Pi built-in radio (central, bleak/BlueZ)
                              │ raw notifications, byte for byte
                              ├──────────> "SmartRow" ──> tablet / phone running the SmartRow app
                              │ <── the app's commands forwarded to the pulley ──
                              └─ parse → watts / stroke rate / pace / distance / time
                                           "PiRower" ──> phone / tablet running Peloton (FTMS 0x2AD1)
USB Bluetooth dongle (peripheral, Bumble): two advertising sets, two connections, one GATT server

Unofficial. This project is not affiliated with or endorsed by SmartRow, WaterRower, Peloton or anyone else. It was worked out from a pulley's Bluetooth traffic and may stop working after a firmware or app update. Use it at your own risk.

The coach, at a glance

On top of the bridge, the Pi can coach your rowing (PiRowingCoach). It watches every stroke's force curve against your own Easy stroke and gives one short cue: LOOKS GOOD, EARLIER PUSH, LONGER STROKES, STRONGER FINISH or BETTER TRANSITION.

Floating window during an effort: watts in their zone colour, stroke rate and time; Peloton-style power zone bar; the stroke's force curve over the Easy shape with a force scale; LOOKS GOOD; heart-rate zone box The same view with an EARLIER PUSH cue: the stroke's peak comes later than the Easy shape's

The Pi's own screen with the same layout

  • The same layout everywhere: a floating window beside the SmartRow app on a tablet, a web page and the Pi's own screen. Watts, stroke rate and time on top; a Peloton-style power zone bar (each zone's bottom in watts at its border); the force curve, shown as soon as the pulley sends it; the cue; your heart-rate zone.
  • Finds your efforts by itself, in a Peloton class or any row, and sums each one up afterwards.
  • Planned workouts from intervals.icu: step, power and stroke-rate targets, time or metres left.
  • Seat sensor (optional TF-Luna lidar): times the legs, body and arms, and the recovery.
  • Uploads each row to intervals.icu and Strava, and keeps a list of Peloton row classes up to date.

Details: interval coach. The pictures use test curves.

Status

Working on the author's setup: SmartRow pulley firmware V3.10, Raspberry Pi 4 and TP-Link UB500, with

  • the SmartRow app on an Android tablet (Lenovo), an iPhone and an iPad;
  • the Peloton app on an Android tablet (Lenovo), an iPhone and an iPad.

The optional status screen (Pimoroni Display HAT Mini) is tested on the same Pi 4.

Cold boot to both apps recording needs no interaction. Other firmware versions, dongles and apps are untested - reports welcome.

The interval coach and the web page are new and experimental: the coach is calibrated on the author's rowing only and is off unless turned on. The web page and its floating window are used on an Android tablet (Lenovo) beside the SmartRow app.

Peloton shows stroke rate, pace and heart rate live, and output (watts, kJ), distance and stroke count in the workout summary.

What you need

Part Notes
Raspberry Pi 4 Other models with built-in Bluetooth probably work; untested
microSD card Raspberry Pi OS Lite (64-bit), flashed with Raspberry Pi Imager (see Prepare the Pi)
USB Bluetooth dongle TP-Link UB500 (Realtek RTL8761BU). It must support LE extended advertising; other Bluetooth 5 dongles may work
SmartRow pulley Firmware V3.10 tested
Two devices for the apps The SmartRow app on one, the fitness app on another (or the same one)

Why two radios: the built-in radio is the client of the pulley, and the dongle is driven directly by Bumble to host the two virtual devices.

Install

1. Prepare the Pi

Skip this if your Pi already runs Raspberry Pi OS Lite (64-bit) and you can reach it over SSH.

  1. Flash the microSD card with Raspberry Pi Imager. The Imager lists its steps down the left side; these are the ones in version 2. Older versions ask for the same things in a different layout.

    Step What to do
    Device Choose your Pi model
    OS Choose Raspberry Pi OS (other), then Raspberry Pi OS Lite (64-bit)
    Storage Choose the microSD card
    Customisation: Hostname A name for the Pi on your network, e.g. rowbridge. You use it to connect in step 3
    Customisation: Localisation Your country's capital, your time zone and your keyboard layout. The time zone sets the times shown in the bridge's log
    Customisation: User A user name and password. You need both to connect in step 3
    Customisation: Wi-Fi Secure network, then your network's name (SSID) and its password, twice
    Customisation: Remote access Turn on Enable SSH and choose Use password authentication
    Customisation: Raspberry Pi Connect Leave it off: it is Raspberry Pi's service for reaching a Pi from outside your home through their website, and the bridge does not use it
    Writing Check that the summary lists the hostname, localisation, user account, Wi-Fi and SSH, then click Write
  2. Put the card in the Pi, plug in the USB Bluetooth dongle and power the Pi on. The first boot takes a minute or two.

  3. Connect from your computer: ssh <user>@<hostname>.local, with the user and hostname you set in the Imager.

2. Install the bridge

On the Pi, over SSH, with the USB Bluetooth dongle plugged in:

sudo apt-get update && sudo apt-get install -y git
git clone https://github.com/madooroy/SmartRowBridge.git ~/smartrow-bridge
cd ~/smartrow-bridge
sudo bash install.sh

The installer puts the code in /opt/smartrow-bridge, creates the smartrow-bridge service (starts on every boot) and the settings file /etc/default/smartrow-bridge. No settings are required.

No reboot is needed: the bridge starts as soon as the installer finishes, and from then on at every boot.

3. Check it

Pull the handle to wake the pulley, then run:

sudo bash ~/smartrow-bridge/tools/health_check.sh

4. Pair the apps (once)

The SmartRow app has to be paired again, this time with the Pi's copy of your pulley instead of the pulley itself. The copy has the same name and number as the real one, so it is easy to think nothing needs doing.

  1. SmartRow app: forget (remove) the pulley you have paired now, then pair the one that appears as SmartRow-<number>. It shows the same number as before, because the bridge copies the pulley's ID, but it is the Pi you are pairing with. From then on it reconnects by itself.
  2. Peloton (or another FTMS app): add the rower called PiRower.

The real pulley no longer shows up in the apps while the bridge is running: the bridge is holding its connection, so the only SmartRow-<number> you can see is the Pi's copy.

Everyday use

  1. Power on the Pi and pull the handle straight away. The virtual devices appear once the pulley has connected, about 20 s after power-on.
  2. Open the SmartRow app and/or your fitness app. Row.
  3. Shut the Pi down before cutting power (sudo shutdown -h now, wait for the green LED to go dark). To do that with one tap on an iPhone, see switching the Pi off from an iPhone.

Updating: cd ~/smartrow-bridge && git pull && sudo bash install.sh.

Pulley firmware updates still come from the SmartRow app talking to the real pulley: stop the bridge first (sudo systemctl stop smartrow-bridge), update, start it again.

Checking and troubleshooting

sudo bash ~/smartrow-bridge/tools/health_check.sh

It is read-only and checks the service, the installed code, the settings, both radios, the last rowing session (pulley data received → forwarded to the SmartRow app → FTMS sent to the fitness app), warnings, and the SD card and power supply. It works after a reboot too: the bridge keeps a small record of each session in /var/lib/smartrow-bridge/sessions.log.

Tool Use
tools/health_check.sh Everything above, in one screen
tools/check_adapters.py Lists both radios (MAC, type, USB ID) and scans with each
tools/pulley_rssi.py Live signal strength of the pulley link. Aim for −75 dBm or better; move the Pi closer if not
tools/sniff_pulley.py Connects to the pulley directly and prints its services and raw packets (stop the bridge first)
tools/setup_shutdown_shortcut.sh Lets an iOS Shortcut shut the Pi down, and nothing else, see switching the Pi off from an iPhone
tools/faster_startup.sh Optional boot-time tuning of the Pi, see faster start-up
tools/setup_display.sh Optional status screen, see a status screen on the Pi

Live log: journalctl -u smartrow-bridge -f. Raspberry Pi OS keeps the log in memory, so save it before shutting down if you want to share it: journalctl -u smartrow-bridge -b --no-pager > ~/bridge.log.

Common problems:

  • Both radios "not powered" / nothing happens - Bluetooth is soft-blocked on a fresh image: sudo rfkill unblock bluetooth (the installer does this).
  • The dongle is not found - lsusb should list it; dmesg | grep -i rtl should show its firmware loading.
  • Apps cannot see SmartRow / PiRower - they only appear after the pulley has connected. Pull the handle.
  • The SmartRow app does not reconnect after you replaced the pulley - it is a different pulley ID; pair the new SmartRow-<number> once.
  • The Pi drops off Wi-Fi (screen wakes, but nothing reaches it): a mesh router can stop serving the Pi without telling it, so it never reconnects by itself. A watchdog installed by install.sh (smartrow-wifi-watchdog.timer) pings the router once a minute and reconnects Wi-Fi after two failed minutes; journalctl -u smartrow-wifi-watchdog --since today shows what it did. On a TP-Link Deco, also consider turning off Mesh Technology for the Pi in the Deco app (it then stays on one Deco).

Settings

/etc/default/smartrow-bridge - all optional. Restart after a change: sudo systemctl restart smartrow-bridge.

Setting Default Meaning
SRB_PULLEY_ADDRESS empty Empty = the first device advertising the SmartRow service; a MAC pins one pulley (use where several SmartRows are in range)
SRB_FITNESS_NAME PiRower The name fitness apps see
SRB_CLONE_NAME the pulley's name The name the SmartRow app sees. Leave it empty: a test with SmartRowPi did not work with the SmartRow app
SRB_CLONE_ADDRESS, SRB_FITNESS_ADDRESS derived from the dongle's MAC Addresses of the two virtual devices: the same on every boot, unique per Pi
SRB_ADVERTISE_PULLEY_ID 1 Test only: 0 advertises the clone without the pulley ID (manufacturer data), as an iPhone would; change SRB_CLONE_ADDRESS too so the app sees a new device
SRB_CENTRAL_MAC, SRB_PERIPHERAL_MAC empty Empty = built-in radio for the pulley, USB dongle for the apps; set the radios' MACs to pin them
SRB_DRIVE_WITHOUT_TABLET 1 The bridge runs the pulley's start-up handshake itself when the SmartRow app is not connected, so the fitness app works alone
SRB_SESSION_LOG /var/lib/smartrow-bridge/sessions.log Session record that survives shutdown; off disables
SRB_SNIFF_LOG empty Append every raw pulley packet to this file
SRB_GATT_LOG empty 1 logs every GATT request the apps make to the virtual devices (verbose)
SRB_LOG_LEVEL INFO DEBUG adds a line per second
SRB_STATUS_FILE /run/smartrow-bridge/status.json Status the optional screen shows, rewritten every second in RAM; off disables
SRB_COACH 0 1 turns on the interval coach (experimental)
SRB_COACH_START_PCT, SRB_COACH_MAX_MIN, SRB_COACH_SENSITIVITY 20, 5, normal Coach tuning: how much harder than steady an interval is (%), the longest effort to count (minutes), how readily the cues speak up (low, normal, high). The first two are not used once the coach has an FTP (SRB_COACH_FTP or intervals.icu): the FTP sets the threshold and there is no time limit
SRB_WEB_PORT 8080 Port of the optional web page
SRB_DISPLAY_LED, SRB_DISPLAY_HOLD_S, SRB_DISPLAY_SLEEP_S 1, 2, 3600 Screen only: 0 leaves its LED off; seconds to hold button A to switch the Pi off; seconds with nothing happening (no rowing, no button, nothing newly connected) before the screen goes dark (0 = never; rowing, something connecting or any button wakes it)
SRB_DISPLAY_FLIP 0 Screen only: 1 = the HAT is mounted the other way up. The picture turns 180° and each button keeps the job of its corner (A top left, B bottom left, X top right, Y bottom right as you look at it), so the letters printed on the board no longer match

How it works

Module Role
smartrow_bridge/central.py Finds and holds the pulley, copies its GATT table, reconnects, keeps writes in order
smartrow_bridge/peripheral.py Bumble GATT server: pulley clone + FTMS rower, two advertising sets
smartrow_bridge/protocol.py SmartRow record decoding (including each stroke's force curve), checksum, V3 KEYLOCK handshake
smartrow_bridge/coach.py Interval coach: steady reference, automatic interval detection, live cue, per-interval summary
smartrow_bridge/ftms.py FTMS Rower Data (0x2AD1), Feature, Control Point
smartrow_bridge/bridge.py Wiring; runs the pulley handshake when the SmartRow app is absent; 1 Hz FTMS; data-flow log
smartrow_bridge/adapters.py Picks the two radios, clears rfkill, hands the dongle to Bumble
smartrow_bridge/addresses.py, advertising.py, session_log.py, config.py Virtual device addresses, advertising payloads, session record, settings
smartrow_bridge/status.py, smartrow_bridge/display/, smartrow_bridge/web/ Status file; the optional screen and web page, separate services that only read it
smartrow_bridge/sessions.py Saves each session's summary for the web page; progress over weeks
smartrow_bridge/heartrate.py Optional heart rate strap, on the pulley's radio
smartrow_bridge/uploads.py, intervals.py, strava.py, fitfile.py Optional uploads: when and where, the two services, the session's FIT file
tools/coach_replay.py Runs SmartRow app CSV exports through the coach (and can save their summaries)
tools/pose_video.py Form from a side-on video: body angles and timing for every stroke (MediaPipe pose tracking; for a laptop, not the Pi; pip install -r requirements-video.txt). --strokes SESSION.strokes.json lines the clip up with the session automatically. Aims for the angles and ratio, with their sources: docs/form-targets.md. With --out, it also draws pose-moments-<clip>.jpg: three typical strokes at the catch, the finish and the knees starting to rise, with the skeleton and angles; add --seat SESSION.seat.csv for the lidar's seat position (--no-pictures to skip). On Windows it blocks sleep while it runs and uses Best performance when plugged in or on battery at --battery-min % (default 50) or more, Balanced below that or at 15 %, then puts your power mode back (--no-power-guard to leave both alone; closing the lid still sleeps)
tools/drive_flag.py Drive and recovery times from the pulley's drive flag in a sniff_pulley.py log
  • Pass-through. Every pulley notification is forwarded to the clone first, unchanged and in order; parsing works on a copy. The SmartRow app's writes go back to the pulley unchanged.
  • Who talks to the pulley. The pulley streams only after an init command, a $ poll every ~2 s and, on V3 firmware, a KEYLOCK challenge-response. The SmartRow app does that through the clone. While the app is not connected, the bridge does it, so a fitness app works on its own.
  • Stopping. After you stop, the pulley keeps repeating the last stroke's values; the bridge zeroes the live values when the pulley's "stopped" marker arrives or no new stroke comes for 6 s.

Tests (no Bluetooth needed): python -m unittest discover -s tests -t . - they replay a real 2½-minute capture (captures/sniff2.log).

SmartRow protocol notes (firmware V3.10)

Service 0x1234; 0x1235 write without response; 0x1236 read + notify. The pulley advertises its ID as manufacturer data under company id 0x1235 (the SmartRow app shows it as SmartRow-<id>).

What the SmartRow app needs from a clone (tested with the Android and iOS apps): the iOS app lists a device only if that manufacturer data is advertised, and after connecting it uses the service only if 0x1234, 0x1235 and 0x1236 are declared as 16-bit UUIDs. The Android app accepts a clone without the manufacturer data (it lists it as plain SmartRow) and with either UUID form.

Handshake: write $\rV@\r → version reply (SmartRow 'V3.10') → write # → KEYLOCK=… → answer → records stream at about 10 per second.

Records are 17 ASCII bytes: type, distance in metres (bytes 1-5, high nibble scrambled on V3), fields, hex checksum of bytes 0-13 (bytes 14-15), CR.

Record Fields
a elapsed time MMMSS [6:11]
c instantaneous W [6:9], average W×10 [9:14]
d strokes/min ×10 [6:9], stroke count [9:13]
e instantaneous split mss [6:9], average split [9:12]
f ! at [11] = rowing stopped
b work J×10 [6:11], stroke length cm [11:14]
x, y, z force curve: 8 samples each at [6:14], catch to finish (24 per stroke); sample = (code − !) × 16 N

The force curve of a stroke arrives as x, y, z, then that stroke's b record. The samples are spaced by distance, not time: over 2,952 strokes the last sample with force follows stroke length (correlation 0.97; about sample 17 at 100 cm, 20 at 120 cm) and not stroke rate, so the curve is force against handle position, about 5.8 cm per sample. The SmartRow app's CSV export holds exactly these values and nothing finer. The decoding matches a SmartRow app CSV export exactly (every force value is a multiple of 16 N), and the curve's integral over the stroke length comes within about 10 % of the b record's work. The c record's instantaneous power is the previous stroke's (the same lag shows in the app's CSV export), so the coach uses each stroke's own work × rate / 60 instead. None of this changes what is forwarded to the apps.

Optional: switch the Pi off from an iPhone

The Pi should be shut down before its power is cut. This sets up a button on your iPhone or iPad that does it with one tap, with no password and no SSH app. The phone gets a key that can do exactly one thing on the Pi: shut it down.

  1. Create the shortcut. In the Shortcuts app, tap +, add the action Run Script Over SSH, and fill it in:

    Field Value
    Host your Pi's name, e.g. raspberrypi.local
    Port 22
    User your user on the Pi, e.g. pi
    Authentication SSH Key
    Script sudo -n /usr/sbin/shutdown -h now

    Name the shortcut, e.g. Pi Off.

  2. Copy the phone's public key. In the same action, tap the SSH Key row and choose Copy Public Key. Get that line of text to the computer you use for SSH - for example paste it into a note or an e-mail to yourself. It starts with ssh-ed25519 or ssh-rsa. It is not a secret.

  3. Authorise it on the Pi. Over SSH, as your normal user (not with sudo):

    bash ~/smartrow-bridge/tools/setup_shutdown_shortcut.sh

    Paste the public key when it asks. It should end with OK: ... is allowed without a password.

  4. Try it. Tap the shortcut. The Pi's green LED blinks for a few seconds and then stays dark: now it is safe to cut the power. To have it on your home screen, use Add to Home Screen in the shortcut's menu.

What the script sets up on the Pi: a rule that lets your user run shutdown -h now without a password, and an entry in ~/.ssh/authorized_keys that forces the phone's key to run only that command - it cannot open a shell or do anything else. To remove it again, delete that line from ~/.ssh/authorized_keys and the file /etc/sudoers.d/010-<user>-shutdown.

The setup belongs to the SD card: after re-flashing the card or moving to a new one, run step 3 again with the same key. A second phone needs its own key: repeat all four steps on it.

Optional: a status screen on the Pi

Tested on a Raspberry Pi 4 (Raspberry Pi OS Lite, trixie) with a 2x20 riser header under the HAT.

Status screen: pulley, SmartRow app and PiRower all connected

A Pimoroni Display HAT Mini (2" screen, four buttons, an RGB LED) on the Pi's 40-pin header shows what the bridge is doing, and switches the Pi off without a phone:

  • Status: the pulley (waiting, connected, lost), and whether the SmartRow app and the fitness app are connected. The Pi's name and IP address are at the bottom; once the web page is set up, its address instead, by name and by IP address, ready to type into a tablet.
  • Rowing: watts, strokes per minute, pace and distance, with time and stroke count. With the interval coach on: watts, pace and stroke rate, and each stroke's force curve (blue) over your steady shape (grey line), as during efforts but without a cue, since steady rowing is the reference. It appears by itself when you start rowing and goes back to the status a minute after you stop. Button B switches between the two.
  • Switching off: hold button A for 2 seconds (you can let go once it says Switching off…). Unplug when the screen goes dark: it shows Safe to unplug for a moment at the very end, after the SD card has been closed, and goes dark as the Pi stops. The Pi's own green light may flash a few more times; that is fine. It does the same however the Pi is shut down (the iPhone shortcut, SSH). With uploads set up and a session still to go, holding A first finishes the session and uploads it, showing each service as it goes (Uploading, then off), then switches off by itself; A again switches off at once, B cancels. A service that can't be reached gets the session the next time the Pi is on.
  • Done: with the interval coach on, once you've rowed a session, hold button Y for a second when you're done. The session is saved as finished and uploaded straight away (instead of about seven minutes after the last stroke), and the screen shows Session finished with each upload as it goes; X closes it. Rowing again after that starts a new session.
  • Drills: rowing a drills or technique class? Hold button B for 2 seconds (a quick tap still switches screens). The session is still kept and uploaded to intervals.icu and Strava, named "Morning Row: drills", with "Worked on drills today. No force-curve analysis performed." in place of the coach's report: no efforts, no findings, nothing learned for later sessions, and it is left out of the Progress trends (its time and distance still count in the weekly totals). You can do it before you start (it applies to the session about to start), while rowing, or at the end before holding Y (or, without Y, within about 7 minutes of the last stroke, when it uploads by itself). Hold B again to undo. Forgot? Mark it afterwards and rewrite what was uploaded: sudo /opt/smartrow-bridge/venv/bin/python -m smartrow_bridge.uploads --drill SESSION (the session id, e.g. 2026-11-05T0603, from --status). intervals.icu keeps any efforts it had already marked.
  • Discard: rowed a warm-up you don't want kept? Hold button X for 2 seconds. The Pi deletes that session, so it is neither kept nor uploaded, and starts a new one when you row on. (A quick tap of X still brings back the interval summary.) The pulley's own metres, which the SmartRow app and the rowing screen show, reset when you start a new workout in the SmartRow app. If the session had already been uploaded, the screen says where, so you can delete it there.
  • Buttons: small tabs in the screen's corners show what each does: a power symbol on A, on B the screen it switches to and Hold: drills (DRILLS ON in amber once a session is marked), on X once there is an interval to look back at (or Hold: discard before then), and a tick on Y (Hold: end/submit) once there is a session to finish.
  • Pulley rest: after 10 minutes without rowing the bridge lets go of the pulley, which switches itself off about a minute later, saving its batteries (the status screen shows Resting - pull the handle). A pull of the handle wakes it and it reconnects within a few seconds, as from cold (for 90 s after letting go, while the pulley switches off, it isn't looked for). SRB_PULLEY_REST_S sets the time (0 = keep it connected).
  • Screen sleep: the screen goes dark after an hour with nothing happening: no rowing, no button, nothing newly connected, nothing left to upload. A connection that just stays up (Peloton left open on the iPad, the heart-rate strap) doesn't keep it on; something connecting wakes it. The LED stays on, so a dark screen with a lit LED is asleep, not switched off. Start rowing or press any button to wake it; the press that wakes it does nothing else. Change the time with SRB_DISPLAY_SLEEP_S in /etc/default/smartrow-bridge (0 = never).
  • LED: dim red while the bridge starts and waits for the pulley (or is not running), dim green when ready, and off while you row, until the screen goes back to the status.
  • Interval coach (experimental, off unless you turn it on): the screen shows each interval's force-curve feedback; button X brings back the last interval's summary. See the interval coach.

The screen is a separate service that only reads a status file the bridge writes, so the bridge works the same with or without it, and a problem with the screen cannot stop the bridge.

  1. Shut the Pi down, unplug it, and fit the HAT (a 2x20 riser header between the Pi and the HAT keeps it clear of the processor). The screen faces up, buttons A and B on the left.

  2. Update the bridge, then set up the screen:

    cd ~/smartrow-bridge && git pull && sudo bash install.sh
    sudo bash ~/smartrow-bridge/tools/setup_display.sh
    sudo reboot

    The reboot is needed once, to switch on the SPI interface the screen uses. It is switched on without its MISO (data-in) line, dtoverlay=spi0-2cs,no_miso in config.txt: the screen uses that pin, GPIO 9, for something else, and with the usual dtparam=spi=on the Pi won't let go of it, so the screen stays blank. After that, updating with install.sh keeps the screen up to date too.

  3. Check: sudo bash ~/smartrow-bridge/tools/health_check.sh has a Screen section. Log: journalctl -u smartrow-display -f.

To remove it: sudo bash ~/smartrow-bridge/tools/setup_display.sh --undo. To see the screens without the hardware: python3 -m smartrow_bridge.display --preview /tmp/screens (needs Pillow) saves them as images.

Optional: interval coach (experimental)

The coach is called PiRowingCoach: the Pi (PiRower to your apps) with a rowing coach on it. Its name is on the Strava description's first line and on every picture it makes.

Interval screen: watts, stroke rate and time, power zone bar, a stroke's force curve over the steady shape, a STRONGER FINISH cue and the heart-rate zone Interval summary: average force curve against steady, finish, length and peak

The pulley sends a force curve for every stroke (the SmartRow app draws it). The coach watches those curves for you while you row: it spots harder efforts by itself and tells you, in one word, when your stroke starts to slip during one. It shows on the screen and the web page.

Turning it on: add SRB_COACH=1 to /etc/default/smartrow-bridge, then sudo systemctl restart smartrow-bridge. (install.sh never overwrites that file, so an existing install needs the line added by hand.)

How it works. No buttons to press: the coach learns your steady rowing during the first minute or two, then treats any stretch clearly harder than that (20 % and 15 W above, for at least 8 strokes, by default) as an interval. Everything is judged against your own steady rowing in that session, so it works the same at 70 W or 250 W.

  • During an interval: time into the effort and watts (the same size), the force curve and one cue in large type. The force curve is drawn as in the SmartRow app: each stroke as it comes, over your steady shape (grey line, scaled to the same total force, so it compares shape, not size), with the force missing against steady filled in light grey. A fading finish shows as grey under the back of the curve, a late push as grey under the front, and a shorter stroke as a curve that ends before the steady one. The curve takes the cue's colour. The cue itself is judged over your last 8 strokes, so one odd stroke doesn't set it off. No percentages to read while you row; the numbers are in the summary afterwards.

    • LOOKS GOOD (green): the curve keeps your steady shape and length.
    • STRONGER FINISH (amber): less of the force comes in the back half of the drive than in your steady strokes: the pull fades before the end.
    • EARLIER PUSH (amber): the force builds later in the drive than in your steady strokes (where the curve's centre of force sits, at least 3 % of the drive later).
    • LONGER STROKES (amber): strokes clearly shorter than your steady ones (by 4 %, about 5 cm on a 120 cm stroke; 2.6 % at high sensitivity).
    • BETTER TRANSITION (amber): the force stalls just after the peak (falls, holds, falls again) on 4 of your last 8 strokes: a break in the handover after the peak. Let the phases overlap. The screens ring the stall on the curve (white on this stroke; grey where the recent ones stalled when this one didn't). Efforts only: at Easy force the pulley's 16 N steps can't tell a stall from rounding.

    The pulley measures force at fixed distances along the stroke (about every 5.8 cm), so a shorter stroke simply has fewer points. The finish and the push are measured against each stroke's own length, so a shorter stroke shows as LONGER STROKES only, not as a weaker finish too.

  • After an interval: for the next 5 strokes (at most 45 seconds; X brings it back), its duration and watts, its average force curve against your steady shape (the force missing against it filled in light grey), and three tiles: shape (STEADY, FADED or LATE, with small force and steady blocks), length and peak force. Underneath, the finish figure when it faded (FINISH −15% vs steady), or where the force peaked after a late push (LATE PUSH · peak 52%, steady 41%). The same summary goes into the session record, one line per interval.

On the summary, the grey line is scaled to the same total force as the coloured curve, so the picture compares where in the drive the force comes, not how much there is. The difference is real but small on a 2" screen, which is why the live screen shows the meter instead of the curve. The strokes just after an interval (recovery) and easy paddling never count towards your steady reference, and a new SmartRow app session starts over.

After the session. When you stop rowing (two minutes without a stroke), the bridge saves the session's summary on the Pi, in /var/lib/smartrow-bridge/sessions/ (the newest 60 are kept). The web page then shows Summary ready: time, distance, average and steady watts, a few plain sentences on what the coach saw (which intervals kept their shape, which went short and whether those were the longer ones, any fade within an effort, force arriving late, how steady the pace between efforts was), and each interval's average curve against your steady shape, with peak at: where in the drive the force peaks and how much that varies from stroke to stroke, against your steady rowing (an idea from Jaap van Ekris of Open Rowing Monitor). The pulley measures the force about every 5.8 cm of handle travel (24 points, of which a 115 cm stroke fills about 20), so a point is about 5 % of the drive and only a clear change is called out. Sessions lists earlier ones. Share turns the summary into a picture for the share sheet (Messages, email, ...), or saves it where the browser has no share sheet.

Shared session summary: totals, what the coach saw, and each interval's force curve against steady

With a heart rate strap connected to the bridge the summary also has heart rate: average and maximum, each interval's peak and how far it dropped in the minute after, and the drift of heart rate against power through the steady rowing (more beats for the same watts later in the session: fatigue, heat or not enough fuel). A session rowed before the coach was on can be added from its SmartRow CSV export, heart rate included: sudo python3 tools/coach_replay.py --save /var/lib/smartrow-bridge/sessions SESSION.csv.

Progress. From the summary, Progress shows the saved sessions over the last 4 or 12 weeks, 6 months or all of them, with a few sentences on what changed: distance per week, steady and interval power, the finish in intervals (efforts of 1:30 or more apart from shorter ones; within 5% of steady is the aim) and, with a strap, watts per heartbeat at steady pace, which rises as aerobic fitness does. Tap a session for its summary. The newest 500 sessions are kept.

To intervals.icu and Strava. Optionally, each session is uploaded as an activity of its own, much like a Garmin or Hammerhead head unit does it: stroke by stroke (power, stroke rate, distance, pace and, with a strap, heart rate), each interval the coach found as a lap, and the coach's summary as the description. See uploads.

Where it works, and where it doesn't yet. It was calibrated on one rower's sessions: steady rowing at about 21 spm with harder efforts of 1 to 3 minutes at the same rate. In that pattern it found every effort, none in steady-only sessions, and cued only the efforts that went short. Expect it to be less reliable with:

  • intervals with easy paddling between them (8 x 500 m with 2-minute paddles, say): the "steady" reference becomes the paddling stroke, whose curve is shaped differently, so the finish cue may speak up on good strokes;
  • rate changes (18 → 24 → 28 spm): higher rates naturally give shorter, more front-loaded curves;
  • pieces longer than 5 minutes: by default a rise in pace that long becomes the new steady pace instead of an interval (SRB_COACH_MAX_MIN raises the limit);
  • small steps (under 20 % above steady; SRB_COACH_START_PCT lowers the threshold).

The leg-drive cue is set well clear of anything in those sessions, as none had a weak leg drive; it has not yet been seen on one.

Intensity labels. Each stretch of rowing is labelled the way Peloton does: Recovery, Easy, Moderate, Challenging or Max. Your FTP is the middle of Challenging, as on Peloton's targets (FTP 185 W: Easy about 100 W, Moderate about 145 W), and the boundaries sit half-way between Peloton's targets:

Label % of FTP FTP 185 W
Recovery under 44 % under 81 W
Easy 44-67 % 81-124 W
Moderate 67-89 % 124-165 W
Challenging 89-113 % 165-209 W
Max 113 % and up 209 W and up

Without an FTP the same ratios are taken from your Easy power (Easy is 55 % of FTP).

Coaching in every interval but Recovery. Efforts (Moderate and up) are coached as above, against your Easy shape (the Easy rowing just before). Easy rowing is coached too, against your fresh Easy stroke: your Easy strokes from 2 to 8 minutes into a row (after the warm-up, whose strokes are shorter, and before you tire; efforts, Recovery and the strokes just after an effort left out). Each session saves it, and the next one (within a month) is judged against it from the start, shown in grey, so a finish that is weak from the first stroke or fades as you tire shows up. The first 2 minutes are the warm-up (warming up, no cues). With nothing saved, today's is learned instead. Stroke length is calibrated at 8 minutes: today's becomes the reference, unless it is more than 3 cm shorter than last time's; then last time's stays, so LONGER STROKES speaks up, and the summary says so. Recovery gets the numbers only. The summary adds how the last minutes of Easy rowing compared with the fresh ones. Later in the row, when your last 60 Easy strokes have faded against that fresh stroke (3 cm or more shorter, or the finish 8 % or more lighter), the banner says so in amber in place of LOOKS GOOD (Easy: strokes 4 cm shorter than at the start); it is a note, never in place of a cue, and a longer stroke or firmer finish says nothing. Each session file also saves every threshold the judgements used (thresholds), so a tuning change later doesn't make old sessions unreadable. (Efforts are not judged against the fresh stroke: your Easy stroke changes over a row, by up to 15 % in the finish, and against the early stroke a late effort that held the shape you were rowing at the time read as going short.)

BETTER TRANSITION. A fourth live cue, for a stall just after the peak: the force stops falling for a sample or two, then drops again. In efforts only, as the pulley's 16 N force steps are too coarse at Easy force (checked against each stroke's own smooth fit). It shows when 4 of the last 8 strokes have one (3 at high sensitivity: at a stall rate around 17 %, 3 of 8 happen by chance about one stroke in seven), and the summary counts it per effort against the Easy rowing before (flagged at 25 % of strokes and 15 points over Easy). Between 10 % and the flag it is reported as a small stall (in grey on the effort card, in the findings and the Strava effort lines), with how it moved through the effort by thirds; the card also shows your usual range, the middle half of your recent efforts' stall %. Coaching sources put dips like this at a handover, legs to back or back to arms; keeping the arms relaxed until the swing is nearly done tells which, and a video shows it. Spotted by Jaap van Ekris on a chart of one effort's strokes: in five sessions it sat at about 70 cm every day, on 3-6 % of Easy strokes and up to 46 % of an effort's.

Consistency. Each effort's summary also says how even its strokes were: how much each stroke's curve differs from the one before, and the spread of stroke length, against the Easy rowing just before. An effort is marked uneven when its strokes vary 1.4 times as much or more, or its length spreads twice as much (at least ±6 cm), and strokes cut more than 15 % short are counted. After Jaap van Ekris (Open Rowing Monitor), for whom smoothness and consistency matter most.

With your FTP. On its own the coach judges efforts against your recent Easy rowing, and has to treat anything longer than 5 minutes as a new Easy pace (otherwise a warm-up ramping into the main set could pass for one long effort), which cuts off longer efforts. With your rowing FTP, an effort is anything Moderate or harder (67 % of FTP and up), with no time limit: it lasts until you drop back to Recovery or Easy. On a 45-minute class (FTP 185 W: Easy rowing 98-109 W, efforts 130-150 W, the last one 6 minutes) this found all eight efforts, where without an FTP the six-minute one was taken for a new Easy pace. The summary then lists the intensity ranges in watts and each effort's label (no FTP: rowing doesn't really have one), and the uploaded activity marks the efforts as its work intervals. The FTP comes from intervals.icu by itself (your rowing sport settings), read once each time the bridge starts (so after changing it there, restart the Pi or sudo systemctl restart smartrow-bridge), or set SRB_COACH_FTP. To check what intervals.icu has: sudo /opt/smartrow-bridge/venv/bin/python -m smartrow_bridge.intervals --test.

Settings (in /etc/default/smartrow-bridge, all optional):

Setting Default Meaning
SRB_COACH_START_PCT 20 An interval is at least this % above your steady power (and 15 W)
SRB_COACH_MAX_MIN 5 Longest effort, in minutes, to count as an interval; longer is a new Easy pace (only without an FTP: with one there is no limit)
SRB_COACH_FTP empty: from intervals.icu Your rowing FTP in watts (the middle of Challenging). With it, intensities are labelled by % of FTP, and an effort is Moderate or harder (67 % and up) with no time limit. Empty: read from intervals.icu (Settings, Rowing, indoor FTP if set) each time the bridge starts, once uploads are set up; off: none
SRB_COACH_W_PRIME empty: from intervals.icu Your rowing W′ (J, or kJ under 1000): the work you can do above your FTP, taken as CP. With it the session card draws W′bal (Skiba’s model) and the summary says how low it went. Empty: read from intervals.icu (Settings, Rowing, W′) with the FTP; off: none
SRB_COACH_SENSITIVITY normal How readily the cues speak up: low, normal or high
SRB_SESSION_DIR /var/lib/smartrow-bridge/sessions Where session summaries are saved; off disables
SRB_HEART_RATE, SRB_HEART_RATE_TO_FITNESS off, 0 Heart rate strap read by the bridge, and whether it also goes to the fitness app (off: Peloton ignored the rowing data with it)
SRB_HEART_RATE_SENSOR, SRB_HEART_RATE_SENSOR_NAME 0, PiRower HR 1 = also appear as a heart-rate monitor relaying the strap, for the fitness app to pair instead of the strap
SRB_SEAT_SENSOR auto Seat sensor: auto (any USB serial device sending TF-Luna readings), off, or a port such as /dev/ttyUSB0
SRB_INTERVALS_KEY_FILE, SRB_INTERVALS_UPLOAD /etc/smartrow-bridge/intervals.key, activity intervals.icu API key (tools/setup_intervals.sh); upload the session as an activity, a calendar note, or off
SRB_STRAVA_FILE, SRB_STRAVA_SPORT_TYPE /etc/smartrow-bridge/strava.json, Rowing Strava authorization (tools/setup_strava.sh); activity type Rowing or VirtualRow

Try it on your own rowing first. Export a session from the SmartRow app as CSV and run it through the coach on any computer with Python 3.10 or later (nothing to install):

python3 tools/coach_replay.py 2026-10-24T100219_9392m.csv
python3 tools/coach_replay.py --start-pct 12 --sensitivity high *.csv    # try settings

It prints the intervals it finds, each interval's summary line, and how much of each interval each cue was showing, so you can see what it would have told you, and pick settings, before relying on it.

Optional: uploads to intervals.icu and Strava

With the interval coach on, the bridge can upload each session itself, so the SmartRow app's own Strava link is no longer needed:

  • intervals.icu: the session as an activity, named like "Morning Row", with "Rowed using SmartRow" as its description (so the calendar reads "Morning Row ~ Rowed using SmartRow"). Its intervals are the coach's efforts only (Moderate and harder), set through the API after the upload, so the Easy and Recovery rowing between them doesn't clutter the activity; leave intervals.icu's Use laps for intervals (Sport Settings, Rowing) off, or a later re-analysis puts every lap back. The files (FIT here, TCX to Strava, and so on to TrainerRoad) have a lap for each effort and one for the rowing between, marked as rest, so other tools see the work intervals too. To mark the efforts on an activity already there: sudo /opt/smartrow-bridge/venv/bin/python -m smartrow_bridge.intervals --mark-efforts SESSION i123456789 (the session as listed on the web page's Sessions, the activity id from its intervals.icu address). Each stroke also carries its force curve (with drive length, average and peak force and where the peak lands) as FIT developer fields, laid out as Open Rowing Monitor writes them, following the rowing industry's draft for force curves in FIT files; intervals.icu doesn't show force curves yet, but the data is there for when it, or another tool, does. intervals.icu treats activities that start within a minute of each other, with distance and time within 1%, as the same one, and an uploaded copy takes the place of the one from Strava (as Garmin and Hammerhead uploads do), so a session shows once, linked to Strava. Activities that come from Strava can't be changed through the intervals.icu API (Strava's terms), which is why the bridge uploads its own copy. SRB_INTERVALS_UPLOAD=note puts the summary on that day of your calendar as a note instead.
  • Strava: the same activity, type Rowing (indoor), with the coach's full report as its description. This needs your own Strava API application, which Strava offers to every account with a subscription; it stays in "single-player mode" (only your account can use it). Strava gets it as a TCX file naming no device, like the SmartRow app's own uploads. Strava doesn't show the name of a personal API application on the activity, so the description starts with "Rowed using SmartRow" instead. When authorizing, leave every box ticked: setting the type and the description after the upload needs "View data about your private activities" as well as "Upload". To rewrite activities already uploaded (after a coach update): sudo /opt/smartrow-bridge/venv/bin/python -m smartrow_bridge.uploads --update SESSION.
sudo bash ~/smartrow-bridge/tools/setup_intervals.sh     # your intervals.icu API key (Settings, Developer settings)
sudo bash ~/smartrow-bridge/tools/setup_strava.sh        # your Strava app's Client ID and Secret, then authorize once

The key and the Strava authorization are kept in /etc/smartrow-bridge/, readable by root only; Strava's access is renewed by the Pi itself. A session is uploaded about seven minutes after its last stroke (rowing again within five minutes continues the same session, so it waits until that can't happen), or straight away when you hold Y on the Pi's screen (Done); an intervals.icu note goes two minutes after. Uploads that fail (Pi offline, a service down) are retried every ten minutes, for up to a week; one session that fails doesn't hold up the others, and one a service turns down for good (a file it can't read) is marked "failed" in --status and only tried again with --send. Switching the Pi off with the screen's button or sudo poweroff saves the session there and then; if the power is simply cut, the session is still uploaded, minus at most its last five minutes. Each session is uploaded once; what went where is kept in its file:

cd /opt/smartrow-bridge
sudo venv/bin/python -m smartrow_bridge.uploads --status            # recent sessions and where each went
sudo venv/bin/python -m smartrow_bridge.uploads --send ID            # send a saved session now
sudo venv/bin/python -m smartrow_bridge.uploads --fit ID row.fit     # write its FIT file (intervals.icu's)
sudo venv/bin/python -m smartrow_bridge.uploads --tcx ID row.tcx     # write its TCX file (Strava's)

Only sessions rowed with the bridge after a service was set up are sent by themselves. Sessions added from CSV exports are never sent by themselves (they are usually there already); --send sends one on purpose.

Switching over from the SmartRow app's Strava link, one step at a time:

  1. Set up intervals.icu only, row a session, and check on intervals.icu that it shows once (the bridge's copy, with the coach's summary), not twice.
  2. Then set up Strava and, before the next session, switch off the SmartRow app's Strava link; otherwise Strava gets the session twice.

--undo on either setup script stops that service and deletes its credentials.

Optional: heart rate strap

The bridge can read a Bluetooth heart rate strap itself, on the same radio as the pulley: for the coach's session summaries and progress (above), on the screen and web page, and passed on to the fitness app with the rowing data. Straps that take several connections at once can stay paired with a watch or app as well (the COROS heart rate monitor takes three).

In /etc/default/smartrow-bridge, set SRB_HEART_RATE to auto (the first strap found advertising heart rate), part of the strap's name (COROS), or its MAC address (best where other people's straps are in range), then sudo systemctl restart smartrow-bridge. The strap is looked for once the pulley is connected, in short scans that leave the radio to the pulley in between; put it on to wake it. The heart rate stays out of the rowing data sent to the fitness app: with it in, Peloton showed only the heart rate and ignored pace, distance and stroke rate, so pair the strap with Peloton directly (the COROS takes three connections). SRB_HEART_RATE_TO_FITNESS=1 puts it in, for an app that wants it there. tools/health_check.sh has a Heart rate strap section.

Heart rate for the fitness app through the Pi. With SRB_HEART_RATE_SENSOR=1 the bridge also appears as a separate heart-rate monitor, PiRower HR, sending the strap's reading once a second in the standard heart-rate format. Pair Peloton's heart rate with PiRower HR instead of the strap: the strap then only talks to the Pi, which reconnects to it by itself, and Peloton doesn't compete for the strap's few connections (switching classes could leave Peloton unable to get the strap back, and its searching cost the rower connection mid-class). Nothing is sent while the strap is off or out of range. It needs SRB_HEART_RATE set (the bridge reading the strap) and leaves the rowing data as it is.

Optional: seat sensor (TF-Luna lidar)

A Benewake TF-Luna lidar behind the rails, aimed at a matte white target on the back of the seat, measures where the seat is about 100 times a second (0.2-8 m range; on the WaterRower about 34 cm at the finish to 119 cm at the catch). It goes on a USB-to-serial adapter (CH340 or similar, jumper on 3.3 V) into any of the Pi's USB ports. Wire by pin position, not colour (the colours vary between cables): lidar pin 1 (+5 V) to the adapter's 5V, pin 2 (RXD) to TXD, pin 3 (TXD) to RXD, pin 4 (GND) to GND; leave pins 5 (CFG) and 6 (MUX) unconnected (CFG open = serial).

Nothing to set: with the coach's session saving on, the bridge looks for it by itself (SRB_SEAT_SENSOR=auto) and logs Seat sensor: TF-Luna lidar on /dev/ttyUSB0. It can be plugged in or out at any time. Each session's readings are saved beside its strokes as <id>.seat.csv (t in seconds from the first stroke, as in the strokes file, then cm and strength; strength under 100 is unreliable); the newest 100 are kept. The readings are timed on the Pi with the same clock as the strokes, so seat position lines up with the pulley's force curves and drive flag.

With the coach on, the seat and the pulley's drive flag time each stroke part by part (smartrow_bridge/phases.py): the catch (the seat leaving the front), the handle taking load (flag on), legs flat (the seat at the back), the finish (flag off) and the knees rising (the seat starting forward). The drive (catch to finish) and recovery (finish to the next catch) are then measured rather than estimated: the rhythm bar shows the parts, and the session summary, the "Stroke parts" photo card and the Progress page report them. tools/phases_replay.py SESSION.strokes.json --csv OUT.csv works them out again from a saved session, for checking against video.

Film mode, for lining up a video with the pulley: while it is on, the Display HAT's LED lights full green while the drive flag is on (within a few milliseconds of each pulley record), and the screen shows a green FILM label. Turn it on before a filmed row and off after (a reboot also turns it off):

sudo touch /run/smartrow-bridge/film
sudo rm /run/smartrow-bridge/film

python3 -m smartrow_bridge.display --led-test (with smartrow-display stopped) shows each LED colour.

Optional: planned workouts (FIT files)

Row a planned workout, such as one built in intervals.icu, with its targets on the screen and web page. Needs the coach. Download the workout as a FIT file and copy it into the Pi's workouts folder, from a laptop:

scp Adrestia.fit pi@raspberrypi.local:/var/lib/smartrow-bridge/workouts/

Within a few seconds the bridge logs Workout Adrestia ready (... 11 steps, 30 min): it starts with your next stroke, and the screen shows READY: Adrestia. The workout starts with your first stroke. Then:

  • Screen and web page: the step (3/11), its target, your watts (average of the last 3 strokes) in green when within 5% of the target and amber when not, the time (or metres) left in the step, and the next step. During an effort the big clock counts down the step instead of up. The coach's cues carry on as usual.
  • Steps last a time or a distance; a step's time runs whether or not you are rowing. FIT repeats are unrolled. Targets are watts as written in the file; a target saved as a % of FTP becomes watts with your FTP.
  • Stroke rate: a step can also carry a stroke-rate range (a FIT cadence target, as the second target beside the power or on its own). Your rate (average of the last 3 strokes, whole strokes/min) then shows green inside the range and amber outside it, with the aim beside it; after the row each step gets its average rate against the range and the share of its strokes inside it (the Workout card's SPM column).
  • Heart rate (with a strap): your zone (from intervals.icu), heart rate and % of max over a zone bar.
  • Floating window, web page and Screen (as the SmartRow app): watts, strokes/min and pace (a workout step's time left; in an effort, its time) evenly spaced, each number over its label; watts in the colour of the intensity band they're in. Under them a power zone bar as on Peloton's screens: one equal segment per band (Recovery to Max), filled up to where you are, with each band's bottom in watts at its border. At the bottom, the heart-rate box over the same bar for your heart-rate zones (on the Screen, just above the button tabs). The live force curves carry a scale: faint lines every 200 N, up to the next 200 above the stroke's peak (at least 600). A rate target shows in the rate's label, amber when you're outside it. Watts are always on the left, time on the right. The floating window's Shape button cycles wide, tall and half (almost square, to fill half of a landscape tablet beside the SmartRow app).
  • After the row: each step's average power against its target (its first 8 s left out) and the share of its strokes within 5%, in the session's findings and on a Workout card; the session card draws the plan as a dashed line over your power.

The file moves to workouts/done/ as soon as the workout starts, so it runs once: copy it in again to repeat it. To cancel before rowing, delete it from the folder. One workout per session; for another, end the session first (hold Y). SRB_WORKOUT_DIR sets the folder (off turns this off).

Optional: a web page for phones and tablets

The screen's information, larger, on any phone or tablet on the same Wi-Fi as the Pi: live watts, pace and strokes per minute; with the coach on, the finish meter, the cue, the live force curve, each interval's summary, a list of this session's intervals, and afterwards the session summary and progress over weeks. Put it next to the SmartRow app in split screen on an Android tablet, or on a phone on the rower.

  1. Update the bridge, then set the page up:

    cd ~/smartrow-bridge && git pull && sudo bash install.sh
    sudo bash ~/smartrow-bridge/tools/setup_web.sh
  2. Open the address it prints, http://<pi name>.local:8080, or the IP address version if that doesn't load (Android does not always find .local names). The status screen shows both.

As an app, with the screen kept on (Chrome on Android). Over plain http:// on a home network, Chrome won't install the page as an app or let it keep the screen awake. To allow both on your own tablet, open chrome://flags/#unsafely-treat-insecure-origin-as-secure, type the page's addresses into the box, comma-separated (for example http://pirower.local:8080,http://192.168.1.23:8080, using the address you actually open), set it to Enabled and tap Relaunch. The page then shows screen stays on at the top while it holds the screen awake, and Chrome's menu can add it to the home screen. Chrome updates can reset flags now and then.

Full screen. Chrome makes a true installed app (no address bar) only for https addresses its servers can reach, which a Pi on a home network is not, so the home-screen icon still opens with the address bar. Tap Full screen at the top of the page to hide it (and the status bar), in split screen too; swipe from the top edge or tap Exit full screen to leave. Chrome doesn't keep it between visits, so it's one tap each time.

Float (shown where the browser supports it) puts a compact version in a floating Picture-in-Picture window, which stays on top of other apps, Peloton included. Whether it keeps updating while another app is in front depends on the browser; try it before relying on it.

Like the screen, the page is a separate service that only reads the bridge's status file. It is read-only, serves only on your local network and needs nothing beyond the Python already installed. To remove it: sudo bash ~/smartrow-bridge/tools/setup_web.sh --undo.

Optional: Peloton row classes, ranked by their class plans

tools/peloton_plans.py reads the class plans of Peloton's rowing classes (the pace levels the instructor calls, minute by minute) and the web page's Classes screen lists them: filter by length, instructor, class type, how much Challenging and Max, or title; order by an intensity worked out from the plan (each minute weighted by its level, like cycling's intensity factor), load, minutes at Challenging and Max, longest hard block, Max sprints, date or members' rating; find classes like one you liked; and pair two classes into a longer row at a chosen intensity. Each class is drawn as its skyline: the plan from start to finish, each bar's height and colour its level.

It uses Peloton's unofficial members API with your own sign-in, so run it yourself on the Pi:

cd ~/smartrow-bridge
python3 tools/peloton_plans.py fetch --minutes 60 45 30 20   # first time: about 25 min, resumable
python3 tools/peloton_plans.py index                         # the Classes screen appears on the page
python3 tools/peloton_plans.py update                        # weekly: new classes, then the index

Classes you've taken show "✓ Taken 2× · 1 Nov: your session ›" (from your Peloton workout history, linked to the Pi's own session of that row when the start times match), and classes you've bookmarked in the Peloton app a ★; the Classes screen can filter on both and order by recently taken. update (or history) reads your workout history.

Drill and technique classes: python3 tools/peloton_plans.py drills (no token) lists them from the cached catalogue at every length, with the form point each seems to train (recovery order, finish and layback, catch and reach, rhythm and ratio, legs and drive) and the title words of the other short classes, to spot names it missed; it writes peloton-report/drills.csv. fetch --drills then downloads only their plans. After index, the Classes screen lists them as the "Form & drills" class type (Peloton's Form & Drills and Intro to Form classes, kept from 5 min although other classes start at 20), with a filter for the part of the stroke the title names (the recovery, catch, drive or finish). The two-class builder can start with a drill class (any, or one part of the stroke) followed by a full class: the second follows the class type chosen above, any type while that is Form & drills. Choosing Form & drills (and a part) sets the builder to start with that drill. Form Fixer (a full workout with two instructors correcting form as you row) is its own class type. segments (no token) prints the form classes' own outline from the cache: each part's name, which parts Peloton flags as drills, and blocks the outline calls that the pace plan (the skylines) leaves out; it writes peloton-report/segments.csv. After index, each skyline shades the outline's drill stretches in violet ("drill" in the key) and runs from the start of rowing to its end (the class video's intro is left out, and the last minute is no longer cut off). Stroke Rate Rows ("15 min Stroke Rate Row: 24 SPM", and Intro to Stroke Rate): fetch --refresh --title "stroke rate" lists the catalogue again and downloads just those (any length; --title takes any text), then index. They are the "Stroke rate" class type, kept from 5 min, with a filter by the rate each one holds.

Staying signed in (no token to copy): once, run python3 tools/peloton_auth.py setup and paste your Peloton sign-in (how to get it is in the script's help: a private browser window, one line in the console, then close the window without signing out). It is a refresh token: the Pi swaps it for a new 48-hour token whenever it needs one and saves the replacement Peloton sends back. It is kept in ~/.config/smartrow-bridge/peloton-auth.json, readable by you only, never printed and left out of backups. python3 tools/peloton_auth.py test checks it; forget deletes it.

With it, two timers (installed by install.sh) keep the Classes page current:

  • after each row (checked every 15 minutes, once the row's file is 10 minutes old): your workout history, so the class shows as taken, and the index;
  • weekly (Sunday early morning): new classes (one request a second), your history and the index.

The Classes page shows when each was last updated. If Peloton stops accepting the sign-in (left unused too long, or signed out), the page says so and the timers stop trying until setup is run again. systemctl list-timers 'smartrow-peloton*' shows them; journalctl -u 'smartrow-peloton@*' their log.

Without a saved sign-in (or with --ask), fetch, history and update ask for a token (hidden; never printed or saved): sign in at members.onepeloton.com, press F12, Network, reload, filter on api.onepeloton, click a me request, and copy the value of its authorization header after Bearer . It lasts 48 hours. The downloaded plans stay in peloton-cache, the index in /var/lib/smartrow-bridge/peloton (made by install.sh). analyse writes a report of how long each level is called (see the script's help). Keep the data for yourself: it is Peloton's.

Backing up the Pi

Rows, settings and the Pi's own changes live only on the Pi. tools/backup_pi.sh packs them into one dated file (no sudo needed), never with the intervals.icu key, Strava tokens, saved Wi-Fi passwords or SSH keys:

bash ~/smartrow-bridge/tools/backup_pi.sh            # --no-peloton leaves out the Peloton class cache

It keeps the last 5 in ~/smartrow-backups. Copy the newest to a computer, e.g. from a Windows folder:

mkdir pi-backup
scp pi@192.168.100.106:"~/smartrow-backups/pi-backup-*.tar.gz" pi-backup\

MANIFEST.txt inside says what the code was (commit, any local edits, saved as a diff) and lists every file. To restore rows: unpack and copy data/smartrow-bridge/sessions back to /var/lib/smartrow-bridge/ (sudo).

Optional: faster start-up

The bridge works without this. It shortens the time from power-on to the bridge being visible by about 7 s on a Pi 4 (roughly 26 s to 19 s, measured with a Bluetooth scanner) by changing the Pi's own boot settings.

  1. Apply the settings and reboot:

    sudo bash ~/smartrow-bridge/tools/faster_startup.sh
    sudo reboot
  2. After the reboot, pull the handle, then check that the bridge is running as before:

    sudo bash ~/smartrow-bridge/tools/health_check.sh

To see the gain yourself, run this before step 1 and again after step 2. The number in square brackets is the time in seconds from the start of Linux to the bridge being ready and looking for the pulley (about 7 s on a Pi 4 with these settings). It only means something after a normal power-on or reboot, not in the session in which you ran the installer.

journalctl -u smartrow-bridge -b -o short-monotonic | grep -m1 "Scanning"

What the script changes:

Where Change Effect
/boot/firmware/config.txt boot_delay=0, disable_splash=1, camera_auto_detect=0, display_auto_detect=0 No firmware pause, splash screen or probing for cameras and displays
/boot/firmware/config.txt auto_initramfs=0 Skips loading the initramfs (not needed to boot from the SD card)
/etc/initramfs-tools/conf.d/smartrow-bridge-speedup MODULES=most Keeps kernel and driver updates working with auto_initramfs=0. Without it, rebuilding the unused initramfs fails ("failed to determine device for /") and takes the update with it
/boot/firmware/cmdline.txt adds cloud-init=disabled The first-boot configuration service no longer runs on every boot (about 2 s)
Bootloader (Pi 4 only) NET_INSTALL_AT_POWER_ON=0 No wait for a keyboard at power-on. Stored on the Pi's board, not on the SD card

Things to know:

  • Do it after the install works. The Wi-Fi, user and SSH settings from Raspberry Pi Imager are applied by cloud-init on the first boot. Once that has happened they stay; with cloud-init off the Pi only stops reading the Imager's set-up files on the card, so editing those files later has no effect until you undo.
  • SSH may answer a little later than the bridge. The bridge is ready about 10 s after Linux starts, the Wi-Fi about 10 s after that, and your computer may need longer still to find the Pi by name. That is the same with or without these settings.
  • A new camera or DSI display would no longer be detected automatically.
  • Applied with an earlier version of the script? Run it again (it is safe to repeat) to add the initramfs setting, then sudo dpkg --configure -a to finish any update that already failed. sudo dpkg --audit prints nothing when all is well.
  • Undo: sudo bash ~/smartrow-bridge/tools/faster_startup.sh --undo, then reboot. If the screen is set up, the undo keeps its SPI line (dtoverlay=spi0-2cs,no_miso) in config.txt.
  • If the Pi does not start afterwards: both files are on the SD card's boot partition, which any computer can read. Put the card in a computer, copy config.txt.before-speedup back over config.txt, and delete the words cloud-init=disabled from the end of cmdline.txt.

Acknowledgements

The SmartRow protocol knowledge here - service and characteristic IDs, the init command, the record layout and the V3 KEYLOCK handshake - comes from qdomyos-zwift by Roberto Viola, in particular src/devices/smartrowrower/smartrowrower.cpp; keylock_response() is a Python port of its calculateSmartRowV3ChallengeResponse(). If you want a rower (or bike, treadmill…) bridge that runs on your phone, with far wider device support, use QZ.

The findings from this project (record checksum, elapsed-time format, stop marker) and a draft "virtual SmartRow" profile were offered back to QZ; the patches are in contrib/qz-virtual-smartrow/.

Built on bleak and Bumble; activity files are written with fit-tool (Stages Cycling). The COROS strap's slow accept when it already serves other receivers was found in Grupetto.

Licence

GPL-3.0 - see LICENSE. You may use, change and redistribute it; distributed versions must stay under the same licence.

About

Raspberry Pi bridge: use a SmartRow pulley with the SmartRow app and FTMS fitness apps (Peloton) at the same time.

Topics

Resources

Stars

2 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages