HomeHome AutomationMy ZigBee2MQTT just got better

My ZigBee2MQTT just got better

You should try this

Eversince I discovered ZigBee2MQTT Dashboard, I thought my experience with the framework managing all ZigBee devices couldn’t get any better. I have to mess about with the installation from time to time when testing new ZigBee devices sent to me. They are often not supported at launch, leaving me to figure out how to make a converter that “kinda works”. I went through the usual process last night, except this time it was much different!


Each time I add a new unsupported device to ZigBee2MQTT, I make sure my installation is up to date. I’d rather find the correct converter in the update than try to figure out things for myself. This process required several steps to backup the files, perform updates and…

It was simply annoying…

The recent installation (at least on my end) brought changes to how you update the ZigBee2MQTT. Now you can do that with a single line of code! What’s even better, you can schedule the task yourself and forget about it.

I’m aware that you could, in theory, make a DIY script which would execute the steps required before, but running the update file made by the developer is so much easier. Moving forward this is how you update your ZigBee2MQTT:

cd /opt/zigbee2mqtt

Or if you don’t want to mess about and like one-liners: /opt/zigbee2mqtt/update.sh

The script will also take care of pausing Z2M and resuming it after the update for you. If you don’t want to do it manually each time, you can simply use crontab to do this for you.

sudo crontab -e

Then add these 3 tasks to the desired schedule. If you want to customise your schedule in a very simple way, check out this generator online! In the sample below, I’m running my update script every week on Sunday:

0 3 * * 7 /opt/zigbee2mqtt/update.sh

Add the line to your file, and save it with Ctrl+X, Y. Then enjoy unattended updates. Bear in mind, that it’s wise to schedule a backup of your Z2M files, and you can do it by first removing the previous backup, and then copying the data folder:

#remove old back up and copy new files over 
rm -r /backup/data
cp -r /opt/zigbee2mqtt/data /backup/data

Final Thoughts

It’s a small but very useful quality-of-life improvement. Add it alongside the two other most popular commands for your terminal sudo apt-get update && sudo apt-get upgrade -y to always keep your system up to date. If you have any good tips for managing your home automation let me know in this Reddit thread.


Nothing says "Thank you" better than keeping my coffee jar topped up!


Support me on Patreon and get an early access to tutorial files and videos.


Bitcoin (BTC)

Use this QR to keep me caffeinated with BTC: 1FwFqqh71mUTENcRe9q4s9AWFgoc8BA9ZU

Smart Ideas with

Automate your space in with these ecosystems and integrate it with other automation services


Learn NodeRED

NodeRED for beginners: 1. Why do you need a NodeRED server?

To server or not to server? That's a very silly question!

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

Working with Tuya Cloud API. A guide to Cloud automation for beginners, get started with REST!

NEST your old thermostat under $5

Nest-ing up your older thermostat under $5

Nora – Google Assistant in NodeRED

Integrate Google Assistant with NodeRED thanks to Nora - NodeRED home automation

Sonoff Zigbee Bridge – review

Sonoff line up will soon include Sonoff Zigbee Bridge and more Zigbee sensors - here is the first look

DIY Smart Washing Machine – for about 15 bucks!

Learn how to add washing machine notifications to your Google Home on the cheap

Smart Home

SwitchBot S10: cleaning re-imagined!

SwitchBot S10 promises unattended vacuuming and mopping so you can focus on things you love and care for. Does it deliver?

Sonoff for households and gardens

ITEAD released two ZigBee devices to manage water in your household and gardens. Now you can monitor the flow and dispense water with Sonoff SWV and prevent water damage using the Sonoff Water Leak sensor with a twist.

I wish I had known about the SMLIGHT ZigBee/Thread Coordinators sooner!

SMLIGHT coordinators are the perfect choice for anyone just diving into ZigBee. SLZB-06 series is easy to use and comes with future-proofing Thread support.

Sonoff ZigBee Bridge U isn’t what you think!

I expected Sonoff ZB Bridge U to be a next gen ZigBee bridge with Matter support. Turns out, there is much more to talk about!

Aqara “Everything” M3 Hub

When I started my home automation adventure, the current problem was the number of ecosystems needed to outfit your smart home. Aqara M3 Hub has a long list of protocols to match that!