Skip to content

Latest commit

 

History

History
63 lines (47 loc) · 3.95 KB

README.md

File metadata and controls

63 lines (47 loc) · 3.95 KB

ANT+ Virtual Power Meter

Overview

This project implements "virtual power" for bicycle turbo trainers where the trainer or the attached bike has an ANT+ speed sensor. The calculated power is broadcasted as such on ANT+ (using python-ant) so that any head unit or app will see it as a power meter.

This version (forked from vpower by Darren Hague) is adapted to run on Windows.

The bot version is for testing purposes, you can set the power value in a slider.

The heartrate version broadcasts power based on heart rate, set the values in the file zones.csv

The cadence version broadcasts power based on cadence, set the values in the file cadence.csv

The row version supports the Concept2 Rowing Ergometer (uses PyRow). Thanks Jonathan Colledge for testing and debugging.

Even if the receiver app runs on the same computer, you will need two ANT+ sticks, because one device can't be used by two apps simultaneously.

Currently supported trainers:

It is easy to add a new trainer - just subclass AbstractPowerCalculator and implement the method power_from_speed(revs_per_sec). If your trainer is not there, please add it and submit a pull request.

Supported devices:

Warning: the Cycplus ANT Stick is not compatible, even though it uses the same Vendor ID and Product ID (0fcf:1008) as the ANTUSB2 Stick.

Running on Windows

  • Download the standalone executable
  • Configure speed sensor, power calculator and wheel circumference in vpower.cfg
    • You can leave speed_sensor_id as zero if there's only one sensor around
    • If using LinearInterpolationPowerCalculator set speed and power values in the file curve.csv
  • Install the libusb-win32 driver for the ANT+ device (if not already installed), it can be easily done using Zadig
    • Options - List All Devices
    • Select ANT+ stick
    • Select libusb-win32 driver and click Replace Driver
  • If using the row version, install the libusb-win32 driver for the rower too
  • Run the downloaded executable

Running from source code (Windows, Linux, macOS)

  • Install Python 3 if not already installed
    • Check "Add Python to PATH" or use the full path in the commands below
  • Clone or download this repo
  • CD to the repo directory and run pip install -r requirements.txt
    • On Linux and macOS use pip3 instead of pip
  • [Optional] Run pip install pywin32 (Windows only, to stop the ANT node on terminal window close)
  • Run python vpower.py (or double click vpower.py if you installed the Python Launcher)
    • On Linux and macOS use python3 instead of python