1. etcher写入镜像

  2. 修改boot目录wpa_supplicant.conf文件

    country=CN
    ctrl_interface=DIR=/var/run/wpa_supplicant GROUP=netdev
    update_config=1
    network={
      ssid="WIFI名称"
      psk="WIFI密码"
      key_mgmt=WPA-PSK
      priority=1
    }
  1. 启动后连接ssh

修改时区

sudo raspi-config

修改音量

alsamixer
  1. 修改root密码

    sudo passwd pi
  2. 安装samba

    sudo hassbian-config install samba
  3. 安装mosquitto

    sudo hassbian-config install mosquitto
  4. 安装VLC

    sudo apt-get install vlc
    sudo apt-get install vlc-nox
    sudo usermod -a -G audio homeassistant
    speaker-test
    sudo reboot
    aplay -l
  5. 安装homebridge

    sudo hassbian-config install homebridge

修改 Homebridge 的配置文件 config.json,添加如下内容并保存:

nano /home/pi/.homebridge/config.json
"platforms": [
  {
    "platform": "HomeAssistant",
    "name": "HomeAssistant",
    "host": "http://127.0.0.1:8123",
    "password": "yourapipassword",
    "supported_types": ["automation", "binary_sensor", "climate", "cover", "device_tracker", "fan", "group", "input_boolean", "light", "lock", "media_player", "remote", "scene", "script", "sensor", "switch", "vacuum"],
    "default_visibility": "visible",
    "logging": true,
    "verify_ssl": true
  }
]
  1. 安装PostgreSQL 数据库

    sudo hassbian-config install postgresql
    sudo -u postgres createuser homeassistant
    sudo -u postgres psql
    ALTER USER homeassistant WITH PASSWORD 'homeassistant';
    \q
    sudo -u postgres createdb -O homeassistant homeassistant