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

Nora – Google Assistant in NodeRED

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

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

Smart Home

We’ve seen this before: SwitchBot K10+ PRO

0
This is an odd one. Building on the success of SwitchBot K10+ they released SwitchBot K10+ PRO - but is the experience actually better?

Is this the smart panel we have waited for?

0
ITEAD has released a new smart panel: Sonoff NSPanel Pro 120 - have they learned the lesson from the terrible launch of the original Pro? Let's see what's new.

Aqara FP1E detects motionless humans

0
This isn't exactly a new device, it's an interaction of the original Aqara presence sensor. Aqara FP1E brings Matter, ZigBee and new triggers to your smart home

SwitchBot S10: cleaning re-imagined!

0
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

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