Skip to content

Instantly share code, notes, and snippets.

@willwhui
Last active November 26, 2017 10:57
Show Gist options
  • Save willwhui/d251ac2413105162817782eb21158b52 to your computer and use it in GitHub Desktop.
Save willwhui/d251ac2413105162817782eb21158b52 to your computer and use it in GitHub Desktop.
Hass.io on Raspberry Pi 3 B
@willwhui
Copy link
Author

willwhui commented Oct 18, 2017

addon Configurator

一个web方式运行的配置文件修改器,安装后的默认入口是http://hassio.local:3218/
必须在它的配置页中设置password,否则不能运行。
运行后,点击界面左上角的文件夹图标,可以打开我们想要编辑的yaml文件。
这里是它的说明:https://home-assistant.io/addons/configurator/
这其中还提到了如何添加到Panel(侧边栏)去,结合参考:https://home-assistant.io/components/panel_iframe/

特殊用途

这个 Configurator很有意思,当我改错了配置文件,进不了http://hassio.local:8123的时候,如果预先打开了它的页面没有关闭,我还是可以访问机器里所有的文件并进行修改的。
只不过改了之后,选择它右上角菜单里的restart hass,没有效果。
但至少可以看log,知道上次启动失败的原因。
还可以执行命令,比如命令行启动ssh:/usr/sbin/sshd -D -e (待测试)

@willwhui
Copy link
Author

hass的架构说明

在这里,值得一看:https://home-assistant.io/developers/

@willwhui
Copy link
Author

willwhui commented Oct 20, 2017

奇怪的bug

不知道什么原因,每次重启设备之后,addon并不按照预期的设定进行自动启动。
导致每次都要手动启动ssh,smb,configurator
很过分。。。

设置.ssh/authorized_keys之后,总是被清空,

看来必须在SSH插件里面放置公钥

并且再也无法通过在boot分区修改配置文件的方法成功配置wifi了

根据上面的情况来看,通过ssh配置也是不靠谱的,因为会清空

因此暂时放弃hass.io直接用原生的hass

根据 https://community.home-assistant.io/t/setup-ssh-but-sudo-not-found/25291/2 这里的讨论来看:

So the only real way to change anything is to add hass.io4 add-ons and changing you config.yaml file.

只能通过add-on和*.yaml来改变hass.io的行为。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment