pycycling package¶
Subpackages¶
- pycycling.data package
- pycycling.ftms_parsers package
Submodules¶
- pycycling.battery_service module
- pycycling.cycling_power_service module
- Example
CyclingPowerFeature
CyclingPowerFeature.accumulated_energy_supported
CyclingPowerFeature.accumulated_torque_supported
CyclingPowerFeature.chain_length_adjustment_supported
CyclingPowerFeature.chain_weight_adjustment_supported
CyclingPowerFeature.crank_length_adjustment_supported
CyclingPowerFeature.crank_rev_supported
CyclingPowerFeature.cycling_power_measurement_content_masking_supported
CyclingPowerFeature.dead_spot_angles_supported
CyclingPowerFeature.distribute_system_support
CyclingPowerFeature.enhanced_offset_compensation_supported
CyclingPowerFeature.extreme_magnitudes_supported
CyclingPowerFeature.factory_calibration_date_supported
CyclingPowerFeature.instantaneous_measurement_direction_supported
CyclingPowerFeature.multiple_locations_supported
CyclingPowerFeature.offset_compensation_supported
CyclingPowerFeature.pedal_power_balance_supported
CyclingPowerFeature.sensor_measurement_context
CyclingPowerFeature.span_length_adjustment_supported
CyclingPowerFeature.wheel_rev_supported
CyclingPowerMeasurement
CyclingPowerMeasurement.accumulated_energy
CyclingPowerMeasurement.accumulated_torque
CyclingPowerMeasurement.bottom_dead_spot_angle
CyclingPowerMeasurement.cumulative_crank_revs
CyclingPowerMeasurement.cumulative_wheel_revs
CyclingPowerMeasurement.instantaneous_power
CyclingPowerMeasurement.last_crank_event_time
CyclingPowerMeasurement.last_wheel_event_time
CyclingPowerMeasurement.maximum_force_magnitude
CyclingPowerMeasurement.maximum_torque_magnitude
CyclingPowerMeasurement.minimum_force_magnitude
CyclingPowerMeasurement.minimum_torque_magnitude
CyclingPowerMeasurement.pedal_power_balance
CyclingPowerMeasurement.top_dead_spot_angle
CyclingPowerService
CyclingPowerService.disable_cycling_power_measurement_notifications()
CyclingPowerService.disable_cycling_power_vector_notifications()
CyclingPowerService.enable_cycling_power_measurement_notifications()
CyclingPowerService.enable_cycling_power_vector_notifications()
CyclingPowerService.get_cycling_power_feature()
CyclingPowerService.get_sensor_location()
CyclingPowerService.set_cycling_power_measurement_handler()
CyclingPowerService.set_cycling_power_vector_handler()
CyclingPowerVector
DistributeSystemSupport
InstantaneousMeasurementDirection
SensorLocation
SensorLocation.chain_ring
SensorLocation.chainstay
SensorLocation.chest
SensorLocation.front_hub
SensorLocation.front_wheel
SensorLocation.hip
SensorLocation.in_shoe
SensorLocation.left_crank
SensorLocation.left_pedal
SensorLocation.other
SensorLocation.rear_dropout
SensorLocation.rear_hub
SensorLocation.rear_wheel
SensorLocation.right_crank
SensorLocation.right_pedal
SensorLocation.spider
SensorLocation.top_of_shoe
SensorMeasurementContext
- pycycling.cycling_speed_cadence_service module
- pycycling.fitness_machine_service module
- Example
FitnessMachineService
FitnessMachineService.disable_control_point_indicate()
FitnessMachineService.disable_fitness_machine_status_notify()
FitnessMachineService.disable_indoor_bike_data_notify()
FitnessMachineService.disable_training_status_notify()
FitnessMachineService.enable_control_point_indicate()
FitnessMachineService.enable_fitness_machine_status_notify()
FitnessMachineService.enable_indoor_bike_data_notify()
FitnessMachineService.enable_training_status_notify()
FitnessMachineService.get_fitness_machine_feature()
FitnessMachineService.get_supported_power_range()
FitnessMachineService.get_supported_resistance_level_range()
FitnessMachineService.request_control()
FitnessMachineService.reset()
FitnessMachineService.set_control_point_response_handler()
FitnessMachineService.set_fitness_machine_status_handler()
FitnessMachineService.set_indoor_bike_data_handler()
FitnessMachineService.set_simulation_parameters()
FitnessMachineService.set_spin_down_control()
FitnessMachineService.set_target_heart_rate()
FitnessMachineService.set_target_incline()
FitnessMachineService.set_target_power()
FitnessMachineService.set_target_resistance_level()
FitnessMachineService.set_target_speed()
FitnessMachineService.set_targeted_cadence()
FitnessMachineService.set_targeted_distance()
FitnessMachineService.set_targeted_expended_energy()
FitnessMachineService.set_targeted_number_of_steps()
FitnessMachineService.set_targeted_number_of_strides()
FitnessMachineService.set_targeted_time_in_five_heart_rate_zones()
FitnessMachineService.set_targeted_time_in_three_heart_rate_zones()
FitnessMachineService.set_targeted_time_in_two_heart_rate_zones()
FitnessMachineService.set_targeted_training_time()
FitnessMachineService.set_training_status_handler()
FitnessMachineService.set_wheel_circumference()
FitnessMachineService.start_or_resume()
FitnessMachineService.stop_or_pause()
SupportedPowerRange
SupportedResistanceLevelRange
- pycycling.heart_rate_service module
- pycycling.rear_view_radar module
- pycycling.rizer module
- pycycling.sterzo module
- pycycling.tacx_trainer_control module
- Smart trainer modes of operation
- Example
CommandStatus
CommandStatusData
EquipmentType
FEState
GeneralFEData
RoadSurface
SpecificTrainerData
SpecificTrainerData.accumulated_power
SpecificTrainerData.fe_state
SpecificTrainerData.instantaneous_cadence
SpecificTrainerData.instantaneous_power
SpecificTrainerData.lap_toggle
SpecificTrainerData.power_calibration_required
SpecificTrainerData.resistance_calibration_required
SpecificTrainerData.target_power_limits
SpecificTrainerData.trainer_status
SpecificTrainerData.update_event_count
SpecificTrainerData.user_configuration_required
TacxTrainerControl
TacxTrainerControl.disable_fec_notifications()
TacxTrainerControl.enable_fec_notifications()
TacxTrainerControl.request_data_page()
TacxTrainerControl.set_basic_resistance()
TacxTrainerControl.set_command_status_data_page_handler()
TacxTrainerControl.set_general_fe_data_page_handler()
TacxTrainerControl.set_neo_modes()
TacxTrainerControl.set_specific_trainer_data_page_handler()
TacxTrainerControl.set_target_power()
TacxTrainerControl.set_track_resistance()
TacxTrainerControl.set_user_configuration()
TacxTrainerControl.set_wind_resistance()
TargetPowerLimit
Module contents¶
pycycling is a cross-platform Python package for interacting with various Bluetooth cycling peripherals.
The package provides a number of classes which wrap around Bleak client objects.
Obtaining the address of your device¶
This documentation includes a number of code snippets demonstrating package usage. Each of these has a hardcoded device address ID which you will need to replace with the address of your device. The following script can be used to obtain this address:
"""
An example script which lists all available bluetooth devices. Use this to obtain the device_address used in other
scripts
"""
import asyncio
from bleak import discover
async def run():
devices = await discover()
for d in devices:
print(d)
if __name__ == "__main__":
import os
os.environ["PYTHONASYNCIODEBUG"] = str(1)
loop = asyncio.get_event_loop()
loop.run_until_complete(run())