Install zigbee2mqtt on a NanoPI Neo 256Mb
2 min read

Install zigbee2mqtt on a NanoPI Neo 256Mb

Install zigbee2mqtt on a NanoPI Neo 256Mb

Yesterday I've received my NanoPi Neo with 256Mb of RAM. Such a cute and tiny board:


It has a bunch of pins too :)


Initial setup

I've started with Armbian first, but I hadn't too much luck. I've been told it was the power supply though :)

After, I've downloaded FriendlyCore from Friendly ARM, which is an Ubuntu Core 16.04 system. It's a bit out of date, but it worked out of the box.

I've logged into the machine via SSH and updated the system:

sudo apt update
sudo apt upgrade

As a bit of hardware, I've got Slaesh's CC2652RB stick (from here). I've got the type 4 for maximum range :)

Install zigbee2mqtt

I've installed the system using verbatim the guide on the site. The only change is that I've used /dev/ttyUSB0 instead of /dev/ttyACM0.

For my own reference, here are the steps I've run:

  1. Add the node 14.x repo:

    sudo curl -sL | sudo -E bash -
  2. Install the required dependencies:

    sudo apt-get install -y nodejs git make g++ gcc
  3. Clone the zigbee2mqtt repo (and change the ownership)

    sudo git clone /opt/zigbee2mqtt
    sudo chown -R pi:pi /opt/zigbee2mqtt
  4. Install dependencies:

    cd /opt/zigbee2mqtt
    npm ci --production

    You should get an output similar to:

    node-pre-gyp info ok
    added 383 packages in 111.613s
  5. Update the configuration file (/opt/zigbee2mqtt/data/configuration.yaml) with something like:

    # MQTT settings
      # MQTT base topic for Zigbee2MQTT MQTT messages
      base_topic: zigbee2mqtt
      # MQTT server URL
      server: 'mqtt://localhost'
      # MQTT server authentication, uncomment if required:
      # user: my_user
      # password: my_password
      network_key: GENERATE

    You will want to set up your own mqtt server address (I have mine as plugin in HomeAssistant) and credentials.

  6. (optional) Start the server:

    cd /opt/zigbee2mqtt
    npm start

    I've done this just to see it connects to the mqtt server.

  7. Add the service.

    Edit /etc/systemd/system/zigbee2mqtt.service with something like:

    ExecStart=/usr/bin/npm start
    # Or use StandardOutput=null if you don't want Zigbee2MQTT messages filling syslog, for more options see systemd.exec(5)
  8. Start the service:

    sudo systemctl start zigbee2mqtt
  9. Check it's working:

    systemctl status zigbee2mqtt.service
  10. If all is ok, then enable the service:

    sudo systemctl enable zigbee2mqtt.service


  1. If you run zigbee2mqtt from root, redo sudo chown -R pi:pi /opt/zigbee2mqtt because the logs created will be owned by root :)

  2. If the service doesn't work, then check it with the status command above. You can also see the error in:

    sudo journalctl -u zigbee2mqtt.service -f