Package Details: zigbee2mqtt 1.17.1-1

Git Clone URL: (read-only, click to copy)
Package Base: zigbee2mqtt
Description: A Zigbee to MQTT bridge
Upstream URL:
Licenses: GPL3
Conflicts: zigbee2mqtt
Provides: zigbee2mqtt
Submitter: buckket
Maintainer: buckket
Last Packager: buckket
Votes: 5
Popularity: 0.49
First Submitted: 2020-03-30 00:32
Last Updated: 2021-02-21 12:54

Latest Comments

1 2 Next › Last »

buckket commented on 2020-12-15 19:17

I've bumped the version and updated the package to include the suggestions @BrainDamage made previously. Thank you very much for helping!

The package now follows the a more standard approach and the configuration file is now located in /etc/zigbee2mqtt. The runtime data files now are stored in /var/lib/zigbee2mqtt.

You have to manually copy your config file from the old location to the new one. When upgrading a notice should appear with an example command.

If you encounter any problems, please let me know.

BrainDamage commented on 2020-11-22 20:30

I have some suggestions to improve the PKGBUILD:

npm start is a bad way to launch the program; all it does is two tasks:

  • update the libraries according to the package file

  • launch node index.js

the first part is problematic, if it creates new files they may conflict on a package update, if one wants to update the libs, they can always rebuild the package

the second part, well, we can do it ourselves without involving npm, so we can drop the dependency at runtime and make it compile time only

moreover, having program, program runtime data and configuration all in the same place goes against security practices, package guidelines and backup ease, instead of dumping all in /opt, one could use ZIGBEE2MQTT_DATA to redirect the RW dir to the user's home

finally, the configuration, should belong to /etc, and then symlinked to work around the program's deficiency in reading a separate config location ( ZIGBEE2MQTT_CONFIG is deprecated ).

accounting for all the changes, the PKGBUILD would look like:


pkgdesc='A Zigbee to MQTT bridge'
arch=('x86_64' 'arm' 'armv6h' 'armv7h' 'aarch64')
  'cc-tool: To flash Texas Instruments CC2531 debugger'
  'mosquitto: MQTT broker')

package() {
  cd "${pkgname}-${pkgver}"
  npm install --cache "${srcdir}/npm-cache" --user root

  install -d "${pkgdir}/usr/lib/node_modules/${pkgname}"
  cp -dpr --no-preserve=ownership "${srcdir}/${pkgname}-${pkgver}/." "${pkgdir}/usr/lib/node_modules/${pkgname}"

  install -Dm644 data/configuration.yaml "${pkgdir}/etc/${pkgname}/configuration.yaml"

  install -Dm644 "${srcdir}/${pkgname}.service" "${pkgdir}/usr/lib/systemd/system/${pkgname}.service"
  install -Dm644 "${srcdir}/${pkgname}.sysusers" "${pkgdir}/usr/lib/sysusers.d/${pkgname}.conf"
  install -Dm644 "${srcdir}/${pkgname}.tmpfiles" "${pkgdir}/usr/lib/tmpfiles.d/${pkgname}.conf"

$ cat zigbee2mqtt.service


ExecStart=node /usr/lib/node_modules/zigbee2mqtt/index.js


$ cat zigbee2mqtt.sysusers

u zigbee2mqtt - "zigbee2mqtt service user"
m zigbee2mqtt uucp

$ cat zigbee2mqtt.tmpfiles

z /etc/zigbee2mqtt/configuration.yaml 0640 zigbee2mqtt zigbee2mqtt
L /var/lib/zigbee2mqtt/configuration.yaml - - - - /etc/zigbee2mqtt/configuration.yaml

mantielero commented on 2020-11-08 10:23

For the zigbee2mqtt.service, zigbee2mqtt.sysusers, zigbee2mqtt.tmpfiles I made some changes that can be useful: 1. I moved zigbee2mqtt.service to /etc/system.d/system/ (rather than in /usr/lib/system.d/system. 2. Probably it is needed to: a. To create the zigbee2mqtt user and zigbee2mqtt group. b. To include that user in the group uucp, given that: ls -la /dev/ttyACM0 shows:

crw-rw---- 1 root uucp 166, 0 Nov  8 10:21 /dev/ttyACM0

mantielero commented on 2020-11-06 21:39

It is failing in my RPi 1B. I installed manually following:

# Clone Zigbee2MQTT repository
sudo git clone /opt/zigbee2mqtt
sudo chown -R alarm:alarm /opt/zigbee2mqtt

# Install dependencies (as user "alarm")
cd /opt/zigbee2mqtt
npm ci

I don't know why it fails, but I get an error similar to:

npm ERR! cb() never called! 

linxpert commented on 2020-10-15 19:38

@sD810: script doesn't stop on my Pi4 (aarch64) at this step of the build process but takes a very long time though before it continues.

dS810 commented on 2020-10-14 22:34

Script stopts on this line:

-> Stripping unneeded symbols from binaries and libraries...

Hardware: RaspberryPi 4

OS: Archlinux ARM latest version

buckket commented on 2020-10-12 23:21

Fixed the unnecessary comma, PKGBUILD should now work with pikaur. Thanks for pointing it out.

linxpert commented on 2020-10-12 14:54

I can confirm the issue reported by @Smokie with pikaur and flawless build just using makepkg. Compared to other packages in AUR, the comma seems indeed not to be correct.

Smokie commented on 2020-10-11 21:25

For me, pikaur fails to install this pkg. I suspect the comma in depends is invalid, even it seems to not hurt makepkg. Can you adjust depends=('nodejs>=10.0', 'npm') to depends=('nodejs>=10.0' 'npm')

buckket commented on 2020-10-07 14:46

Thanks for your feedback. I’ve included the ARM architectures to the PKGBUILD.