Problem getting Zigbee2MQTT working

On various Hardware and OS systems: pi / windows / routers / nas, etc

Moderator: leecollings

Post Reply
g00fy
Posts: 16
Joined: Friday 08 September 2017 8:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Dordrecht, The Netherlands
Contact:

Problem getting Zigbee2MQTT working

Post 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!
User avatar
waltervl
Posts: 5714
Joined: Monday 28 January 2019 18:48
Target OS: Linux
Domoticz version: 2024.7
Location: NL
Contact:

Re: Problem getting Zigbee2MQTT working

Post by waltervl »

Did you change the settings in Zigbee2MQTT because the default topic name in Zigbee2MQTT is "homeassistant" (instead of "domoticz")
Domoticz running on Udoo X86 (on Ubuntu)
Devices/plugins: ZigbeeforDomoticz (with Xiaomi, Ikea, Tuya devices), Nefit Easy, Midea Airco, Omnik Solar, Goodwe Solar
g00fy
Posts: 16
Joined: Friday 08 September 2017 8:27
Target OS: Raspberry Pi / ODroid
Domoticz version: 3.8153
Location: Dordrecht, The Netherlands
Contact:

Re: Problem getting Zigbee2MQTT working

Post 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

Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest