Skip to main content

LogiDrivePy - Logitech Controller Python Module

A Python module for interfacing with Logitech steering wheels. This module was tested with the Logitech G920 Driving Force Racing Wheel but should work with other Logitech devices as specified in the Supported Devices section.

Introduction

This Python module facilitates interaction with Logitech steering wheels, serving as a bridge between Python and the Logitech Steering Wheel's software components.

The original functionality was provided in the form of a C# implementation as part of the Logitech Steering Wheel SDK for the Unity Game Engine. The SDK allows developers to easily add Logitech steering wheel support to their games, using a set of predefined force feedback effects or creating custom effects by defining specific forces.

With the aim to extend these capabilities to the Python community, this module was developed as an accessible tool for Python developers. Utilizing the ctypes Python library, the module enables Python scripts to load and interact with Logitech steering wheels through Logitech's DLL (LogitechSteeringWheelEnginesWrapper.dll), providing a seamless integration experience for developers working with these devices.

Supported Devices

This library was tested with the Logitech G920 Driving Force Racing Wheel, but according to Logitech documentation, it should also work with the following devices:

Logitech

  • G29
  • G920
  • Driving Force GT
  • G27
  • G25
  • Driving Force Pro
  • MOMO Force
  • MOMO Racing
  • Formula Force GP
  • Driving Force
  • Formula Force
  • Force 3D
  • Strike Force 3D
  • Freedom 2.4 Cordless Joystick
  • Cordless Rumblepad
  • Cordless Rumblepad 2
  • Rumblepad

Microsoft

  • Sidewinder Force Feedback 2 (Stick)
  • Sidewinder Force (Wheel)

Other (with Immersion drivers)

  • Saitek Cyborg 3D Force
  • Act-Labs Force RS Wheel

Installation

To install the package, simply use pip:

pip install logidrivepy

The package directory layout is organized as follows:

LogiDrivePy
|   .gitignore
|   LICENSE.txt
|   README.md
|   setup.py
|
+---logidrivepy
|   |   constants.py
|   |   controller.py
|   |   functions.py
|   |   structs.py
|   |   __init__.py
|   |
|   +---dll
|   |       LogitechSteeringWheelEnginesWrapper.dll
|
+---tests
    |   run_controller_test.py
    |   spin_wheel_test.py
    |   __init__.py

Usage

Here's a simple example on how to use the Logitech Controller module in your Python script.

from logidrivepy import LogitechController

controller = LogitechController()

print(f"steering_initialize: {controller.steering_initialize()}")
print(f"logi_update: {controller.logi_update()}")
print(f"is_connected: {controller.is_connected(0)}")

controller.steering_shutdown()

Dependencies

This library uses the ctypes Python library to load and call functions from the Logitech's DLL (LogitechSteeringWheelEnginesWrapper.dll). The ctypes library is part of the standard Python library and should be installed by default with a standard Python installation.

This library also requires Tkinter, a Python binding to the Tk GUI toolkit. Tkinter is part of the standard Python library for Python 3 and should be installed by default with a standard Python installation.

License

This project is licensed under the terms of the MIT license. For more details, see the LICENSE.txt file.

Please note that this project is not a reverse engineering of the Logitech Gaming Steering Wheel SDK. Instead, this project aims to provide an interface to Logitech steering wheels in Python by utilizing the SDK's provided DLL file (LogitechSteeringWheelEnginesWrapper.dll) without decompiling, disassembling, or otherwise altering the SDK's components. This project is designed to extend the functionality of the SDK for Python developers while respecting and complying with the original End-User License Agreement of the SDK.

Metadata

Release files for logidrivepy 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for logidrivepy 0.2.0
File Size Uploaded
logidrivepy-0.2.0.tar.gz 12.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for logidrivepy 0.2.0
File Interpreter ABI Platform
logidrivepy-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 31.0 kB

Release files / logidrivepy-0.2.0.tar.gz

Download URL logidrivepy-0.2.0.tar.gz
Size 12.5 kB
Tags Source
SHA-256 checksum
How to use checksums
8607d6b6e99ef6bd789052ac0d9bf4dd47884ed0fc436a7118f46f9de76295c9
BLAKE2b-256 checksum
How to use checksums
2ea5acfe7a5768fbadf6c1cae005932e7316ca1e77c002c6ece8a598c7b160d0
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release files / logidrivepy-0.2.0-py3-none-any.whl

Download URL logidrivepy-0.2.0-py3-none-any.whl
Size 18.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f1b84e3a606eac90b11bcaf1f060fa294aeac568e69c21780772d4956bf33a1f
BLAKE2b-256 checksum
How to use checksums
762024b7c027f22daac3739a16b7bfb7e48720d6090e29c31c56f86efdcceff9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.0

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.3

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page