Skip to content

Fix CEC adapter selection and add --adapter flag#83

Closed
daptify14 wants to merge 3 commits into
konikvranik:masterfrom
daptify14:master
Closed

Fix CEC adapter selection and add --adapter flag#83
daptify14 wants to merge 3 commits into
konikvranik:masterfrom
daptify14:master

Conversation

@daptify14

Copy link
Copy Markdown

Fix for adapter selection issues and adds better control over CEC adapter usage. Current adapter detection logic always opens connection to the last detected adapter when more than one is discovered.

Changes:

  • Changed from using the last available CEC adapter to using the first one by default.
  • New command-line option (--adapter or -a) to explicitly specify which CEC device path to use

Fixes #79

- Fix bug where last CEC adapter was used instead of first
- Add --adapter/-a flag to specify CEC device path explicitly
- Addresses dual HDMI port issues on Raspberry Pi 4
- Use first adapter by default instead of last

Fixes adapter selection on systems with multiple CEC adapters
(/dev/cec0, /dev/cec1) where TV is typically on primary port.

Usage:
  python -m pycec                    # Uses first adapter (fixed)
  python -m pycec --adapter /dev/cec0  # Uses specified adapter
- Replace setup.py with pyproject.toml (hatchling build system)
- Add GitHub Actions workflow to build wheel on tags
- Supports Markdown README (was the original install issue)
@daptify14 daptify14 closed this May 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

cannot select /dev/cecX port

3 participants