On Tue, Nov 26, 2024 at 03:56:48PM +0000, Stuart Henderson wrote: > Attached. This sees my zzh ok and things look good - I don't have any > devices handy that I can hook up to it to test at the moment (I don't > really want to start taking my ikea setup to pieces just to test ;) > > : zigbee2mqtt allows you to use your Zigbee devices without the vendor's > : bridge or gateway. > : > : It bridges events and allows you to control your Zigbee devices via > : MQTT. In this way you can integrate your Zigbee devices with whatever > : smart home infrastructure you are using. > : > : To use it, you will need suitable Zigbee bridge hardware (typically > : USB-based), Zigbee devices, and an MQTT server (for example, mosquitto). > : > : zigbee2mqtt has mature support for adapters based on TI zStack, SiLabs > : EmberZNet, and Dresden Elektronik deCONZ. It has experimental support > : for some others. Most of these are USB devices presenting as a serial > : UART (/dev/cuaU*) when running the correct firmware - it has some > : support for network-based (wifi/ethernet) devices. > > tgz attached, user.list diff inline. > > Probably of more interest to many porters than the actual software > itself is the npm handling in the port. It's a multi stage thing - > > 1. fetch deps online using npm and prepare a tar of the node_cache > directory to be uploaded. the "make dist" target does this (largely > based on what I do in the PHP-based librenms but adapted for npm > vs composer). > > 2. in post-extract (i.e. *before* patching), use npm (pointed at > the local cache, so network is not needed) to extract. > > 3. a build phase is needed for zigbee2mqtt, it converts some > TypeScript code to js. again this is pointed at the cache. > > 4. do-install does a "global" install pointed to the fake-install > dir (and again the cache, this one was fun to find out as otherwise > npm would just sit there updating the spinner if network access was > blocked...). this means that only the end result is packaged, the > build-only deps are not (181/64M dirs in node_modules in fake, vs > 407 dirs/170M during build). > > (Plus a bit of fiddling so that config goes under /etc, logs under > /var/log, data under /var/db). > > Any test reports or OKs to import?
Brilliant, Stuart, many thanks. Works as well as it did with my previous hand-rolled install (details on the thread linked by the OP), on a configuration with a CC2652P coordinator, active frontend, syslog+file logging, and sending messages to mosquitto. The pkg-readme also looks clear and complete enough to me. Cheers Zé > Index: user.list > =================================================================== > RCS file: /cvs/ports/infrastructure/db/user.list,v > diff -u -p -r1.453 user.list > --- user.list 25 Nov 2024 08:29:28 -0000 1.453 > +++ user.list 26 Nov 2024 15:41:38 -0000 > @@ -408,3 +408,4 @@ id user group port > 897 _croc _croc sysutils/croc > 898 _icingadb _icingadb net/icinga/icingadb > 899 _openhab _openhab misc/openhab > +900 _z2m _z2m comms/zigbee2mqtt > --