Installing hass.io on a raspberry pi

So just flashed my SD card with etcher

I dont have a lan cable, so I want plug it into a WiFi already

Created file with no extension

E:\CONFIG\network\my-network

With the content:

[connection]
id=hassos-network
uuid=72111c67-4a5d-4d5c-925e-f8ee26efb3c3
type=802-11-wireless

[802-11-wireless]
mode=infrastructure
ssid=MY_SSID

[802-11-wireless-security]
auth-alg=open
key-mgmt=wpa-psk
psk=MY_WLAN_SECRED_KEY

[ipv4]
method=auto

[ipv6]
addr-gen-mode=stable-privacy
method=auto

After the connection to the power supply, in a few second the homeassistant device should appear in your router.

After the homeassistant launched and updated it's time to play with addons.

Setting up MQTT + Zigbee addons

I've a cc2351 usb stick flashed for zigbee2mqtt. So let's start with a mqtt broker and zigbee2mqtt addon itself.

Mosquitto

So mosquitto configuration:

logins:
  - username: zigbee2mqtt
    password: SOMEPASSROD
  - username: tasmota
    password: Cheeh9ie
anonymous: false
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

I've created 2 users for zigbe2mqtt and for tasmotas, also I would like to add some encryption in the future.

CC2351 Plug

Now it's time to connect cc2351 stick and it should appear in the devices as /dev/ttyACM0.

Zigbee2mqtt

Now adding the zigbee2mqtt addon. Need to add a repo https://github.com/danielwelch/hassio-zigbee2mqtt to the addons.

Now comming to securing the zigbee2mqtt it's important to use a uniq network-key, to generate it just use GENERATE keyword in configuration, also add the username and password set in mosquitto. Also if we want to pair our devices we should set permit_join: true. So initial configuration should look like:

data_path: /share/zigbee2mqtt
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: 'mqtt://core-mosquitto'
  user: zigbee2mqtt
  password: SOMEPASSROD
serial:
  port: /dev/ttyACM0
advanced:
  pan_id: 6754
  channel: 11
  network_key: GENERATE
  availability_blacklist: []
ban: []
whitelist: []
queue: {}
socat:
  enabled: false
  master: 'pty,raw,echo=0,link=/dev/ttyZ2M,mode=777'
  slave: 'tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5'
  restartdelay: 1
  initialdelay: 1
  options: '-d -d'
  log: false

After joining all your devices do not forget to set permit_join to false.

https://community.home-assistant.io/t/psa-hassos-does-not-use-the-sd-card-for-wifi-settings-or-authorized-keys-update-now-it-can/60104

https://www.zigbee2mqtt.io/how_tos/how_to_secure_network.html