Rpi Docker Install

Posted : admin On 12.08.2021

Docker # It is possible to run Zigbee2MQTT in a Docker container using the official Zigbee2MQTT Docker image. This image support the following architectures: 386, amd64, arm/v6, arm/v7, arm64. Since Zigbee2MQTT images are manifest listed, Docker will auto-detect the architecture and pull the right image. Millions of real salary data collected from government and companies - annual starting salaries, average salaries, payscale by company, job title, and city.

  1. Install Docker For Rpi
  2. Raspberry Pi Pihole Docker Install

It is possible to run Zigbee2MQTT in a Docker container using the official Zigbee2MQTT Docker image.

This image support the following architectures: 386, amd64, arm/v6, arm/v7, arm64.Since Zigbee2MQTT images are manifest listed, Docker will auto-detect the architecture and pull the right image.

Note for Raspberry Pi 1 and zero users: there is a bug in Docker which selects the wrong image architecture.Before executing docker run pull the correct image with docker pull koenkk/zigbee2mqtt --platform linux/arm/v6.

First run the container, this will create the configuration directory. Change configuration.yaml according to your situation and start again.

Running #

Install Docker For Rpi

Run by executing the following commmand:

Raspberry Pi Pihole Docker Install

Parameters explanation #

  • -v $(pwd)/data:/app/data: Directory where Zigbee2MQTT stores it configuration
  • --device=/dev/ttyACM0: Location of adapter (e.g. CC2531)
  • -v /run/udev:/run/udev:ro --privileged=true: is optional, only required for autodetecting the port
  • Optional: in case your MQTT broker is running on localhost and is not within the same Docker network as the Zigbee2MQTT container also add --network host .

Updating #

To update to the latest Docker image:

Tags #

The following tags are available:

  • Latest release version: latest
  • Latest dev version (based on dev branch): latest-dev
  • Specific release version, e.g: 1.7.0

Support new devices #

See How to support new devices

docker-compose example #

Rpi docker install

Docker Stack device mapping #

This is only relevant when using Docker Stack

Docker stack doesn’t support device mappings with option --devices when deploying a stack in Swam mode. A workaround is to bind the device as volume binding and set the right permissions.

The workaround is based on the solution found at Add support for devices with “service create”, all credits goes this him.

  1. Identify cc2531 device Identify the cc2531 device using the following command:

  2. UDEV Rules

    Create a new udev rule for cc2531, idVendor and idProduct must be equal to values from lsusb command. The rule below creates device /dev/cc2531:

    Reload newly created rule using the following command:

  3. Create docker-setup-cc2531.sh

    Copy the following content:

    Set permissions:

  4. Create docker-event-listener.sh Waters empower software manual.

    Copy the following content:

    Set permissions:

  5. Create docker-event-listener.service

    Copy the following content:

    Set permissions:

    Reload daemon

    Start Docker event listener

    Status Docker event listener

    Enable Docker event listener

  6. Verify and deploy Zigbee2MQTT stack

    Now reconnect the cc2531. Verify using the following command:

    Below an example of a docker-stack-zigbee2mqtt.yml:

    In the above example, proxy_traefik-net is the network to connect to the mqtt broker. The constraint makes sure Docker deploys only to this (rpi-3) node, where the cc2531 is connected to. The volume binding /mnt/docker-cluster/zigbee2mqtt/data is the zigbee2mqtt persistent directory, where configuration.yaml is saved.

    The zigbee2Zigbee2MQTTmqtt configuration.yaml should point to /dev/cc2531:

    Deploy the stack: