Changing from ZHA to zigbee2mqtt

Having problems setting up ZHA with one of my sensors and was told to try zigbee2mqtt. But I’m missing something again… Deleted ZHA. Restarted HA. Installed Mosquitto broker add on, made user for mqtt. Installed MQTT integration and used the new user I made from Mosquitto instructions. Installed zigbee2mqtt addon and nothing works. I’m using a tube-zb usb dongle and change port for it. Added the frontend and experimental lines. Added login info. Still getting errors and web ui does not work. Here is the info from each of them. What am I missing???

mosquitto

logins: []
customize:
  active: false
  folder: mosquitto
certfile: fullchain.pem
keyfile: privkey.pem
require_certificate: false

zigbee2mqtt

data_path: /config/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
  base_topic: zigbee2mqtt
  server: mqtt://core-mosquitto
  user: mqtt
  password: xxxxxxxx
serial:
  port: tcp://tube_zb_gw_cc2652p2.local:6638
advanced:
  log_level: warn
  pan_id: 6754
  channel: 11
  network_key:
    - 1
    - 3
    - 5
    - 7
    - 9
    - 11
    - 13
    - 15
    - 0
    - 2
    - 4
    - 6
    - 8
    - 10
    - 12
    - 13
  availability_blocklist: []
  availability_passlist: []
device_options: {}
blocklist: []
passlist: []
queue: {}
frontend:
  port: 8099
experimental:
  new_api: true
availability: false
socat:
  enabled: false
  master: pty,raw,echo=0,link=/tmp/ttyZ2M,mode=777
  slave: tcp-listen:8485,keepalive,nodelay,reuseaddr,keepidle=1,keepintvl=1,keepcnt=5
  options: '-d -d'
  log: false

zigbee2mqtt logs

[s6-init] making user provided files available at /var/run/s6/etc...exited 0.
[s6-init] ensuring user provided files have correct perms...exited 0.
[fix-attrs.d] applying ownership & permissions fixes...
[fix-attrs.d] done.
[cont-init.d] executing container initialization scripts...
[cont-init.d] socat.sh: executing... 
[21:41:22] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing... 
[21:41:23] INFO: MQTT available, fetching server detail ...
[21:41:24] INFO: Previous config file found, checking backup
[21:41:24] INFO: Creating backup config in '/config/zigbee2mqtt/.configuration.yaml.bk'
[21:41:24] INFO: Adjusting Zigbee2mqtt core yaml config with add-on quirks ...
[cont-init.d] zigbee2mqtt.sh: exited 0.
[cont-init.d] done.
[services.d] starting services
[services.d] done.
[21:41:25] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:error 2021-11-21 21:41:32: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-11-21 21:41:32: Failed to start zigbee
Zigbee2MQTT:error 2021-11-21 21:41:32: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-11-21 21:41:32: Exiting...
Zigbee2MQTT:error 2021-11-21 21:41:32: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:198:24)
    at Socket.emit (events.js:412:35)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[21:41:32] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js

Seems Zigbee2mqtt can’t open the port. Don’t you have to use socat when using the add-on with a remote port ?

No I don’t think you need socat, but the docs do recommend using the IP address, not the hostname.

Tried the IP address again and still errors.

serial:
  port: tcp://IPADDRESS:6638
Zigbee2MQTT:error 2021-11-22 06:47:34: Error while starting zigbee-herdsman
Zigbee2MQTT:error 2021-11-22 06:47:34: Failed to start zigbee
Zigbee2MQTT:error 2021-11-22 06:47:34: Check https://www.zigbee2mqtt.io/information/FAQ.html#help-zigbee2mqtt-fails-to-start for possible solutions
Zigbee2MQTT:error 2021-11-22 06:47:34: Exiting...
Zigbee2MQTT:error 2021-11-22 06:47:34: Error: Error while opening socket
    at Socket.<anonymous> (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:198:24)
    at Socket.emit (events.js:412:35)
    at emitErrorNT (internal/streams/destroy.js:106:8)
    at emitErrorCloseNT (internal/streams/destroy.js:74:3)
    at processTicksAndRejections (internal/process/task_queues.js:82:21)
[06:47:34] INFO: Handing over control to Zigbee2mqtt Core ...

lmao okay just realized what I did. Where do I go to find its IP address?

Either look in your router/dhcp-server, or use a program like fing on your phone.

But its usb. Its not showing up on my router. Wouldn’t I need to find it on the Pi thats running HA?

is it this one ?

or this one:

If it is the first one, it is pure serial, and the tcp:// will never work.

yes the first one. Only usb.

Then

must be something like

serial:
  port: /dev/ttyUSB0

Thank you. Spent hours yesterday searching and reading trying to figure out what I was missing That did it. Every things looks like it is working now. End of my logs.

[07:20:08] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
Zigbee2MQTT:warn  2021-11-22 07:20:41: Using experimental new availability feature

USB connected devices usually cannot be accessed via an IP address unless it’s ex. a WiFi adapter :wink: