{"id":29543951,"url":"https://github.com/lnqs/knoepfe","last_synced_at":"2025-07-17T14:09:20.039Z","repository":{"id":62574416,"uuid":"462528761","full_name":"lnqs/knoepfe","owner":"lnqs","description":"Connect and control Elgato Stream Decks","archived":false,"fork":false,"pushed_at":"2024-09-25T17:20:13.000Z","size":355,"stargazers_count":3,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-26T06:19:31.690Z","etag":null,"topics":["elgato","elgato-stream-deck","linux","obs","obs-websocket","python","streamdeck","streaming"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"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/lnqs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2022-02-23T00:50:13.000Z","updated_at":"2024-12-30T22:26:44.000Z","dependencies_parsed_at":"2022-11-03T17:30:32.921Z","dependency_job_id":null,"html_url":"https://github.com/lnqs/knoepfe","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/lnqs/knoepfe","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnqs%2Fknoepfe","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnqs%2Fknoepfe/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnqs%2Fknoepfe/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnqs%2Fknoepfe/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lnqs","download_url":"https://codeload.github.com/lnqs/knoepfe/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lnqs%2Fknoepfe/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":265614373,"owners_count":23798431,"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","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":["elgato","elgato-stream-deck","linux","obs","obs-websocket","python","streamdeck","streaming"],"created_at":"2025-07-17T14:09:16.960Z","updated_at":"2025-07-17T14:09:20.023Z","avatar_url":"https://github.com/lnqs.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Knöpfe \u003csub\u003e\u003csup\u003e[ˈknœpfə]\u003c/sub\u003e\u003c/sup\u003e\n\nConnect and control Elgato Stream Decks from Linux.\n\n## Features\n\n- Several integrated widgets\n- OBS integration including\n    - Showing and changing if stream is running\n    - Showing and changing if recording is running\n    - Showing current scene\n    - Switching between scenes\n- Multiple pages to switch between\n- Configuring device's brightness and hardware polling interval\n- Automatic sleeping if device isn't used with the possibility for widgets to prevent this (i.e. while OBS is running)\n\n## Installation\n\n### PyPI\n\n    pip install knoepfe\n\nshould do the trick :)\n\n\n### Arch Linux AUR\n\nIf you're on Arch Linux you can use the [PKGBUILD in the AUR](https://aur.archlinux.org/packages/knoepfe) to install Knöpfe.\nProvided you're using `yay`\n\n    yay -S knoepfe\n\nshould be enough.\n\n### Prerequisites\n\nudev rules are required for Knöpfe to be able to communicate with the device.\n\nCreate ` /etc/udev/rules.d/99-streamdeck.rules` with following content:\n\n    SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0060\", TAG+=\"uaccess\"\n    SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006d\", TAG+=\"uaccess\"\n    SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0080\", TAG+=\"uaccess\"\n    SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"0063\", TAG+=\"uaccess\"\n    SUBSYSTEM==\"usb\", ATTRS{idVendor}==\"0fd9\", ATTRS{idProduct}==\"006c\", TAG+=\"uaccess\"\n\nThen, run `sudo udevadm control --reload-rules` and reconnect the device. You should be ready to go then.\n\n## systemd unit\n\nIf you want to start Knöpfe automatically on user login, consider creating and enabling a systemd unit in `~/.config/systemd/user/knoepfe.service`:\n\n    [Unit]\n    Description=Knoepfe\n\n    [Service]\n    # Set path to where Knoepfe executable was installed to\n    ExecStart=/usr/local/bin/knoepfe\n    Restart=always\n\n    [Install]\n    WantedBy=default.target\n\nAnd start and enable it by running:\n\n    systemctl --user enable knoepfe\n    systemctl --user start knoepfe\n\n## Usage\n\n### Starting\n\nUsually just running `knoepfe` should be enough. It reads the configuration from `~/.config/knoepfe/knoepfe.cfg` (see below for more information) and connects to the stream deck.\n\nAnyway, some command line options are available:\n\n    knopfe\n    Connect and control Elgato Stream Decks\n\n    Usage:\n      knoepfe [(-v | --verbose)] [--config=\u003cpath\u003e]\n      knoepfe (-h | --help)\n      knoepfe --version\n\n    Options:\n      -h --help       Show this screen.\n      -v --verbose    Print debug information.\n      --config=\u003cpath\u003e Config file to use.\n\n\n### Configuration\n\nUnless overwritten on command line, Knöpfe loads its configuration from `~/.config/knoepfe/knoepfe.cfg`. So you should create that file if you don't want to stick to the example config used as fallback.\n\nAnyway, the example is a great way to start. It can be found as `knoepfe/default.cfg` in this repository and the installation target directory.\n\nThe configuration is parsed as Python code. So every valid Python statement can be used, allowing to dynamically create and reuse parts of it.\nThe default configuration is heavily commented, hopefully explaining how to use it clear enough.\n\n## Widgets\n\nFollowing widgets are included:\n\n### Text\n\nSimple widget just displaying a text.\n\nCan be instantiated as:\n\n    widget({'type': 'knoepfe.widgets.Text', 'text': 'My great text!'})\n\nDoes nothing but showing the text specified with `text` on the key.\n\n### Clock\n\nWidget displaying the current time. Instantiated as:\n\n    widget({'type': 'knoepfe.widgets.Clock', 'format': '%H:%M'})\n\n`format` expects a [strftime() format code](https://docs.python.org/3/library/datetime.html#strftime-and-strptime-format-codes) to define the formatting.\n\n### Timer\n\nStop watch widget.\n\nInstantiated as:\n\n    widget({'type': 'knoepfe.widgets.Timer'})\n\nWhen pressed it counts the seconds until it is pressed again. It then shows the time elapsed between both presses until pressed again to reset.\n\nThis widget acquires the wake lock while the time is running, preventing the device from going to sleep.\n\n### Mic Mute\n\nMute/unmute PulseAudio source, i.e. microphone.\n\nInstantiated with:\n\n    widget({'type': 'knoepfe.widgets.MicMute'})\n\nAccepts `device` as optional argument with the name of source the operate with. If not set, the default source is used.\nThis widget shows if the source is muted and toggles the state on pressing it.\n\n### OBS Streaming and Recording\n\nShow and toggle OBS streaming/recording.\n\nThese widgets can be instantiated with\n\n    widget({'type': 'knoepfe.widgets.obs.Recording'})\n\nand\n\n    widget({'type': 'knoepfe.widgets.obs.Streaming'})\n\nThey connect to OBS (if running, they're quite gray if not) and show if the stream or recording is running. On a long press the state is toggled.\n\nAs long as the connection to OBS is established these widgest hold the wake lock.\n\n### OBS Current Scene and Scene Switch\n\nShow and switch active OBS scene.\n\nThese widgets are instantiated with\n\n    widget({'type': 'knoepfe.widgets.obs.CurrentScene'})\n\nand\n\n    widget({'type': 'knoepfe.widgets.obs.SwitchScene', 'scene': 'Scene'})\n\nThe current scene widget just displays the active OBS scene.\n\nThe scene switch widget indicates if the scene set with the `scene` key is currently active. If not and the widget is pressed it switches to the scene.\n\nAs long as the connection to OBS is established these widgets hold the wake lock.\n\n## Development\n\nPlease feel free to open an [issue](https://github.com/lnqs/knoepfe/issues) if you encounter any bugs.\n\nPull requests are also very welcome :)\n\nAs widgets are loaded by their module path it should also be possible to add new functionality in a plugin-ish way by just creating independent python modules defining their behaviour. But, well, I haven't tested that yet.\n\n## Mentions\n\nThis project relies on [python-elgato-streamdeck](https://github.com/abcminiuser/python-elgato-streamdeck) to communicate with the devices and is heavily inspired by [Dev Deck](https://github.com/jamesridgway/devdeck) and [deckmaster](https://github.com/muesli/deckmaster/).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnqs%2Fknoepfe","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flnqs%2Fknoepfe","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flnqs%2Fknoepfe/lists"}