I am trying to install Zigbee2MQTT on my HA. I am running it on my Synology NAS in Docker with a SkyConnect. I have installed the USB driver (ttyUSB0) And ZHA is working fine. However some of my devices are unsupported so I need to use MQTT.
I have been following many different tutoruals but to no avail. the docker container keeps crashing. Here is the log. Any help is greatly appreciated!
date stream content
2024/05/13 15:08:32 stdout at read (/app/lib/util/settings.ts:335:20)
2024/05/13 15:08:32 stdout at Object.read (/app/lib/util/yaml.ts:7:29)
2024/05/13 15:08:32 stdout at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
2024/05/13 15:08:32 stdout at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
2024/05/13 15:08:32 stdout at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
2024/05/13 15:08:32 stdout at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
2024/05/13 15:08:32 stdout at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1173:9)
2024/05/13 15:08:32 stdout at storeMappingPair (/app/node_modules/js-yaml/lib/loader.js:358:7)
2024/05/13 15:08:32 stdout at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
2024/05/13 15:08:32 stdout at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
2024/05/13 15:08:32 stdout 12 | port: 8081
2024/05/13 15:08:32 stdout 11 | # Optional, default 8080 or y ...
2024/05/13 15:08:32 stdout ------^
2024/05/13 15:08:32 stdout 10 | frontend:
2024/05/13 15:08:32 stdout 9 |
2024/05/13 15:08:32 stdout 8 | adapter: ezsp
2024/05/13 15:08:32 stdout 7 | port: /dev/ttyUSB0
2024/05/13 15:08:32 stdout
2024/05/13 15:08:32 stdout YAMLException: duplicated mapping key (10:1)
2024/05/13 15:08:32 stdout ^
And here is my config;
homeassistant: true
mqtt:
base_topic: zigbee2mqtt
server: 'mqtt://192.168.2.21:1883'
serial:
port: /dev/ttyUSB0
adapter: ezsp
frontend: true
# Optional, default 8080 or you can use your own as well.
port: 8081
# IP address of the device running Zigbee2MQTT
host: 192.168.2.21
advanced:
network_key:
- 232
- 186
- 200
- 27
- 37
- 227
- 93
- 67
- 5
- 82
- 102
- 111
- 148
- 44
- 240
- 3
pan_id: 27185
ext_pan_id:
- 103
- 216
- 156
- 29
- 126
- 181
- 13
- 201
I noticed I had that in a previous config. Appereantly I sent an old log I think. Sorry for the confusion. As seen in my config. I have specified it only once here. This is the latest log;
date stream content
2024/05/13 17:33:57 stdout at getInternalSettings (/app/lib/util/settings.ts:440:21)
2024/05/13 17:33:57 stdout at read (/app/lib/util/settings.ts:335:20)
2024/05/13 17:33:57 stdout at Object.read (/app/lib/util/yaml.ts:7:29)
2024/05/13 17:33:57 stdout at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
2024/05/13 17:33:57 stdout at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
2024/05/13 17:33:57 stdout at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
2024/05/13 17:33:57 stdout at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
2024/05/13 17:33:57 stdout at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1182:7)
2024/05/13 17:33:57 stdout at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
2024/05/13 17:33:57 stdout at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
2024/05/13 17:33:57 stdout 13 | host: 192.168.2.21
2024/05/13 17:33:57 stdout 12 | # IP address of the device runn ...
2024/05/13 17:33:57 stdout --------^
2024/05/13 17:33:57 stdout 11 | port: 8081
2024/05/13 17:33:57 stdout 10 | # Optional, default 8080 or you ...
2024/05/13 17:33:57 stdout 9 | frontend: true
2024/05/13 17:33:57 stdout 8 |
2024/05/13 17:33:57 stdout
2024/05/13 17:33:57 stdout YAMLException: bad indentation of a mapping entry (11:3)
2024/05/13 17:33:57 stdout ^
2024/05/13 17:33:57 stdout return new YAMLException(message, mark);
2024/05/13 17:33:57 stdout /app/node_modules/js-yaml/lib/loader.js:183
2024/05/13 17:33:57 stdout
2024/05/13 17:33:57 stdout Using '/app/data' as data directory
2024/05/13 17:33:36 stdout at getInternalSettings (/app/lib/util/settings.ts:440:21)
2024/05/13 17:33:36 stdout at read (/app/lib/util/settings.ts:335:20)
2024/05/13 17:33:36 stdout at Object.read (/app/lib/util/yaml.ts:7:29)
2024/05/13 17:33:36 stdout at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
2024/05/13 17:33:36 stdout at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
2024/05/13 17:33:36 stdout at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
2024/05/13 17:33:36 stdout at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
2024/05/13 17:33:36 stdout at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1182:7)
2024/05/13 17:33:36 stdout at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
2024/05/13 17:33:36 stdout at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
2024/05/13 17:33:36 stdout 13 | host: 192.168.2.21
2024/05/13 17:33:36 stdout 12 | # IP address of the device runn ...
2024/05/13 17:33:36 stdout --------^
2024/05/13 17:33:36 stdout 11 | port: 8081
2024/05/13 17:33:36 stdout 10 | # Optional, default 8080 or you ...
2024/05/13 17:33:36 stdout 9 | frontend: true
2024/05/13 17:33:36 stdout 8 |
2024/05/13 17:33:36 stdout
2024/05/13 17:33:36 stdout YAMLException: bad indentation of a mapping entry (11:3)
2024/05/13 17:33:36 stdout ^
2024/05/13 17:33:36 stdout return new YAMLException(message, mark);
2024/05/13 17:33:36 stdout /app/node_modules/js-yaml/lib/loader.js:183
2024/05/13 17:33:36 stdout
2024/05/13 17:33:36 stdout Using '/app/data' as data directory
2024/05/13 17:33:02 stdout at getInternalSettings (/app/lib/util/settings.ts:440:21)
2024/05/13 17:33:02 stdout at read (/app/lib/util/settings.ts:335:20)
2024/05/13 17:33:02 stdout at Object.read (/app/lib/util/yaml.ts:7:29)
2024/05/13 17:33:02 stdout at Object.load (/app/node_modules/js-yaml/lib/loader.js:1714:19)
2024/05/13 17:33:02 stdout at loadDocuments (/app/node_modules/js-yaml/lib/loader.js:1688:5)
2024/05/13 17:33:02 stdout at readDocument (/app/node_modules/js-yaml/lib/loader.js:1625:3)
2024/05/13 17:33:02 stdout at composeNode (/app/node_modules/js-yaml/lib/loader.js:1441:12)
2024/05/13 17:33:02 stdout at readBlockMapping (/app/node_modules/js-yaml/lib/loader.js:1182:7)
2024/05/13 17:33:02 stdout at throwError (/app/node_modules/js-yaml/lib/loader.js:187:9)
2024/05/13 17:33:02 stdout at generateError (/app/node_modules/js-yaml/lib/loader.js:183:10)
2024/05/13 17:33:02 stdout 13 | host: 192.168.2.21
2024/05/13 17:33:02 stdout 12 | # IP address of the device runn ...
2024/05/13 17:33:02 stdout --------^
2024/05/13 17:33:02 stdout 11 | port: 8081
2024/05/13 17:33:02 stdout 10 | # Optional, default 8080 or you ...
2024/05/13 17:33:02 stdout 9 | frontend: true
2024/05/13 17:33:02 stdout 8 |
2024/05/13 17:33:02 stdout
2024/05/13 17:33:02 stdout YAMLException: bad indentation of a mapping entry (11:3)
2024/05/13 17:33:02 stdout ^
2024/05/13 17:33:02 stdout return new YAMLException(message, mark);
2024/05/13 17:33:02 stdout /app/node_modules/js-yaml/lib/loader.js:183
2024/05/13 17:33:02 stdout
2024/05/13 17:33:01 stdout Using '/app/data' as data directory
Since I am running HA in a docker I cannot use addons (if I understand correctly)
It is not running HomeassitantOS and can therefore not use addons right?
Therefore both MQTT and Z2M are containers running in a docker.
My MQTT config is very plain I have to admit. Am I missing something here?
# Place your local configuration in /mosquitto/confing/
allow_anonymous true
listener 1883
persistence true
persistence_location /mosquitto/data/
log_dest file /mosquitto/log/mosquitto.log
Ahhhh completely missed that you’re running Container. Sorry about that!
Can you post the docker compose file for MQTT and Z2M? I wonder if the adapter is being passed through properly. Everything after this [39m: z2m: Error: Failure send version:{"type":"Buffer","data":[0,0,0,4]} leads me to think that the adapter isn’t being detected.
hmm I’ve been digging around a bit but I cant figure out how to get the compose file just yet. How can I get this file? I have only been using GUI Docker and not Docker Compose.
Ummmm… you can’t. But, can you screen cap the settings in your NAS? Specifically for Z2M. Since you can get into MQTT with MQTT Explorer, I doubt that’s the issue.
These are the settings that in shows in the Docker UI.
Sorry if this is not what you meant. I am still new to this stuff.
The z2m config.yaml I already sent previously.
Yup. Ok, so I don’t see where it’s passing in the USB stick to /dev/usbTTY0. Typically, in a docker compose (which I don’t think you can use), you need to pass in the USB stick (using /dev/<something>).
Yup. That’s exactly what it is. I’ll see if I can dig up something to how to pass in the USB stick. I don’t have that NAS, so a little hard for me to troubleshoot it.
Yup. Ok, so I don’t see where it’s passing in the USB stick to /dev/usbTTY0. Typically, in a docker compose (which I don’t think you can use), you need to pass in the USB stick.
Awesome we got the culprit atleast…
Yes I changed that (in the Comfig.yaml) to;
serial:
port: /dev/ttyUSB0
adapter: ezsp
As that is my USB SkyConnect.
I already manually installed the USB driver for that one to get my skyconnect working at all in HA with ZHA.
(I followed this tutorial for that: https://www.youtube.com/watch?v=GjZI4Mw0a4c )
(annoying reply timer…)
Yes the SkyCOnnect USB works fine in HomeAssist using ZHA.
When i SSH the ‘ls’ command I dont see the ttyACM0 that everyone mentions in the Zigbee2mqtt install tutorials. So I changed those references to my ttyUSB0. (for which I installed the drivers.)