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!

Update!

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
./update.sh

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.

PayPal

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

Patreon

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

image/svg+xml

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

client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image
client-image

Learn NodeRED

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

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

Best Automation Projects

Tuya SDK for beginners: Intro to Tuya Cloud API

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

NEST your old thermostat under $5

0
Nest-ing up your older thermostat under $5

Sonoff Zigbee Bridge – review

0
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!

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

Nora – Google Assistant in NodeRED

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

Smart Home

Meros TRV to the rescue?

0
I got my hands on another TRV - this time from Meross. I heard good things about the brand so I wanted to see if Meross TRV would be good to manage smart heating.

Aqara brings Thread sensors but…

0
Aqara brings new Thread sensors to their ecosystem. First sensors to support Matter this way are Aqara Motion and Light Sensor P2 and Aqara Contact Sensor P2

Multi-lights for your ceiling from Aqara

0
This is the biggest light I held in my hands so far. It's ZigBee and it comes from Aqara - meet Aqara Ceiling Light T1M

Almost the fastest PIR sensor you can buy

0
ITEAD introduced a new ZigBee sensor - Sonoff PIR (SNZB-03P) which is also the fastest PIR sensor in their line up. Is it good? Read more!

Smart Panel automation by Tuya

0
I'm checking out two smart panels by Tuya. Both run Linux systems, fit inside the wall switch cavity and offer a range of automation options