Skip to content

shaonianzhentan/ha-keyboard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

25 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ha-keyboard

键盘监听

hacs_badge visit

按键蓝图

导入蓝图

安装

下载源代码

git clone https://github.com/shaonianzhentan/ha-keyboard

安装依赖

cd ha-keyboard

sudo pip install -r requirements.txt -i https://mirrors.aliyun.com/pypi/simple/

安装失败则需要安装编译工具

sudo pip install --upgrade setuptools

启动

sudo python3 ha_kb.py

开机启动

生成系统启动文件

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

启动服务

sudo systemctl start ha_kb

加入开机项

sudo systemctl enable ha_kb

重启服务

sudo systemctl restart ha_kb

查看运行状态

sudo systemctl status ha_kb

调试

service: logger.set_level
data:
  homeassistant.components.mqtt: debug
service: logger.set_level
data:
  homeassistant.components.mqtt: warn

如果这个项目对你有帮助,请我喝杯咖啡奶茶吧😘

支付宝 微信
奶茶= 支付宝 微信支付

关注我的微信订阅号,了解更多HomeAssistant相关知识

HomeAssistant家庭助理


在使用的过程之中,如果遇到无法解决的问题,付费咨询请加Q635147515