AppDaemon (HADashboard)安装教程

发布时间: 2021-05-29 | 标签: AppDaemon HomeAssistant HADashboard

安装准备

yum install python3
pip install -U pip3 setuptools

安装 AppDaemon

pip3 install appdaemon

添加配置文件

需根据配置文件夹所在路径,自行修改文件路径 使用 Vim 编辑AppDaemon配置文件

vim /home/appdaemon/appdaemon.yaml

AppDaemon配置文件内容如下 需根据配置文件夹所在路径,自行修改经度,纬度,HA 路径,HA Token

appdaemon:
  time_zone: Asia/Shanghai
  latitude: 31.0
  longitude: 121.0
  elevation: 0
  plugins:
    HASS:
      type: hass
      ha_url: http://192.168.1.7:8123
      token: eyJ0eXAiOiJKV1QiLCJ
hadashboard:
http:
  url: http://0.0.0.0:5050
admin:
api:

手工启动 AppDeamon

需根据配置文件夹所在路径,自行修改命令

appdaemon -c /home/appdaemon/

自动启动 AppDeamon

sudo vim /etc/systemd/system/appdaemon@appdaemon.service

需根据配置文件夹所在路径,自行修改文件路径

[Unit]
Description=AppDaemon
[Service]
Type=simple
ExecStart=/usr/local/bin/appdaemon -c /home/appdaemon/
[Install]
WantedBy=multi-user.target
#重载配置文件
systemctl daemon-reload
#启动
systemctl start appdaemon@appdaemon.service
#自动启动
systemctl enable appdaemon@appdaemon.service
#重启动
systemctl restart appdaemon@appdaemon.service

参考文章

https://appdaemon.readthedocs.io/en/latest/INSTALL.html#pip3 https://appdaemon.readthedocs.io/en/latest/DASHBOARD_CREATION.html#widget-reference http://apod.top/index.php/post/114.html https://bbs.hassbian.com/thread-388-1-1.html