{"id":49583013,"url":"https://github.com/ruipin/pyddcci","last_synced_at":"2026-05-03T21:05:18.401Z","repository":{"id":110264187,"uuid":"266324828","full_name":"ruipin/pyddcci","owner":"ruipin","description":"A Python application to control your monitor(s) using DDC/CI","archived":false,"fork":false,"pushed_at":"2025-07-23T01:12:40.000Z","size":247,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-23T03:11:15.822Z","etag":null,"topics":["ddc-ci","monitors","python"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":false,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ruipin.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-05-23T11:43:52.000Z","updated_at":"2025-07-23T01:12:20.000Z","dependencies_parsed_at":null,"dependency_job_id":"5b25ed7b-4712-4fb0-b207-d26aa71130c5","html_url":"https://github.com/ruipin/pyddcci","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ruipin/pyddcci","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruipin%2Fpyddcci","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruipin%2Fpyddcci/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruipin%2Fpyddcci/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruipin%2Fpyddcci/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ruipin","download_url":"https://codeload.github.com/ruipin/pyddcci/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ruipin%2Fpyddcci/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32584659,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-03T06:36:36.687Z","status":"ssl_error","status_checked_at":"2026-05-03T06:36:09.306Z","response_time":103,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"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":["ddc-ci","monitors","python"],"created_at":"2026-05-03T21:05:16.086Z","updated_at":"2026-05-03T21:05:18.396Z","avatar_url":"https://github.com/ruipin.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# pyddcci\n\nA Python application to control your monitor(s) using DDC/CI.\n\n## Overview\n\n**pyddcci** is a command-line tool and Python library for querying and controlling monitor settings (such as brightness, contrast, and input source) using the DDC/CI protocol. It supports multiple monitors and provides a flexible, extensible architecture for advanced users and developers.\n\n## Features\n\n- Query and set monitor settings via DDC/CI\n- Support for multiple monitors\n- Extensible command-line interface (CLI)\n- Configuration via YAML files\n- Logging and debugging support\n- Modular codebase for easy extension\n\n## Installation\n\n1. Clone this repository:\n   ```sh\n   git clone https://github.com/yourusername/pyddcci.git\n   cd pyddcci\n   ```\n2. Install dependencies (Python 3.13+ required):\n   ```sh\n   pip install -r requirements.txt\n   ```\n   (You may need additional dependencies depending on your OS and monitor hardware.)\n\n## Usage\n\nRun the main CLI:\n```sh\npython pyddcci.py [options]\n```\n\nFor help and available commands:\n```sh\npython pyddcci.py --help\n```\n\n### Global Options\n\n- `-v`, `--verbosity` — Set console log verbosity (e.g., DEBUG, INFO, WARNING)\n- `-lv`, `--log-verbosity` — Set logfile verbosity\n- `-l`, `--list`, `--list-monitors` — List detected monitors and exit\n- `-ie`, `--ignore-errors` — Continue execution even if a command fails\n\n### Commands\n\n#### Get Monitor Setting\nRetrieve the value of a monitor setting (e.g., brightness, input source).\n\n```sh\npython pyddcci.py -g \u003cfilter\u003e \u003ccode\u003e [+raw]\n```\n- `-g`, `--get` — Get a VCP code value\n- `\u003cfilter\u003e` — Monitor selector (e.g., `primary`, regex, etc.)\n- `\u003ccode\u003e` — VCP code or alias (e.g., `brightness`, `contrast`, `input`)\n- `+raw` — Output raw value (optional)\n\n**Example:**\n```sh\npython pyddcci.py -g primary brightness\npython pyddcci.py -g primary input +raw\n```\n\n#### Set Monitor Setting\nSet a monitor setting to a specific value.\n\n```sh\npython pyddcci.py -s \u003cfilter\u003e \u003ccode\u003e \u003cvalue\u003e [+verify|+no_verify]\n```\n- `-s`, `--set` — Set a VCP code value\n- `\u003cfilter\u003e` — Monitor selector\n- `\u003ccode\u003e` — VCP code or alias\n- `\u003cvalue\u003e` — Value to set (integer or alias)\n- `+verify` — Verify after setting (default)\n- `+no_verify` — Do not verify after setting\n\n**Example:**\n```sh\npython pyddcci.py -s primary brightness 80\npython pyddcci.py -s primary input hdmi1 +no_verify\n```\n\n#### Multi-Set\nSet a monitor setting to multiple values in sequence (useful for scripting or cycling through values).\n\n```sh\npython pyddcci.py -ms \u003cfilter\u003e \u003ccode\u003e \u003cvalue1\u003e \u003cvalue2\u003e ... [+verify|+no_verify]\n```\n- `-ms`, `--multi-set` — Set a VCP code to multiple values\n- `\u003cfilter\u003e` — Monitor selector\n- `\u003ccode\u003e` — VCP code or alias\n- `\u003cvalue1\u003e \u003cvalue2\u003e ...` — Values to set in order\n- `+verify` / `+no_verify` — (see above)\n\n**Example:**\n```sh\npython pyddcci.py -ms primary contrast 0 100 50\n```\n\n#### Toggle\nCycle a monitor setting through a list of values (e.g., toggle input source).\n\n```sh\npython pyddcci.py -t \u003cfilter\u003e \u003ccode\u003e \u003cvalue1\u003e \u003cvalue2\u003e ... [+verify|+no_verify]\n```\n- `-t`, `--toggle` — Toggle a VCP code between values\n- `\u003cfilter\u003e` — Monitor selector\n- `\u003ccode\u003e` — VCP code or alias\n- `\u003cvalue1\u003e \u003cvalue2\u003e ...` — Values to toggle between\n- `+verify` / `+no_verify` — (see above)\n\n**Example:**\n```sh\npython pyddcci.py -t primary input hdmi1 dp1\n```\n\n### Filters and Codes\n- **Filter**: Selects which monitor(s) to target. Common values: `primary`, regex, or custom YAML filter.\n- **Code**: VCP code or alias (e.g., `brightness`, `contrast`, `input`, `power`).\n- **Value**: Integer or string alias (e.g., `80`, `hdmi1`, `dp1`).\n\nDefault VCP code and value aliases are defined in [`app/ddcci/vcp/vcp_spec.py`](app/ddcci/vcp/vcp_spec.py).\n\n### Configuration\n\nConfiguration is managed via YAML files in the `data/` directory. Do not modify `config.default.yaml` directly; instead, copy it to `config.yaml` and edit as needed.\n\n## Project Structure\n\n- `pyddcci.py` — Main entry point\n- `app/` — Application modules\n  - `cli/` — Command-line interface and commands\n  - `ddcci/` — DDC/CI protocol implementation and monitor management\n  - `util/` — Utilities, configuration, and logging\n- `data/` — Default configuration files\n- `test/` — Unit tests\n\n## Running Tests\n\nTo run the testcases in the `test` folder, use Python's built-in unittest module. From the project root directory, run:\n\n```sh\npython -m unittest discover -b -s test\n```\n\nThis will automatically discover and run all tests in the `test` directory and its subdirectories.\n\nYou can also run a specific test file, for example:\n\n```sh\npython -m unittest -b test.ddcci.test_monitor\n```\n\nFor more verbose output, add the `-v` flag:\n\n```sh\npython -m unittest discover -b -s test -v\n```\n\n### Test Suite Structure\n\nThe `test` folder contains unit tests for the main components of pyddcci:\n\n- `test/ddcci/` — Tests for DDC/CI protocol implementation, monitor management, and configuration (e.g., `test_monitor.py`, `test_monitor_config.py`).\n- `test/ddcci/cli/` — Tests for the command-line interface and CLI commands.\n- `test/ddcci/os/` — Tests for OS-specific monitor detection and mock monitor info.\n- `test/ddcci/vcp/` — Tests for VCP code and value storage.\n- `test/util/` — Tests for utility modules, including argument parsing and mixins.\n\nEach test file targets a specific module or feature. For example, `test_monitor_config.py` verifies monitor configuration loading, saving, and filtering logic. Mock objects are used where appropriate to simulate monitor hardware and OS behavior.\n\nTo contribute new tests, add them to the appropriate subdirectory and follow the structure of existing test files.\n\n## License\n\nThis project is licensed under the GNU General Public License v3.0 or later. See the [LICENSE](LICENSE) file for details.\n\n## Author\n\nCopyright © 2020 Rui Pinheiro","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruipin%2Fpyddcci","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fruipin%2Fpyddcci","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fruipin%2Fpyddcci/lists"}