Luligu / matterbridge-zigbee2mqtt

Matterbridge zigbee2mqtt plugin
https://github.com/Luligu/matterbridge-zigbee2mqtt/blob/main/README.md
Apache License 2.0
63 stars 8 forks source link

Unable to add plugin on a Docker Matterbridge installation #14

Closed KC-inDomus closed 4 months ago

KC-inDomus commented 4 months ago

Hi, provided an installation of Matterbridge using Docker latest image, no problem with it. When trying to add matterbridge-zigbee2mqtt plugin, the installation process seems ok but after the needed Matterbridge restart the plugin looks not installed. Here's the logs:

nfo - [10:30:52.574] [Matterbridge]: Installing plugin matterbridge-zigbee2mqtt...
spawn - [10:30:53.394] [Matterbridge:spawn]: npm
spawn - [10:30:53.395] [Matterbridge:spawn]: verb cli /usr/local/bin/node /usr/local/bin/npm npm info
spawn - [10:30:53.395] [Matterbridge:spawn]: using npm@10.5.0 npm info
spawn - [10:30:53.395] [Matterbridge:spawn]: using node@v20.12.2
spawn - [10:30:53.395] [Matterbridge:spawn]: npm verb
spawn - [10:30:53.395] [Matterbridge:spawn]: title npm install matterbridge-zigbee2mqtt npm verb argv "install" "--global" "matterbridge-zigbee2mqtt" "--loglevel" "verbose"
spawn - [10:30:53.395] [Matterbridge:spawn]: npm
spawn - [10:30:53.395] [Matterbridge:spawn]: verb logfile logs-max:10 dir:/root/.npm/_logs/2024-05-01T08_30_53_280Z-
spawn - [10:30:53.395] [Matterbridge:spawn]: npm verb logfile /root/.npm/_logs/2024-05-01T08_30_53_280Z-debug-0.log
spawn - [10:30:55.336] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/matterbridge-zigbee2mqtt 1210ms (cache updated)
spawn - [10:30:55.432] [Matterbridge:spawn]: npm http
spawn - [10:30:55.433] [Matterbridge:spawn]: fetch GET 200 https://registry.npmjs.org/moment 100ms (cache revalidated)
spawn - [10:30:56.207] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/node-ansi-logger 860ms (cache revalidated)
spawn - [10:30:56.262] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/mqtt 930ms (cache updated)
spawn - [10:30:56.416] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/@types%2fws 98ms (cache revalidated)
spawn - [10:30:56.504] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/concat-stream 82ms (cache revalidated)
spawn - [10:30:56.584] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/debug 73ms (cache revalidated)
spawn - [10:30:57.078] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/commist 667ms (cache revalidated)
spawn - [10:30:57.078] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/lru-cache 66ms (cache revalidated)
spawn - [10:30:57.141] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/minimist 70ms (cache revalidated)
spawn - [10:30:57.197] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/help-me 604ms (cache revalidated)
spawn - [10:30:57.488] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/number-allocator 264ms (cache revalidated)
spawn - [10:30:57.543] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/readable-stream 74ms (cache revalidated)
spawn - [10:30:57.557] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/@types%2freadable-stream 1244ms (cache revalidated)
spawn - [10:30:57.646] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/rfdc 83ms (cache revalidated)
spawn - [10:30:57.714] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/split2 65ms (cache revalidated)
spawn - [10:30:58.101] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/mqtt-packet 879ms (cache revalidated)
spawn - [10:30:58.115] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/ws 78ms (cache revalidated)
spawn - [10:30:58.236] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/reinterval 661ms (cache revalidated)
spawn - [10:30:58.353] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/worker-timers 630ms (cache revalidated)
spawn - [10:30:58.478] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/bufferutil 73ms (cache revalidated)
spawn - [10:30:58.557] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/utf-8-validate 73ms (cache revalidated)
spawn - [10:30:58.738] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/safe-buffer 96ms (cache revalidated)
spawn - [10:30:58.797] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/@types%2fnode 162ms (cache revalidated)
spawn - [10:30:59.102] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/inherits 131ms (cache revalidated)
spawn - [10:30:59.116] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/buffer-from 365ms (cache revalidated)
spawn - [10:30:59.116] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/typedarray 133ms (cache revalidated)
spawn - [10:30:59.190] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/process-nextick-args 71ms (cache revalidated)
spawn - [10:30:59.197] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/bl 84ms (cache revalidated)
spawn - [10:30:59.206] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/ms 101ms (cache revalidated)
spawn - [10:30:59.278] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/buffer 64ms (cache revalidated)
spawn - [10:30:59.329] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/abort-controller 121ms (cache revalidated)
spawn - [10:30:59.351] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/events 62ms (cache revalidated)
spawn - [10:30:59.405] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/process 74ms (cache revalidated)
spawn - [10:30:59.420] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/string_decoder 65ms (cache revalidated)
spawn - [10:30:59.496] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/tslib 69ms (cache revalidated)
spawn - [10:30:59.783] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/@babel%2fruntime 372ms (cache revalidated)
spawn - [10:30:59.843] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/js-sdsl 649ms (cache revalidated)
spawn - [10:31:00.252] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/worker-timers-broker 659ms (cache revalidated)
spawn - [10:31:00.478] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/worker-timers-worker 656ms (cache revalidated)
spawn - [10:31:00.584] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/undici-types 64ms (cache revalidated)
spawn - [10:31:00.664] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/util-deprecate 66ms (cache revalidated)
spawn - [10:31:00.776] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/ieee754 80ms (cache revalidated)
spawn - [10:31:00.782] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/base64-js 86ms (cache revalidated)
spawn - [10:31:00.883] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/event-target-shim 70ms (cache revalidated)
spawn - [10:31:00.997] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/regenerator-runtime 76ms (cache revalidated)
spawn - [10:31:01.892] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/fast-unique-numbers 879ms (cache revalidated)
spawn - [10:31:07.010] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/matterbridge-zigbee2mqtt/-/matterbridge-zigbee2mqtt-2.0.12.tgz 962ms (cache miss)
spawn - [10:31:07.419] [Matterbridge:spawn]: npm http fetch GET 200 https://registry.npmjs.org/mqtt/-/mqtt-5.5.5.tgz 1342ms (cache miss)
spawn - [10:31:07.727] [Matterbridge:spawn]: npm info run matterbridge-zigbee2mqtt@2.0.12 install node_modules/matterbridge-zigbee2mqtt node link-matterbridge-script.js
spawn - [10:31:07.815] [Matterbridge:spawn]: npm info run matterbridge-zigbee2mqtt@2.0.12 install { code: 0, signal: null }
spawn - [10:31:07.999] [Matterbridge:spawn]: changed 47 packages in 15s
spawn - [10:31:07.999] [Matterbridge:spawn]: 8 packages are looking for funding run `npm fund` for details
spawn - [10:31:07.999] [Matterbridge:spawn]: npm verb exit 0
spawn - [10:31:08.003] [Matterbridge:spawn]: npm info ok
info - [10:31:08.035] [Matterbridge]: Plugin matterbridge-zigbee2mqtt installed. Full restart required.

As previously told, after an installation no zigbee2mqtt plugin appears at "Registered plugins" box. KC

KC-inDomus commented 4 months ago

Solved. I needed to "add" it after installing.

Luligu commented 4 months ago

Hi, thank you for your interest and the test. You solved by yourself but actually I'm thinking that probably I should also add the plugin when you install it. What do you think?

KC-inDomus commented 4 months ago

Hi, thank you for your interest and the test. You solved by yourself but actually I'm thinking that probably I should also add the plugin when you install it. What do you think?

Would be surely appriciated 👍

Luligu commented 4 months ago

Since you are an expert on docker maybe you find of some interest my docker compose: services: matterbridge: container_name: matterbridge image: luligu/matterbridge:latest # Matterbridge image with the latest tag restart: always # Ensures the container always restarts automatically network_mode: host # Ensures the Matter mdns works volumes:

If you can test it and is working for you like it does for me maybe I could add it to the readme.

Or if you have something better share it if you like.

KC-inDomus commented 4 months ago

This is, plus or minus, the configuration I'm using to test matterbridge and matterbridge-zigbee2mqtt plugin.

matterbridge-zigbee2mqtt plugin seems having some problems; I just opened this issue about it.