ashantyk
(Ashantyk)
March 15, 2022, 5:39pm
1
hi guys, i’m having trouble with the zigbee2mqtt addon. it simply refuses to fully start.
i’m trying to use it with a TI CC2531 usb dongle
my config:
data_path: /share/zigbee2mqtt
external_converters: []
devices: devices.yaml
groups: groups.yaml
homeassistant: true
permit_join: false
mqtt:
base_topic: zigbee2mqtt
serial:
port: /dev/ttyACM0
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: 8089
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
dmesg seing the usb:
zigbee2mqtt log:
[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...
[19:24:49] INFO: Socat not enabled, marking service as down
[cont-init.d] socat.sh: exited 0.
[cont-init.d] zigbee2mqtt.sh: executing...
[19:24:50] INFO: MQTT available, fetching server detail ...
[19:24:50] INFO: MQTT server settings not configured, trying to auto-discovering ...
[19:24:50] INFO: Configuring 'mqtt://core-mosquitto:1883' mqtt server
[19:24:51] INFO: MQTT credentials not configured, trying to auto-discovering ...
[19:24:51] INFO: Configuring'addons' mqtt user
[19:24:51] INFO: Previous config file found, checking backup
[19:24:51] INFO: Creating backup config in '/share/zigbee2mqtt/.configuration.yaml.bk'
[19:24:51] 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.
[19:24:52] INFO: Handing over control to Zigbee2mqtt Core ...
> [email protected] start
> node index.js
from what i can find on the internet there should be more after " > node index.js", but i haven’t managed it to make it go past that stage.
any suggestions on what to try next ?
It looks like you’re missing the mqtt information,
Here’s mine, (I’m using a separate broker)
ashantyk
(Ashantyk)
March 15, 2022, 6:17pm
3
that’s not it. i’m using the mosquitto broker addon, which is at the location specified in the log (mqtt://core-mosquitto:1883)
Ah ok, I thought the credentials had to be in the config.
khvej8
(Khvej8)
March 15, 2022, 7:40pm
5
Why do you use the ttyACM0 as the serial, and not the direct link. Are you sure it have access to the dongle?
Mine looks like
serial:
port: >-
/dev/serial/by-id/usb-ITead_Sonoff_Zigbee_3.0_USB_Dongle_Plus_d617560171d9eb11bf30158e6fe9f4d9-if00-port0
ashantyk
(Ashantyk)
March 16, 2022, 6:09pm
6
i’ve just tried to use the dongle on a windows & debian machine.
cloned the zigbee2mqtt repo (along with npm ci, set the port of the dongle in the config file), installed mosquitto and ran the zigbee2mqtt service and worked like a charm on both. even managed to pair & use a Xiaomi zigbee button/swich… so it’s definitely something to do with the HA environment.
@khvej8 i don’t see why it matters. ttyACM0 seems to map to the correct serial port / device. if i look in /dev/servial/by-id is see the usb dongle mapped to ttyACM0. i even used ttyACM0 on the debian machine and it worked
ashantyk
(Ashantyk)
March 16, 2022, 6:23pm
7
@khvej8 i’ve tried it you way. same issue. stuck at node index.js
ashantyk
(Ashantyk)
March 16, 2022, 8:03pm
8
so… after some more testing, it seems the service actually works, but it does not print anything in the logs.
i found this out in a stupid way, by setting permit_join: true
and pairing a device blindly. the device appeared in HA and i just turned off permit_join off afterwards.
right now, i have another problem, the zigbee2mqtt frontend is not accessible (502 internal service error) when trying to open it from the HA menu. since zigbee2mqtt does not print anyting related to the web service, i don’t know where to start
ashantyk
(Ashantyk)
March 16, 2022, 9:04pm
9
i found the problem. it seems the frontend webservice is not forwarded outside the container.
there is a PR for this (Dev2 by fsfikke · Pull Request #263 · zigbee2mqtt/hassio-zigbee2mqtt · GitHub ) from 3 months ago that is still waiting for merging in the master branch.
ashantyk
(Ashantyk)
March 22, 2022, 8:49am
10
update: so, it wasn’t the PR from my previous post that was to blame. at some point, the frontend started working and i don’t know why.
I have trouble after Restore of Home Assistant. z2m simply does not start. I found this via dsmeg
What does that mean and how can i solve it?
Can this cause the issue?