Page 1 of 1

Problem getting Zigbee2MQTT working

Posted: Tuesday 29 November 2022 13:48
by g00fy
Hi all,

I've been working for days now to get Zigbee2MQTT working within Domoticz, but so far it hasn't worked.
I followed the wiki for installation (https://www.domoticz.com/wiki/Zigbee2MQTT). Three docker containers are now running with Domoticz, Zigbee2MQTT and Mosquitto. These run in the same docker network so that they can connect to each other.
In Domoticz I have set everything under hardware as stated in the wiki:

Image

To test I created a temperature device. When I send a test message from the Domoticz or Zigbee2MQTT container (with mosquitto_pub -h mosquitto -m '{ "idx" : 184, "nvalue" : 0, "svalue" : "25.0" }' -t 'domoticz/in ') it is received by the Mosquitto container. But in Domoticz the temperature device is not updated. It seems that Domoticz is not receiving the message, but I can't find why.

This is the configuration of my docker containers (docker-compose):

Code: Select all

version: '3.3'

services:
  domoticz:
    container_name: domoticz
    build:
       context: ./_build
    restart: unless-stopped
    devices:
      - "/dev/ttyUSB-RFX433-A:/dev/ttyUSB1"
      - "/dev/ttyUSB-SONOFF:/dev/ttyACM0"
    ports:
      - "8080:8080"
    volumes:
      - ./domoticz/config:/opt/domoticz/userdata
    environment:
      - TZ=Europe/Amsterdam
    networks:
      - domoticz
      - proxy

  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt
    restart: on-failure:2
    volumes:
      - ./zigbee2mqtt/data/zigbee2mqtt:/app/data
      - /run/udev:/run/udev:ro
    ports:
      - 8081:8081
    environment:
      - TZ=Europe/Berlin
    devices:
      - /dev/ttyUSB-SONOFF:/dev/ttyACM0
    networks:
      - domoticz
    depends_on:
      - mosquitto

  mosquitto:
    image: eclipse-mosquitto:2
    container_name: mosquitto
    restart: unless-stopped
    volumes:
      - ./mosquitto/config:/mosquitto/config
      - ./mosquitto/log:/mosquitto/log
      - ./mosquitto/data:/mosquitto/data
    ports:
      - 1883:1883
    networks:
      - domoticz

networks:
  domoticz:
    driver: bridge
  proxy:
    external:
      name: proxy
Versions of software:
Domoticz: 2022.2
Zigbee2MQTT: 1.28.2 (commit #360a777)
Mosquitto: 2.0.15

Hopefully to get it working eventually...
Thanks for helping out!

Re: Problem getting Zigbee2MQTT working

Posted: Tuesday 29 November 2022 14:54
by waltervl
Did you change the settings in Zigbee2MQTT because the default topic name in Zigbee2MQTT is "homeassistant" (instead of "domoticz")

Re: Problem getting Zigbee2MQTT working

Posted: Thursday 01 December 2022 9:14
by g00fy
Thanks waltervl!

I changed the 'Automatische ontdekkingsvoorvoegsel' to homeassistant and in the configuration.yaml of zigbee2mqtt set homeassistant to true instead of false and now my devices become present in Domoticz.

Verstuurd vanaf mijn SM-M515F met Tapatalk