1
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-01-06 03:54:01 +02:00
dockerfiles/zigbee2mqtt/README.md

76 lines
1.9 KiB
Markdown
Raw Normal View History

2023-12-29 03:14:38 +02:00
zigbee2mqtt
===========
2024-01-03 08:51:26 +02:00
[Zigbee2MQTT][1] allows you to use your Zigbee devices without the vendor's bridge or gateway.
## Firmware Upgrade
[Zigbee 3.0 CC2652P Dongle Plus][2]
```bash
# download latest zigbee firmware
wget https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20230507.zip
unzip CC1352P2_CC2652P_launchpad_coordinator_20230507.zip
ls CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
# download firmware flashing tool
sudo apt install -y python3-serial python3-intelhex
wget https://github.com/JelmerT/cc2538-bsl/raw/master/cc2538-bsl.py
chmod +x cc2538-bsl.py
./cc2538-bsl.py --help
ls /dev/ttyUSB*
2024-01-03 12:42:13 +02:00
udevadm info -q property -n /dev/ttyUSB0 --property=ID_SERIAL
2024-01-03 08:51:26 +02:00
./cc2538-bsl.py --bootloader-sonoff-usb -p /dev/ttyUSB0 -evw CC1352P2_CC2652P_launchpad_coordinator_20230507.hex
```
## Up and Running
```bash
$ docker compose up -d
2024-01-03 10:11:49 +02:00
$ vim data/configuration.yaml
$ docker compose restart
$ tree
├── data
│   ├── configuration.yaml
│   ├── coordinator_backup.json
│   ├── database.db
│   ├── log
│   │   └── 2024-01-03.16-06-42
│   │   └── log.txt
│   ├── secret.yaml
│   └── state.json
└── docker-compose.yml
2024-01-03 08:51:26 +02:00
$ curl 127.0.0.1:8080
```
2024-01-05 12:46:39 +02:00
## Example Config
```yaml
permit_join: false
homeassistant: false
frontend: true
mqtt:
base_topic: zigbee2mqtt
server: mqtts://broker.hivemq.com:8883
ca: /etc/ssl/cert.pem
#user: '!secret.yaml user'
#password: '!secret.yaml password'
serial:
port: /dev/ttyACM0
2024-01-27 09:35:17 +02:00
advanced:
last_seen: epoch
2024-01-05 12:46:39 +02:00
availability: true
```
## MQTT Testing
```bash
$ mosquitto_sub -h broker.hivemq.com -u username -P password -t 'zigbee2mqtt/+' -R -F '%I\t%t\t%p'
```
> :warning: PLEASE DO NOT USE <broker.hivemq.com> FOR PRODUCTION!
2024-01-03 08:51:26 +02:00
[1]: https://github.com/Koenkk/zigbee2mqtt
[2]: https://zigbee.blakadder.com/Sonoff_ZBDongle-P.html