Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/shaonianzhentan/ha-keyboard
键盘监听
https://github.com/shaonianzhentan/ha-keyboard
Last synced: 13 days ago
JSON representation
键盘监听
- Host: GitHub
- URL: https://github.com/shaonianzhentan/ha-keyboard
- Owner: shaonianzhentan
- License: mit
- Created: 2021-10-15T09:59:16.000Z (about 3 years ago)
- Default Branch: main
- Last Pushed: 2023-08-13T14:10:30.000Z (about 1 year ago)
- Last Synced: 2024-10-03T20:41:39.598Z (about 1 month ago)
- Language: Python
- Size: 27.3 KB
- Stars: 4
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# ha-keyboard
键盘监听[![hacs_badge](https://img.shields.io/badge/Home-Assistant-%23049cdb)](https://www.home-assistant.io/)
![visit](https://visitor-badge.laobi.icu/badge?page_id=shaonianzhentan.ha-keyboard&left_text=visit)按键蓝图
[![导入蓝图](https://my.home-assistant.io/badges/blueprint_import.svg)](https://my.home-assistant.io/redirect/blueprint_import/?blueprint_url=https%3A%2F%2Fgithub.com%2Fshaonianzhentan%2Fha-keyboard%2Fblob%2Fmain%2Fblueprints%2Fha_keyboard.yaml)
## 安装
下载源代码
```bash
git clone https://github.com/shaonianzhentan/ha-keyboard
```
安装依赖
```bash
cd ha-keyboardsudo pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/
```
安装失败则需要安装编译工具
```bash
sudo pip install --upgrade setuptools
```
## 启动
```bash
sudo python3 ha_kb.py
```## 开机启动
生成系统启动文件
```bash
sudo nano /etc/systemd/system/ha_kb.service
```
文件内容(**WorkingDirectory需修改为对应目录**)
```
[Unit]
Description=ha-keyboard
After=network-online.target[Service]
Type=simple
ExecStart=/usr/bin/python3 ha_kb.py
WorkingDirectory=/root/git/ha-keyboard/
RestartSec=15
Restart=always[Install]
WantedBy=multi-user.target
```
启动服务
```bash
sudo systemctl start ha_kb
```
加入开机项
```bash
sudo systemctl enable ha_kb
```
重启服务
```bash
sudo systemctl restart ha_kb
```
查看运行状态
```bash
sudo systemctl status ha_kb
```## 调试
```yaml
service: logger.set_level
data:
homeassistant.components.mqtt: debug
``````yaml
service: logger.set_level
data:
homeassistant.components.mqtt: warn
```## 如果这个项目对你有帮助,请我喝杯
咖啡奶茶吧😘
| |支付宝|微信|
|---|---|---|
奶茶= | |## 关注我的微信订阅号,了解更多HomeAssistant相关知识
---
**在使用的过程之中,如果遇到无法解决的问题,付费咨询请加Q`635147515`**