视频教程如下:


https://youtu.be/ej3C36PtNOI

执行下面命令:


#/bin/bash 
cd $HOME/.homeassistant 
wget https://raw.githubusercontent.com/5high/hass-configurator/master/configurator.py 
sudo chmod 755 configurator.py 
cur_dir=$(cd "$(dirname "$0")"; pwd) 
sudo sh -c 
"echo '[Unit] Description=HA Yaml Server 
After=syslog.target network-online.target 
[Service] 
Type=simple 
User=root 
ExecStart=$cur_dir/configurator.py $cur_dir/settings.conf 
Restart=always 
[Install] WantedBy=multi-user.target' > /etc/systemd/system/hayaml.service" 
sudo systemctl enable hayaml 
cd $HOME/.homeassistant 
wget https://raw.githubusercontent.com/5high/hass-configurator/master/settings.conf 
sudo systemctl start hayaml 
sudo systemctl start hayaml

修改为自己的Home Assistant的IP地址添加下面内容到Home Assistant 的配置文件:

panel_iframe:
  configurator:
  title: Configurator
  icon: mdi:wrench
  url: http://123.123.132.132:3218

Home Assistant中有个配置文件名字是settings.conf,这个文件是configurator的配置文件,大家可以自行修改默认路径,或者支持ssl等等。

下面为高级用户参数解释:

{
    "LISTENIP": "0.0.0.0",  #监听地址
    "PORT": 3218, #监听端口
    "GIT": false, 
    "BASEPATH": "/root/.homeassistant", #软件打开默认目录
    "ENFORCE_BASEPATH": false,
    "SSL_CERTIFICATE": "/data/*.xxx.com.cer",  #cert证书文件存放位置
    "SSL_KEY": "/data/*.xxx.com.key",  #key证书文件存放位置
    "SSL": true, #是否启用https
    "IGNORE_SSL": false,
    "HASS_API": "http://127.0.0.1:8123/api/", #Home Assistant API通信地址
    "HASS_WS_API": "admin",  #API 用户名
    "HASS_API_PASSWORD": "itcommander",  #API 密码
    "USERNAME": "admin",  #访问configurator的用户名
    "PASSWORD": "itcommander",   #访问configurator的密码
    "ALLOWED_NETWORKS": [],  #地址白名单  
    "ALLOWED_DOMAINS": [],   #域名白名单
    "BANNED_IPS": [],  #黑名单地址
    "BANLIMIT": 0,
    "IGNORE_PATTERN": [],
    "DIRSFIRST": false,
    "SESAME": null,
    "SESAME_TOTP_SECRET": null,
    "VERIFY_HOSTNAME": null,
    "ENV_PREFIX": "HC_",
    "NOTIFY_SERVICE": "persistent_notification.create"
}

22 对 “Home Assistant 配置文件修改器网页版,Home Assistant Configurator再也不担心我改错YAML文件了!”的想法;

      1. 大佬,我下载的你的树莓派BUSTER-HA_20191211的固件,里面的configurator 点击后输入你给的用户名密码后,一直刷新,出不来界面。

          1. 大佬,我是小白,现在家里可以科学上网了,大陆用户还是不行吗? 还是我的配置有问题? 看了你的视频,一直觉得这个工具好用,我linux 不熟 nano命令不怎么用。 我用的HA官方的 HASS IO 里面的 file editor add on 是可以用的。只是觉得那个系统很多命令不支持,所以还是觉得你配置好的系统好。

  1. 大佬,configurator 点击后输入你给的用户名和密码后一直刷新,打不开。是3218端口的问题吗? 用的google chrome浏览器。 其他mopidy都能正常打开。

  2. root@aml:/usr/share/hassio/homeassistant# wget https://raw.githubusercontent.com/5high/hass-configurator/master/configurator.py
    –2020-11-10 16:18:25– https://raw.githubusercontent.com/5high/hass-configurator/master/configurator.py
    Resolving raw.githubusercontent.com (raw.githubusercontent.com)… 0.0.0.0, ::
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|0.0.0.0|:443… failed: Connection refused.
    Connecting to raw.githubusercontent.com (raw.githubusercontent.com)|::|:443… failed: Connection refused.

    这个是啥原因,up大神。

发表回复