1
0
mirror of https://github.com/balkian/zigbee2mqtt synced 2025-09-01 17:32:21 +00:00

Trying out the new version of zigbee2mqtt

This commit is contained in:
J. Fernando Sánchez
2025-08-12 23:13:15 +02:00
parent edf11eb6e4
commit 263cda43cb
3 changed files with 32 additions and 39 deletions

View File

@@ -2,11 +2,12 @@ This is just a simple environment with:
* zigbee2mqtt: a bridge from zigbee (through a zigbee USB stick) to MQTT
* mosquitto: an MQTT server
* home assistant: a home automation platform, with MQTT support.
zigbee2mqtt also supports auto discovery for home assistant.
* ~~home assistant: a home automation platform, with MQTT support.~~
~~zigbee2mqtt also supports auto discovery for home assistant.~~ (disabled for now)
You'll need to configure zigbee2mqtt with a `z2m-data/configuration.yaml` file like this:
You'll need to configure zigbee2mqtt with a `z2m-data/configuration.yaml` file.
There is an onboarding web interface that is quite convenient, but I have disabled it .
Just comment out the appropriate line (`Z2M_ONBOARD_NO_SERVER=1`) or create your own file like so:
```
homeassistant: true
@@ -18,19 +19,4 @@ mqtt:
port: /dev/ttyACM0 # The serial device. It should be the same as the device entry in docker-compose.yml.
```
After running home assistant the first time, you will have to add the mqtt configuration to the config file:
```
mqtt:
broker: mqtt
discovery: true
birth_message:
topic: 'hass/status'
payload: 'online'
will_message:
topic: 'hass/status'
payload: 'offline'
```
More info here: http://balkian.com/controlling-zigbee-devices-with-mqtt.html

View File

@@ -1,34 +1,39 @@
version: '2.1'
services:
zigbee2mqtt:
image: koenkk/zigbee2mqtt
image: koenkk/zigbee2mqtt:2.6.0
container_name: zigbee2mqtt
restart: always
volumes:
- ./z2m-data/:/app/data/
- /etc/localtime:/etc/localtime:ro
- /run/udev:/run/udev:ro
devices:
- "/dev/ttyACM0"
networks:
- hass
- /dev/serial/by-id/usb-Texas_Instruments_TI_CC2531_USB_CDC___0X00124B00039D6A85-if00:/dev/ttyACM0
#networks:
# - hass
environment:
- TZ=Europe/Madrid
- Z2M_ONBOARD_NO_SERVER=1
ports:
- 8080:8080
mqtt:
image: eclipse-mosquitto
restart: always
ports:
- 1883:1883
- 9001:9001
networks:
- hass
#networks:
# - hass
volumes:
- ./mosquitto.conf:/mosquitto/config/mosquitto.conf
hass:
image: homeassistant/home-assistant
ports:
- "8123:8123"
networks:
- hass
volumes:
- ./hass-config:/config
- "/etc/localtime:/etc/localtime:ro"
networks:
hass:
driver: overlay
# hass:
# image: homeassistant/home-assistant
# ports:
# - "8123:8123"
# networks:
# - hass
# volumes:
# - ./hass-config:/config
# - "/etc/localtime:/etc/localtime:ro"
#networks:
# hass:

View File

@@ -0,0 +1,2 @@
allow_anonymous true
listener 1883