Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #This assumes you have docker installed
- #It also assumes you have docker-compose installed, if you don't then follow these instructions: https://withblue.ink/2017/12/31/yes-you-can-run-docker-on-raspbian.html
- #create your docker folder
- sudo mkdir /docker
- #set the ownership of the folder to the pi user
- sudo chmod pi:pi /docker
- #create a zigbee2mqtt folder
- mkdir /docker/zigbee2mqtt
- #plug in your zigbee usb device and find the serial of the device:
- ls /dev/serial/by-id/
- #it probably looks something like this: usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0014D9E26D-if00
- #Go to your new directory
- cd /docker/zigbee2mqtt
- #create a docker-compose file for zigbee2mqtt
- nano docker-compose.yaml
- #paste the following configuration and add your own zigbee usb device serial under devices between by-id and :/dev/ttyACM0:rwm
- version: '2.1'
- services:
- zigbee2mqtt:
- container_name: zigbee2mqtt
- image: koenkk/zigbee2mqtt:arm32v6
- volumes:
- - /docker/zigbee2mqtt/data:/app/data
- devices:
- - /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B0014D9E26D-if00:/dev/ttyACM0:rwm
- restart: always
- #save the file (ctrl + x then y)
- #pull the image
- docker-compose pull
- #create and startup the container
- docker-compose up -d
- #give it a minute or two then shutdown the container
- docker-compose stop
- #there should now be a data folder with a configuration.yaml file inside
- ls -al
- #edit the configuration.yaml
- nano data/configuration.yaml
- #replace the contents with this:
- homeassistant: true
- permit_join: true
- mqtt:
- base_topic: zigbee2mqtt
- server: 'mqtt://127.0.0.1' #assuming hassio is on the same RPI
- user: homeassistant #set your hassio username
- password: yourpassword #set your hassio password
- serial:
- port: /dev/ttyACM0
- #this will setup zigbee2mqtt correctly (the hassio part isn't quite done yet)
- #start zigbee2mqtt again and try and pair some zigbee devices to it.
- docker-compose start
- #you can confirm devices have joined by either looking at or watching the log files
- cat data/log/[DATE]/log.txt
- #or
- tail -f data/log/[date]/log.txt
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement