本体构成:
wpa_supplicant.conf文件在SD卡的根目录下
country=SE ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev update_config=1network={
ssid="无线链接的SSID"
psk="无线密码"
}
http://hassbian.local:8123就能找到HA了,但我装的时候不行,所以只能去路由器里找这个树莓派的IP然后直接输入http://ip地址:8123HA系统升级:
昨天刚更新了0.8版本,先说下hassbian下怎么升级HA。SSH链接后,输入以下内容就可以了:
$ sudo hassbian-config upgrade homeassistant
安装SAMBA:
sudo apt-get update sudo apt-get install samba sudo nano /etc/samba/smb.conf 配置samba,主要就是配置链接路径就可以了之后,创建samba的用户
sudo smbpasswd -a pi
输入密码
安装MTQQ:
sudo apt-get install mosquitto sudo apt-get install mosquitto-clientssudo nano /etc/mosquitto/mosquitto.conf 配置文件
删除配置文件中最后一行,加入以下内容:
allow_anonymous false
password_file /etc/mosquitto/pwfile
listener 1883添加用户名和密码
sudo mosquitto_passwd -c /etc/mosquitto/pwfile username
HA简单配置:
用smb连接后找到HA配置文件configuration.yaml打开编辑,也可以ssh里找到默认路径home/homeassistant/.homeassistant/configuration.yaml随便用nano或vi编辑这个文件。
homeassistant:
# Name of the location where Home Assistant is running
name: Home 显示的名称
# Location required to calculate the time the sun rises and sets
latitude: 37.32 所在地坐标
longitude: 150.87
# Impacts weather/sunrise data (altitude above sea level in meters)
elevation: 0
# metric for Metric, imperial for Imperial
unit_system: metric
# Pick yours from here: http://en.wikipedia.org/wiki/List_of_tz_database_time_zones
time_zone: Asia/Tokyo 所在地时区
...
...
...
# 添加mtqq
mqtt:
broker: IP地址
port: 端口
client_id: 名称
username: 用户名
password: 密码