{"id":16106327,"url":"https://github.com/thesola10/whlctl","last_synced_at":"2025-10-04T16:38:39.379Z","repository":{"id":63770954,"uuid":"502699656","full_name":"Thesola10/whlctl","owner":"Thesola10","description":"WartHog Lights ConTroL","archived":false,"fork":false,"pushed_at":"2022-11-25T15:44:37.000Z","size":10,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-09-24T11:00:38.561Z","etag":null,"topics":["linux-gaming","thrustmaster-warthog-hotas","usb-hid"],"latest_commit_sha":null,"homepage":"https://pypi.org/project/whlctl/","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Thesola10.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-06-12T18:42:37.000Z","updated_at":"2023-01-30T17:04:31.000Z","dependencies_parsed_at":"2022-11-25T17:15:51.750Z","dependency_job_id":null,"html_url":"https://github.com/Thesola10/whlctl","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/Thesola10/whlctl","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thesola10%2Fwhlctl","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thesola10%2Fwhlctl/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thesola10%2Fwhlctl/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thesola10%2Fwhlctl/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Thesola10","download_url":"https://codeload.github.com/Thesola10/whlctl/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Thesola10%2Fwhlctl/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":278343082,"owners_count":25971399,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-04T02:00:05.491Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["linux-gaming","thrustmaster-warthog-hotas","usb-hid"],"created_at":"2024-10-09T19:13:14.737Z","updated_at":"2025-10-04T16:38:39.334Z","avatar_url":"https://github.com/Thesola10.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Warthog Lights Control\n\nThis Python module and command line tool control the lights on Thrustmaster's Warthog HOTAS throttle box.\n\nLargely based on the [reverse-engineering] work done by mfranz\n\n## How to use\n\nOnce installed, this tool provides a Python module and a command-line tool, both named `whlctl`.\n\n### Command line tool\n\n```sh\nwhlctl 0        # Turn off backlight\nwhlctl 5        # Turn backlight up to max brightness\nwhlctl 3 -l 1,5 # Turn lights 1 and 5 up to brightness 3/5\nwhlctl 1 -l 0,5 # Turn backlight and light 5 up to brightness 1/5\n```\n\nOmitting the `-l` flag will default to adjusting the backlight, and turn off all other lights.\n\n### Python API\n\n```python\nimport whlctl\n\nwhlctl.find_throttle()  # -\u003e \"/dev/hidrawN\" or FileNotFoundError\nwhlctl.write_leds(backlight=True, leds=[True,True,True,True,True], brightness=5)\n                        # -\u003e None or FileNotFoundError (see find_throttle)\n```\n\n#### `find_throttle()`\nTakes no argument and returns the HID node for the Thrustmaster Warthog throttle (`044f:0404`), or raises a `FileNotFoundError` if the device isn't found.  \nThis function is cached.\n\n#### `write_leds(backlight: bool, leds: list[bool], brightness: int)`\nThe `leds` list must contain 5 booleans which designate, in order, the five circular lights from top to bottom. `True` means the light is to be powered on at the given brightness, `False` means it should be powered off.  \n`brightness` is expressed between 0 and 5.  \nReturns nothing, implicitly calls `find_throttle()` and thus can fail with `FileNotFoundError` as above. It can also hit a permission error if the current user has no write permission to the device node.\n\n[reverse-engineering]: https://web.archive.org/web/20121029171225/http://members.aon.at/mfranz/warthog.html\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesola10%2Fwhlctl","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthesola10%2Fwhlctl","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthesola10%2Fwhlctl/lists"}