All Projects → inonoob → pirowflo

inonoob / pirowflo

Licence: GPL-3.0 License
All-in-one data interface for your Waterrower S4 Monitor or Smartrow

Programming Languages

python
139335 projects - #7 most used programming language
shell
77523 projects

Projects that are alternatives of or similar to pirowflo

Bleu
BLE (Bluetooth LE) for U🎁 Bleu is the best in the Bluetooth library.
Stars: ✭ 481 (+558.9%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
ruuvitag-demo
Demo of reading Bluetooth Low Energy sensor measurements of RuuviTag environmental sensors and feeding them to MQTT, a database and dashboards
Stars: ✭ 14 (-80.82%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Extendable
Blocks Based Bluetooth LE Connectivity framework for iOS/watchOS/tvOS/OSX. Quickly configure centrals & peripherals, perform read/write operations, and respond characteristic updates.
Stars: ✭ 88 (+20.55%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Nimble Arduino
A fork of the NimBLE library structured for compilation with Ardruino, designed for use with ESP32.
Stars: ✭ 108 (+47.95%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
BleLab
Bluetooth LE Lab - UWP application for interaction with BLE GATT devices
Stars: ✭ 68 (-6.85%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Ios Pods Dfu Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 349 (+378.08%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Ble.net
Cross-platform Bluetooth Low Energy (BLE) library for Android, iOS, and UWP
Stars: ✭ 137 (+87.67%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
IOS-DFU-Library
OTA DFU Library for Mac and iOS, compatible with nRF5x SoCs
Stars: ✭ 400 (+447.95%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Angular Web Bluetooth
The missing Web Bluetooth module for Angular
Stars: ✭ 164 (+124.66%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Node Ble
Bluetooth Low Energy (BLE) library written with pure Node.js (no bindings) - baked by Bluez via DBus
Stars: ✭ 159 (+117.81%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Easyble
Android BLE framework
Stars: ✭ 155 (+112.33%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
py-bluetooth-utils
Python module containing bluetooth utility functions, in particular for easy BLE scanning and advertising
Stars: ✭ 60 (-17.81%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
Gatt Python
Bluetooth GATT SDK for Python
Stars: ✭ 233 (+219.18%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
PiBeacon
Low-cost iBeacon using Raspberry Pi
Stars: ✭ 41 (-43.84%)
Mutual labels:  bluetooth, bluetooth-low-energy, bluetooth-le
cordova-posprinter-sample
Cordova/Inoic sample for Epson ESC/POS printer
Stars: ✭ 24 (-67.12%)
Mutual labels:  bluetooth, bluetooth-low-energy
GATT
Bluetooth Generic Attribute Profile (GATT) for Swift (Supports Linux)
Stars: ✭ 48 (-34.25%)
Mutual labels:  bluetooth, bluetooth-low-energy
python-sonicare
Python library to communicate with a Phillips Sonicare toothbrush via Bluetooth Low Energy
Stars: ✭ 46 (-36.99%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluetooth-manager
Java Bluetooth Manager. A library/framework for managing bluetooth adapters, bluetooth devices, GATT services and characteristics
Stars: ✭ 75 (+2.74%)
Mutual labels:  bluetooth, bluetooth-low-energy
awesome-bluetooth-security
List of Bluetooth BR/EDR/LE security resources
Stars: ✭ 220 (+201.37%)
Mutual labels:  bluetooth, bluetooth-low-energy
bluetooth
Android Bluetooth examples
Stars: ✭ 80 (+9.59%)
Mutual labels:  bluetooth, bluetooth-le

PiRowFlo for Waterrower

19.02.2022: SmartRow with version 3.00 has been seen in the wild. This smartrow version is NOT working with PiRowFlo! SmartRow has introduced a new checksum methode to lockout third parties. That means the Pi can't talk to the SmartRow! New protocol fully understood. Implementation needed! :) 14.11.2021: fixed pip install issue with pyusb in requirements.txt


Read the LICENCE first, by using this software you agree to the licence.

News 13.02.2021

  • Case is still in Prototype stage

Supported Apps S4 Monitor (23.02.2021)

Kinomap (BLE) Cityrowgo (BLE) waterrower connect (BLE) Coxswain (BLE) 7.9 or higher Holofit
Android test pending ✔️ devs need to update app ✔️ ✔️
iOS test pending ✔️ ✔️ - ✔️

Supported Apps SmartRow (23.02.2021)

Kinomap (BLE) Cityrowgo (BLE) waterrower connect (BLE) Coxswain (BLE) 7.9 or higher Holofit
Android test pending test pending devs need to update app ✔️ ✔️
iOS test pending ✔️ ✔️ - ✔️

Supported Watches (14.01.2021)

Watch model Navtive rowing App ErgIQ
Fenix 6 ✔️ currently not

Project Overview

Features

  • Read Serial Waterrower Data to the Pi
  • Read SmartRow data to the Pi via bluetooth (for pi 3,4 and Zero W internal bluetooth + USB Bluetooth dongle needed - for pi 1,2,3 without internal bluetooth 2 USB bluetooth dongle from different brands are needed)
  • Send Waterrower Data from the Pi over Bluetooth (Build-in or USB-dongle)
  • Send Waterrower Data from the Pi over Ant+ via Ant+ dongle

Motivation

I wanted to have the ability to use the Android App Coxswain and also my Garmin smartwatch. Therefore, I though why not connect the Waterrower via USB to a Raspberry pi and let the Raspberry pi being a BLE and Ant+ transmitter. And wouldn't be even better if it could be control for the Webbrowser. And Last but not least, have at the end of the training a FIT file for Garmin connect or Strava.

With a high demand from people having the Smartrow, I thought why not trying to integrate it as input interface for this project. So it would be either S4 Monitor or Smartrow

Target of the project

Requirements

Hardware

Bill of Material(BOM)

Item for Raspberry pi 1,2,3
Raspberry Pi
Micro SD card
Mini USB to USB typ A
Bluetooth USB dongle (not 5.0) (LogiLink BT0015)
Micro USB to Typ A
5V USB power supply 2A
for Ant+ addition
Ant+ dongle (avoid CYCPLUS)
for Smartrow
Bluetooth USB dongle (not 5.0) (LogiLink BT0015)
Bluetooth USB dongle (not 5.0) (Mandatory to be different brand)
Item for Raspberry pi 3,4
Raspberry Pi
Micro SD card
Mini USB to USB typ A
5V USB power supply 2A
for Ant+ addition
Ant+ dongle (avoid CYCPLUS)
for Smartrow
Bluetooth USB dongle (not 5.0) (LogiLink BT0015)
Bluetooth USB dongle (not 5.0) (Mandatory to be different brand)

Item for Raspberry pi Zero W
Raspberry Pi Zero W
Micro SD card
Mini USB to Micro USB
5V USB power supply 2A
for Ant+ addition
Ant+ dongle (avoid CYCPLUSe)
Micro USB to USB Hub
for Smartrow
Bluetooth USB dongle (not 5.0) (LogiLink BT0015)
Bluetooth USB dongle (not 5.0) (Mandatory to be different brand)

I would recommend buying the Raspberry pi in a kit where most of the parts are included

Software

Installation

On a fresh installed Raspbian, git must be installed first

sudo apt-get install git

Clone the repo from Github:

git clone https://github.com/inonoob/pirowflo.git 

go into the folder:

cd pirowflo 

make install.sh executable:

sudo chmod +x install.sh

execute install.sh in order to setup everything: (This can take 5 - 10 min to set all up). If during the first installation you hadn't have your Ant+ dongle. Just re-run the script and it will install the missing Ant+ and udev profiles.

sudo ./install.sh 

Once installation and reboot complete, go into the pirowflo/src folder

cd /home/pi/pirowflo/src

Getting Started

Start PiRowFlo from the webserver which is available under the:

http://"raspberry-pi-IP":9001

or

Use the Screen to start PiRowFlo

or

start PiRowFlo from console

If the script waterrowerthreads is started with -h or --help it shows the available option for the program

python3 waterrowerthreads.py -h

usage: waterrowerthreads.py [-h] [-i {s4,sr}] [-b] [-a]

Python script to broadcast waterrower data over BLE and ANT

  PiRowFlo for Waterrower
                                                             +-+
                                           XX+-----------------+
              +-------+                 XXXX    |----|       | |
               +-----+                XXX +----------------+ | |
               |     |             XXX    |XXXXXXXXXXXXXXXX| | |
+--------------X-----X----------+XXX+------------------------+-+
|                                                              |
+--------------------------------------------------------------+

To begin choose an interface from where the data will be taken from either the 
S4 Monitor connected via USB or the smartrow pulley via bluetooth low energy

Then select which broadcast methode will be used. Bluetooth low energy or Ant+ or both.

e.g. use the S4 connected via USB and broadcast data over bluetooth and Ant+

python3 waterrowerthreads.py -i s4 -b -a

optional arguments:
  -h, --help            show this help message and exit
  -i {s4,sr}, --interface {s4,sr}
                        choose  Waterrower interface S4 monitor: s4 or Smartrow: sr
  -b, --blue            Broadcast Waterrower data over bluetooth low energy
  -a, --antfe           Broadcast Waterrower data over Ant+

For example if the Waterrower should send data over Bluetooth and ANT

python3 waterrowerthreads.py -i s4 -b -a 

Manual update

The PiRowFlo autoupdate function is not yet implemented. Therefore, we recommend to perform the update as follows:

git pull https://github.com/inonoob/pirowflo.git 

And then start the installation script again

sudo ./install.sh 

FAQ


I got the error:

serial open error waiting

if that is the case, check if your $USER belongs to the group "dialout"

pi@raspberrypi:/dev $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev gpio i2c spi

if you don't see the "dialout", then your $USER needs to be add to this group

sudo usermod -a -G dialout $USER 

Then you need to log out or reboot that it takes effect.


I can't connect with the app Coxswain:

It is only working with Coxswain version higher 7.9. as the low version haven't the improved connectivity code for bluetooth.


If you see this kind of error in the console you

2021-01-16 19:59:14,341 - fakesmartrowble - CRITICAL - Failed to register advertisement: org.bluez.Error.Failed: Failed to register advertisement
Exception in thread Thread-2:
Traceback (most recent call last):
  File "/usr/lib/python3.7/threading.py", line 917, in _bootstrap_inner
    self.run()
  File "/usr/lib/python3.7/threading.py", line 865, in run
    self._target(*self._args, **self._kwargs)
  File "fakesmartrowthreads.py", line 51, in FakeSmartRowBLE
    FakeSmartRowBLE()
TypeError: 'NoneType' object is not callable

That means what a client is still connect with the Raspberry pi and must be disconnect first before restarting the service. So check on your smartphone or tablet is a connection is still active. The simplest thing to fix is to close the app and then try again.


if you see this kind of error in the console:

pi@raspberrypi:~/pirowflo/src $ python3 waterrowerthreads.py -i s4 -b -a 
2021-02-15 06:57:00,481 - __main__ - INFO - inferface S4 monitor will be used for data input
2021-02-15 06:57:00,489 - __main__ - INFO - Waterrower Interface started
2021-02-15 06:57:00,491 - __main__ - INFO - no interface selected
2021-02-15 06:57:00,504 - __main__ - INFO - Start BLE Advertise and BLE GATT Server
2021-02-15 06:57:00,528 - __main__ - INFO - Start Ant and start broadcast data
start search for dongle
2021-02-15 06:57:00,585 - dbus.proxies - ERROR - Introspect error on :1.5:/: dbus.exceptions.DBusException: org.freedesktop.DBus.Error.AccessDenied: Rejected send message, 2 matched rules; type="method_call", sender=":1.15" (uid=1000 pid=627 comm="python3 waterrowerthreads.py -i s4 -b -a ") interface="org.freedesktop.DBus.Introspectable" member="Introspect" error name="(unset)" requested_reply="0" destination=":1.5" (uid=0 pid=369 comm="/usr/lib/bluetooth/bluetoothd ")
2021-02-15 06:57:00,985 - waterrowerinterface - WARNING - port not found retrying in 5s
Exception in thread Thread-4:

that means that the current user is not in the group "bluetooth". The used to be a bug in the install.sh. But you can also add it manually with the following command:

sudo usermod -a -G bluetooth pi 

This command run as sudo will add the user "pi" to the group "bluetooth". Then reboot in order to take effect. This should fix the issue.

In order to check if it had worked, use the following command:

pi@raspberrypi:~/pirowflo $ groups
pi adm dialout cdrom sudo audio video plugdev games users input netdev bluetooth gpio i2c spi

If you can connect to the PI with your third party app and don't get any data also don't get any data to your watch via ant+ then there is a high chance that the connection between S4 Monitor and the Rasbperry pi is not working correctly.

  • Check if you have heard the reset "BEEP" from the S4 Monitor. If not that means that the connection is not correct try to unplug and replug it in.
  • Check the usb cable first. Try a different one. Cheap one tend to break as you need to plug and unplug it.

Parts of the code based on following Repos:

  • Link to repo base code used to get the Waterrower Data over USB Interface
  • Link to repo base code for the BLE GATT server and Advertiser example which is self based on the Bluez Gatt server example
  • Link to repo base code for the Ant+ part used for this project
  • Link to repo base code for the Screen part used for this project

Those Repos with some of their code are used as base code which then have been rewritten to meet the requirements of this project.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].