Successfully installed Core on debian bookworm 2 days ago (this made me happy!) and moving my old configuration to the new debian install was relatively painless (great thanks to mathan416 [Guide: Home Assistant Core - Restoring a Backup] ) for this.
the one thing that didn’t come across was the zigbee2mqtt that I used with my SMLight SLZB-06. So as a first pass I went to reinstall it. I found these references:
the last referred to adding their repository to the add-in store. Except that this Core on bookworm install doesn’t have an add-in store.
fishing around I found this reference:
Which suggests that Core doesn’t do add-ins (because docker).
So, cutting to the chase, before I flail around much more, is zigbee2mqtt using SLZB-06 doable with a Core installed on debian bookworm? Relatively easily and straightforward?
Or is it a better use of time to set zigbee to the side and move on to lower hanging automation fruit?
Set aside a little time to work on the docker stuff for zigbee2mqtt following:
summary: this zigbee2mqtt docker seems to insist that the zigbee interface device by physically connected to the docker host. after flailing around for a bit I’m at a loss and looking for the perfectly obvious fix that I’ve missed.
thanks!
Details below.
I’m suddenly and unpleasantly reminded why I abandoned learning docker back when.
to the point, I’m stalled at the part of the zigbee2mqtt.sh that (I presume) is supposed to direct the zigbee2mqtt to the SLZB-06. In my case the hostname of the SLZB-06 is ‘zb’ on a static ip (physically located on the other side of the house).
this zigbee2mqtt docker seems to insist that it expects/demands that the zigbee interface (the SMZB-06 in this case) be physically or maybe virtually (e.g. ser2net) located on a serial port on the docker host. (aside: using the ‘by-id’ maybe a USB port also. but still physically located on the physical host).
junosuarez Mar 13, 2023
No need to put anything in devices in docker-compose.yaml - since you’re connecting over the network instead of a local USB device, the docker devices config doesn’t apply…
update: apparently the issue is within the docker image, which won’t stay up long enough to sh into and explore further. other than that I don’t know how to examine the insides of a shutdown docker so that’s that.
I did look at the ‘linux install’ page on the zigbee2mqtt site…and see that that option wants to be node.js. Which…no. Hard no. nuff said about that.
an alternative might be using the docker as designed for a device on a USB- serial port lookalike using socat or similar. but that’s just annoying. If I was going to do that I could have bought a USB cheapie an used used one of the old rasperry pi’s I have laying around and usbip. But then would require yet-another long powerbrick run (why did I buy POE? oh. right. So I wouldn’t have to do that). But it is an option to explore if someone else needs to.
port: ‘tcp:/zb:6638’ <---- single slash, should be two slashes
correcting that gives a different error dump
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: ‘tcp://zb:6638’
Output:
$ /home/homeassistant/zigbee2mqtt-docker$ sudo ./zigbee2mqtt_docker_start.sh
Using ‘/app/data’ as data directory
Starting Zigbee2MQTT without watchdog.
[2024-10-17 08:27:31] info: z2m: Logging to console, file (filename: log.log)
[2024-10-17 08:27:31] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #e06848d)
[2024-10-17 08:27:31] info: z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-17 08:27:31] info: zh:zstack:znp: Opening TCP socket with zb:6638
[2024-10-17 08:27:31] info: zh:zstack:znp: Socket error
[2024-10-17 08:27:31] error: z2m: Error while starting zigbee-herdsman
[2024-10-17 08:27:31] error: z2m: Failed to start zigbee
[2024-10-17 08:27:31] error: z2m: Check Zigbee2MQTT fails to start | Zigbee2MQTT for possible solutions
[2024-10-17 08:27:31] error: z2m: Exiting…
[2024-10-17 08:27:31] error: z2m: Error: Error while opening socket
at Socket. (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:166:24)
at Socket.emit (node:events:529:35)
at emitErrorNT (node:internal/streams/destroy:151:8)
at emitErrorCloseNT (node:internal/streams/destroy:116:3)
at processTicksAndRejections (node:internal/process/task_queues:82:21)
/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264
var er = new ERR_STREAM_WRITE_AFTER_END();
^
Error: write after end
at writeAfterEnd (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:264:12)
at DerivedLogger.Writable.write (/app/node_modules/winston/node_modules/readable-stream/lib/_stream_writable.js:300:21)
at DerivedLogger.log (/app/node_modules/winston/lib/winston/logger.js:231:12)
at Logger.log (/app/lib/util/logger.ts:198:25)
at Logger.info (/app/lib/util/logger.ts:211:14)
at Znp.onPortClose (/app/node_modules/zigbee-herdsman/src/adapter/z-stack/znp/znp.ts:96:16)
at Object.onceWrapper (node:events:632:26)
at Socket.emit (node:events:517:28)
at TCP. (node:net:350:12)
well. on a longshot like ‘oh ok why not tried everything else’ I used the ip of the SLZB-06 instead of the hostname in configuration.yaml.
yeah. That seems to have done the trick.
$ /home/homeassistant/zigbee2mqtt-docker$ ./zigbee2mqtt_docker_start.sh
Using ‘/app/data’ as data directory
Starting Zigbee2MQTT without watchdog.
[2024-10-17 08:44:42] info: z2m: Logging to console, file (filename: log.log)
[2024-10-17 08:44:42] info: z2m: Starting Zigbee2MQTT version 1.40.2 (commit #e06848d)
[2024-10-17 08:44:42] info: z2m: Starting zigbee-herdsman (2.1.3)
[2024-10-17 08:44:43] info: zh:zstack:znp: Opening TCP socket with 192.168.22.27:6638
[2024-10-17 08:44:43] info: zh:zstack:znp: Socket connected
[2024-10-17 08:44:43] info: zh:zstack:znp: Socket ready
[2024-10-17 08:44:43] info: zh:zstack:znp: Writing CC2530/CC2531 skip bootloader payload
[2024-10-17 08:44:44] info: zh:zstack:znp: Skip bootloader for CC2652/CC1352
[2024-10-17 08:45:04] info: zh:controller: Wrote coordinator backup to ‘/app/data/coordinator_backup.json’
[2024-10-17 08:45:05] info: z2m: zigbee-herdsman started (reset)
[2024-10-17 08:45:05] info: z2m: Coordinator firmware version: ‘{“meta”:{“maintrel”:1,“majorrel”:2,“minorrel”:7,“product”:1,“revision”:20240710,“transportrev”:2},“type”:“zStack3x0”}’
[2024-10-17 08:45:05] info: z2m: Currently 0 devices are joined.
(etc)
Which…ok. problem solved. Much to my surprise. Seeing as I had grudgingly become reconciled to the “fact” that DNS was everywhere now whether you wanted it or not. OK. Different discussion.