How to install Zigbee2MQTT using Portainer

This guide is for those who wish to install Zigbee2MQTT using Docker but don’t like to manage Docker using command line…

https://blog.smarterhome.my/how-to-install-zigbee2mqtt-using-portainer/

4 Likes

hi.
how do you install portainer? :upside_down_face:

it’s in the guide too…

sorry it was a trolling post:
you have to install portainer with command line…
to do not have to install zb2mqtt with command line…
sorry it sound very strange to me.
for zigbee2mqtt:

docker run \
   --device=/dev/ttyACM0 \
   -p 8080:8080 \
   -v $(pwd)/data:/app/data \
   -v /run/udev:/run/udev:ro \
   -e TZ=Europe/Amsterdam \
   koenkk/zigbee2mqtt

for portainer (according to your link):

sudo docker pull portainer/portainer-ce:linux-arm
sudo docker run -d -p 9000:9000 --name=portainer --restart=always -v 
var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data --log-opt max-size=10m --log-opt max-file=5 portainer/portainer-ce:linux-arm

Portainer is for people who doesn’t want to manage their docker using command line. You just need to install it using command line initially. After that, everything is on the Portainer.

There is a certain irony to using the commandline to install a tool to to avoid the commandline. However installing portainer is a one off, once you have it you can install many other dockerised applications.

Installing portainer via commandline is not exactly hard, anyone can copy and paste. Although viewing these forums you’d have to wonder about the ability to copy & paste (as opposed to a screenshot or photo), or the ability to follow even the simplest instructions.

Thank you @masterkenobi

2 Likes

Nice guide; thank you.

1 Like

I’ve used your detailed guide and it’s great.
The only problem even though in Portainer it’s says the container is running - I can’t reach the webpage in the port I specified.

What can went wrong?

So what settings did you use for z2m?

Please advise me. I see that in the volumes section, directory binding between the host and the container is used. Can you explain why directory binding is used instead of Docker named volumes?

Seems to be volumes actually:

This is similar to binding by name as linux directories, so the bind button is clicked and the /run /udev directory has read permission. In the zigbee2mqtt configuration from koenkk, the configuration looks the same.

I’m wondering if it’s possible and what will happen if I use named docker volumes, since it’s easy to do in the Volumes section of the Portainer interface

Then I have misinterpreted the colour of the UI. I thought those colours represented

Volume
Read-only
Volume
Writable

ie the light blue was selected, and the dark blue was unselected.

You seem to be of the view that it is the other way around, And I am now unsure.

i followed the guide but i cant see those volumes (/home/pi/zigbee2mqtt/data and /run/udev). Do i have to create them before creating the container?

You can’t see the directories where? On the host, or in the container.

So let me explain what i did because i’m a newbie and i dont think i fully understood your question, and maybe after the explanation you’ll understand it better.

I have HomeAssistant installed together with pihole and pivpn on a raspberry pi 3b+.
HomeAssistant is installed using Portainer.
Yesterday i installed Eclipse MQTT broker also in Portainer.
Today i spent all day trying to install and set up zigbee2mqtt, but i got errors with every method. Then i found this thread and tried to use the guide from the first post (and it seems the easiest method of them all).


This is how my Portainer looks.

Now back to this guide, after i created the zigbee2mqtt folder on /home/pi i downlaoded the config from wget https://raw.githubusercontent.com/Koenkk/zigbee2mqtt/master/data/configuration.yaml -P data and edited it with correct info as its being written in the guide.

Then i proceed to create the container for it in Portainer but when it comes to map the volumes, i cannot see home/pi/zigbee2mqtt/data and /run/udev in the drop-down menu (see the picture).

finally, ive managed to install it, but i got this " error":

Assertion failed: Command (setConfigurationValue) returned unexpected state: [object Object]

SONOFF Zigbee dongle-E with latest EZSP firmware installed from here: https://darkxst.github.io/silabs-firmware-builder/

Thanks for trying to help noob guys like me, but I pretty fast ran in to Noob problems. You are asking to create a file and enter stuff int it, in order to change the name of the USB Zigbee dongle? I tried to run the line from the command prompt (I was not SSHed in as I have not figured how to yet (hav also not tried, just running it like a normal PC with screen mounted for now.) But then the second line was not working, the whole command prompt screen sort of turned into something reading GNU Nano 7.2 at the top… Not sure what to make of it!?

What exactly is the last command you entered?