Last active
May 28, 2026 08:18
-
-
Save vimagick/19db07f93d8beb6e437d3873ffded273 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Doc: https://wiki.archlinux.org/title/Udev | |
| # | |
| # udevadm info --attribute-walk --name=/dev/input/event2 | |
| # udevadm control --reload | |
| # udevadm trigger | |
| # | |
| KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{id/vendor}=="2717", ATTRS{id/product}=="32b1", SYMLINK+="input/by-id/xiaomi-bt-rc", SYMLINK+="input/by-uuid/%s{uniq}" | |
| KERNEL=="event[0-9]*", SUBSYSTEM=="input", SUBSYSTEMS=="input", ATTRS{id/vendor}=="00d2", ATTRS{id/product}=="0580", SYMLINK+="input/by-id/xiaoyi-bt-rc", SYMLINK+="input/by-uuid/%s{uniq}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Path] | |
| PathExists=/dev/input/by-id/xiaoyi-bt-rc | |
| [Install] | |
| WantedBy=multi-user.target |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| [Unit] | |
| Description=Xiaoyi Bluetooth Remote Controller | |
| ConditionPathExists=/dev/input/by-id/xiaoyi-bt-rc | |
| [Service] | |
| User=pi | |
| ExecStart=/usr/local/bin/evsieve \ | |
| --input /dev/input/by-id/xiaoyi-bt-rc grab \ | |
| --hook key:volumeup exec-shell="mosquitto_pub -h broker.hivemq.com -p 1883 -u username -P password -t xiaoyi-bt-rc -m volumeup" \ | |
| --hook key:volumedown exec-shell="mosquitto_pub -h broker.hivemq.com -p 1883 -u username -P password -t xiaoyi-bt-rc -m volumedown" | |
| [Install] | |
| WantedBy=multi-user.target |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment