Zigbee2MQTT on Home Assistant

I’ve bought a Sonoff Zigbee 3.0 usb dongle plus and I want to install this in my Home Assistant.
version

image

I see it’s all about the add-on you need to install first. Is there any way i can bypass this with my core version and install the zigbee?

I tried everything.

I installed the mosquitto via ssh (sudo apt-get install mosquitto) and i configured the broker. how do install the MQTT add-on with no add-on tab?

the screenshot beneath is from the add-ons but i dont have the add-ons.

You run HA Core (in a venv), so do a Linux install

Or Docker, which will make your life easier:

will do that thanks. how do you eventually make the connection from HA to that container? Do i need to fill in the ip and port of the container in the mqtt broker configuration in HA?

The other way around. In the Zigbee2MQTT configuration you fill in the IP and port of your mosquitto. Same in the MQTT configuration in HA.

I got this container running now with the following compose file:

also see i have some errors:


version: '3.8'
services:
  zigbee2mqtt:
    container_name: zigbee2mqtt
    image: koenkk/zigbee2mqtt
    restart: unless-stopped
    volumes:
      - /opt/zigbee/data:/app/data
      - /run/udev:/run/udev:ro
    ports:
      # Frontend port
      - 1885:8080
    environment:
      - TZ=Europe/Berlin
    devices:
      # Make sure this matched your adapter location
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_26ef72ee35afed1188363b4e71c9e8b5-if00-port0

I modified the configuration.yaml with the correct serial path. Do i also need to configure my broker also like you said?

In your zigbee2mqtt configuration.yaml

(this is mine)

homeassistant: true
permit_join: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://10.0.0.63
  user: xxx
  password: xxx
serial:
  port: tcp://10.0.0.134:6638
advanced:
  pan_id: 6754
  channel: 25
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  last_seen: epoch
  log_level: error
  log_syslog:
    app_name: Zigbee2MQTT
    eol: /n
    host: localhost
    localhost: localhost
    path: /dev/log
    pid: process.pid
    port: 514
    protocol: udp4
    type: '5424'
frontend:
  port: 8080
experimental:
  new_api: true

cant make it work with this

You need to adapt it to your configuration, e.g. your mosquitto is probably not mqtt:10.0.0.66 but the ip of your HA, and the port needs to be adjusted to /dev/serial/…

Changed the configuration file like this now:

  GNU nano 7.2                                                                                  configuration.yaml
homeassistant: true
frontend: true
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://192.168.2.80
  user: mqtt-user
  password: mqtt-pass
serial:
  port: /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_26ef72ee35afed1188363b4e71c9e8b5-if00-port0
advanced:
  pan_id: 6754
  channel: 25
  network_key:
    - 165
    - 103
    - 36
    - 146
    - 200
    - 152
    - 15
    - 170
    - 143
    - 254
    - 86
    - 30
    - 69
    - 118
    - 210
    - 253
  pan_id: 28338
  ext_pan_id:
    - 127
    - 92
    - 57
    - 20
    - 53
    - 182
    - 140
    - 80


the ip is the ip of the HA, do i need to be able to see the integration in HA after this, because i dont see yet.

You need to install the MQTT integration

Already got that;

image

Or do i need to change the port?

That should be OK. Do you see errors in the Zigbee2MQTT log ?

the only thing i see is the port in zigbee2mqtt is 8080 and the mqtt in above screenshot is facing to 1883, is that a problem?

My log says:

image

Can you share your log maybe? I don’t see any ’ running ’ logfiles.

Maybe delete the advanced section in your configuration.yaml

That is the port of the webserver

That is the mqtt port

Log should be in

/opt/zigbee/data/log

i see it’s constantly restarting, maybe my configuration file is not OK.

After i delete the advanced section i get:

Log says this:

I don’t run docker myself (bare linux install), but according to

your docker compose file needs to be changed

devices:
      # Make sure this matched your adapter location
      - /dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_26ef72ee35afed1188363b4e71c9e8b5-if00-port0:/dev/ttyACM0

you did not include the :/dev/ttyACM0

and then in configuration.yaml port will be /dev/ttyACM0

1 Like

Ok i did that now. also plugged in a powered usb hub on my raspberry pi. because i did see this
" * If you still get this error after increasing the panID (as explained here) and you are using a Raspberry Pi with other USB devices attached (e.g. SSD) try connecting the SSD or adapter through a powered USB hub."

now i have this in my log

Configuration.yaml looks like this:

Do i forget something?

Your broker isn’t responding (but please, share text as text, not pictures of text).

Try installing MQTT Explorer on your laptop/whatever and check that you can connect.