<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/"
    xmlns:atom="http://www.w3.org/2005/Atom" xmlns:media="http://search.yahoo.com/mrss/" version="2.0">
    <channel>
        
        <title>
            <![CDATA[ Joyce Lin - freeCodeCamp.org ]]>
        </title>
        <description>
            <![CDATA[ Browse thousands of programming tutorials written by experts. Learn Web Development, Data Science, DevOps, Security, and get developer career advice. ]]>
        </description>
        <link>https://www.freecodecamp.org/news/</link>
        <image>
            <url>https://cdn.freecodecamp.org/universal/favicons/favicon.png</url>
            <title>
                <![CDATA[ Joyce Lin - freeCodeCamp.org ]]>
            </title>
            <link>https://www.freecodecamp.org/news/</link>
        </image>
        <generator>Eleventy</generator>
        <lastBuildDate>Mon, 25 May 2026 22:37:14 +0000</lastBuildDate>
        <atom:link href="https://www.freecodecamp.org/news/author/joyceJetson/rss.xml" rel="self" type="application/rss+xml" />
        <ttl>60</ttl>
        
            <item>
                <title>
                    <![CDATA[ How to Set Up Zigbee2MQTT with Docker for Home Automation ]]>
                </title>
                <description>
                    <![CDATA[ Zigbee2MQTT is an open-source tool that lets you manage all of your Zigbee devices locally, so you don’t need cloud services or multiple proprietary hubs. This gives you more control and flexibility, whether used on its own or integrated with platfor... ]]>
                </description>
                <link>https://www.freecodecamp.org/news/how-to-set-up-zigbee2mqtt-with-docker/</link>
                <guid isPermaLink="false">673c8cdcb7f79bc9aa2f300f</guid>
                
                    <category>
                        <![CDATA[ Internet of Things ]]>
                    </category>
                
                    <category>
                        <![CDATA[ Docker ]]>
                    </category>
                
                    <category>
                        <![CDATA[ iot ]]>
                    </category>
                
                <dc:creator>
                    <![CDATA[ Joyce Lin ]]>
                </dc:creator>
                <pubDate>Tue, 19 Nov 2024 13:04:28 +0000</pubDate>
                <media:content url="https://cdn.hashnode.com/res/hashnode/image/upload/v1731778246828/8371f4de-6771-4f57-9e2c-9c57ad651950.png" medium="image" />
                <content:encoded>
                    <![CDATA[ <p><a target="_blank" href="https://www.zigbee2mqtt.io/">Zigbee2MQTT</a> is an open-source tool that lets you manage all of your <a target="_blank" href="https://en.wikipedia.org/wiki/Zigbee">Zigbee</a> devices locally, so you don’t need cloud services or multiple proprietary hubs. This gives you more control and flexibility, whether used on its own or integrated with platforms like <a target="_blank" href="https://www.home-assistant.io/">Home Assistant</a> or <a target="_blank" href="https://nodered.org/">Node-RED</a>.</p>
<p>In this guide, I’ll show you how to set it up using <a target="_blank" href="https://www.docker.com/">Docker</a> for a streamlined, privacy-focused smart home. Docker provides an efficient way to run Zigbee2MQTT as a standalone service, offering a lightweight, modular setup – no Home Assistant required.</p>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731723376381/d983ba57-72ba-4e06-b994-c6b30ad36ca5.png" alt="Diagram showing the integration of Zigbee devices into a local network using Raspberry Pi" class="image--center mx-auto" width="1280" height="500" loading="lazy"></p>
<h2 id="heading-table-of-contents">Table of Contents</h2>
<ul>
<li><p><a class="post-section-overview" href="#heading-key-iot-concepts-in-this-tutorial">Key IoT Concepts in this Tutorial</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-youll-need">What You’ll Need</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-what-youll-do">What You’ll Do</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-prepare-your-environment">How to Prepare Your Environment</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-set-up-the-zigbee2mqtt-configuration">How to Set Up the Zigbee2MQTT Configuration</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-set-up-zigbee2mqtt-and-mqtt-broker-in-docker">How to Set up Zigbee2MQTT and MQTT Broker in Docker</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-launch-the-containers">Launch the Containers</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-pair-your-zigbee-devices">Pair Your Zigbee devices</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-how-to-create-an-automation-script">How to Create an Automation Script</a></p>
</li>
<li><p><a class="post-section-overview" href="#heading-whats-next">What’s Next?</a></p>
</li>
</ul>
<h2 id="heading-key-iot-concepts-in-this-tutorial">Key IoT Concepts in this Tutorial</h2>
<p>Here are the key concepts related to the Internet of Things (IoT) and smart homes that you’ll be working with:</p>
<ul>
<li><p><a target="_blank" href="https://en.wikipedia.org/wiki/Zigbee">Zigbee</a> is a wireless communication protocol used in smart home devices. It relies on a Zigbee coordinator to communicate with devices like lights, sensors, and switches within a local mesh network. This network allows devices to relay signals to extend coverage and reliability.</p>
</li>
<li><p><a target="_blank" href="https://en.wikipedia.org/wiki/MQTT">MQTT (Message Queuing Telemetry Transport)</a> is a lightweight messaging protocol for low-bandwidth and high-latency environments. It uses an MQTT broker to manage communication between devices using a publish/subscribe (pub/sub) model, where devices can either send or receive messages based on specific topics.</p>
</li>
<li><p><a target="_blank" href="https://www.zigbee2mqtt.io/">Zigbee2MQTT</a> is a bridge application that connects Zigbee devices to an MQTT broker. It translates Zigbee signals into MQTT messages, and vice versa. Zigbee2MQTT supports a wide range of devices from different manufacturers.</p>
</li>
</ul>
<h2 id="heading-what-youll-need"><strong>What You’ll Need</strong></h2>
<ol>
<li><p>A Zigbee coordinator connected to your network or device. I have an <a target="_blank" href="https://smlight.tech/product/slzb-06/">SLZB-06</a> ($65 USD) connected to my network.</p>
</li>
<li><p>A device capable of running Docker, such as a Raspberry Pi or Linux server. I flashed a Raspberry Pi 4 - Model B.</p>
</li>
</ol>
<h2 id="heading-how-to-prepare-your-environment"><strong>How to Prepare Your Environment</strong></h2>
<ol>
<li><p>SSH into your Pi using the following command in your terminal window, where <code>pi</code> is the username of your Raspberry Pi OS and <code>&lt;RaspberryPi_IP&gt;</code> is the IP address of your Raspberry Pi on your local network.</p>
<pre><code class="lang-bash"> ssh pi@&lt;RaspberryPi_IP&gt;
</code></pre>
</li>
<li><p>Install Docker by inputting the following command at the SSH prompt.</p>
<pre><code class="lang-bash"> curl -sSL https://get.docker.com | sh
</code></pre>
</li>
<li><p>Give permissions to the current logged in user. You may then need to close the SSH connection, and re-connect, if the permissions hasn’t taken effect.</p>
<pre><code class="lang-bash"> sudo usermod -aG docker <span class="hljs-variable">$USER</span>
</code></pre>
</li>
</ol>
<h2 id="heading-how-to-set-up-the-zigbee2mqtt-configuration">How to Set Up the Zigbee2MQTT Configuration</h2>
<ol>
<li><p>Create a new project directory, and also a <code>/data</code> directory to store configuration files and data persistently.</p>
<pre><code class="lang-bash"> mkdir -p ~/zigbee2mqtt/data
</code></pre>
</li>
<li><p>Create the configuration file.</p>
<pre><code class="lang-bash"> touch ~/zigbee2mqtt/data/configuration.yaml
</code></pre>
</li>
<li><p>Open file with your preferred text editor, like using <code>nano</code> as shown below.</p>
<pre><code class="lang-bash"> nano ~/zigbee2mqtt/data/configuration.yaml
</code></pre>
</li>
<li><p>Paste the following YAML code into the configuration file from the text editor interface.</p>
<pre><code class="lang-yaml"> <span class="hljs-attr">homeassistant:</span> <span class="hljs-literal">false</span>
 <span class="hljs-attr">permit_join:</span> <span class="hljs-literal">false</span>
 <span class="hljs-attr">mqtt:</span>
   <span class="hljs-attr">base_topic:</span> <span class="hljs-string">zigbee2mqtt</span>
   <span class="hljs-attr">server:</span> <span class="hljs-string">'mqtt://mqtt:1883'</span>
 <span class="hljs-attr">serial:</span>
   <span class="hljs-attr">port:</span> <span class="hljs-string">'tcp://&lt;IP_OF_ZIGBEE_COORDINATOR&gt;:&lt;PORT&gt;'</span>
 <span class="hljs-attr">frontend:</span>
   <span class="hljs-attr">port:</span> <span class="hljs-number">8080</span>
</code></pre>
</li>
<li><p>Update the following details within the <code>configuration.yaml</code> file, and save the changes.</p>
<ul>
<li><p><code>&lt;MQTT_BROKER_IP&gt;</code>: Your MQTT broker's IP or hostname.</p>
</li>
<li><p><code>port</code>: This value depends on how your Zigbee coordinator is connected:</p>
<ul>
<li><p>If your Zigbee coordinator is connected to the network, you can configure the <code>port</code> using TCP/IP as shown in the example above, for example <code>tcp://192.168.1.xxx:6638</code> where the SLZB-06 is located at <code>192.168.1.xxx</code> on the local network and <code>6638</code> is the default port for that Zigbee coordinator.</p>
</li>
<li><p>If the Zigbee coordinator is connected to your device, you can find the serial port (such as <code>/dev/ttyUSB0</code>) by running <code>ls /dev/tty*</code> before and after plugging in the adapter to your device.</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<h2 id="heading-how-to-set-up-zigbee2mqtt-and-mqtt-broker-in-docker">How to Set up Zigbee2MQTT and MQTT Broker in Docker</h2>
<ol>
<li><p>In the root of your project directory, create a <code>docker-compose.yaml</code> file to set up the <a target="_blank" href="https://hub.docker.com/r/koenkk/zigbee2mqtt/">Zigbee2MQTT container</a> and <a target="_blank" href="https://hub.docker.com/_/eclipse-mosquitto">Eclipse Mosquitto broker container</a> to handle communication between Zigbee2MQTT and other services.</p>
<pre><code class="lang-yaml"> <span class="hljs-attr">services:</span>
   <span class="hljs-attr">zigbee2mqtt:</span>
     <span class="hljs-attr">container_name:</span> <span class="hljs-string">zigbee2mqtt</span>
     <span class="hljs-attr">image:</span> <span class="hljs-string">koenkk/zigbee2mqtt</span>
     <span class="hljs-attr">restart:</span> <span class="hljs-string">unless-stopped</span>
     <span class="hljs-attr">volumes:</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">./data:/app/data</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">/run/udev:/run/udev:ro</span>
     <span class="hljs-attr">ports:</span>
       <span class="hljs-comment"># Frontend port</span>
       <span class="hljs-bullet">-</span> <span class="hljs-number">8080</span><span class="hljs-string">:8080</span>
     <span class="hljs-attr">environment:</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">TZ=American/Los_Angeles</span>
   <span class="hljs-attr">mqtt:</span>
     <span class="hljs-attr">image:</span> <span class="hljs-string">eclipse-mosquitto:2.0</span>
     <span class="hljs-attr">restart:</span> <span class="hljs-string">unless-stopped</span>
     <span class="hljs-attr">volumes:</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">"./mosquitto:/mosquitto"</span>
     <span class="hljs-attr">ports:</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">"1883:1883"</span>
       <span class="hljs-bullet">-</span> <span class="hljs-string">"9001:9001"</span>
     <span class="hljs-attr">command:</span> <span class="hljs-string">"mosquitto -c /mosquitto-no-auth.conf"</span>
</code></pre>
</li>
<li><p>Update the <code>TZ</code> environment variable if you are located in a different time zone, and save any changes.</p>
</li>
</ol>
<h2 id="heading-launch-the-containers"><strong>Launch the Containers</strong></h2>
<ol>
<li><p>Run the containers.</p>
<pre><code class="lang-bash"> docker compose up -d
</code></pre>
</li>
<li><p>Test the setup by checking the logs to confirm Zigbee2MQTT is running without errors. And look for lines indicating successful connection to the MQTT broker and Zigbee network initialization.</p>
<pre><code class="lang-bash"> docker compose logs
</code></pre>
</li>
</ol>
<h2 id="heading-pair-your-zigbee-devices"><strong>Pair Your Zigbee devices</strong></h2>
<ol>
<li><p>Once Zigbee2MQTT is running smoothly, you can access the frontend at <code>http://&lt;your-device-IP&gt;:8080</code> from a web browser to pair and manage your Zigbee devices.</p>
</li>
<li><p>Enable pairing by clicking <strong>Permit Join (all)</strong>, and then pair your devices by putting them in pairing mode, for example holding down a reset button.</p>
</li>
<li><p>Finish pairing all the Zigbee devices that you wish to use in an automation. In the screenshot below, I have paired an Aqara button and Third Reality smart plug.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731775615109/616320a6-77d0-4d14-813e-7dfde9fb8f0a.png" alt="Aqara button and Third Reality smart plug in the Zigbee2MQTT frontend" class="image--center mx-auto" width="2888" height="836" loading="lazy"></p>
</li>
<li><p>Give your devices a friendly name by using the pencil icon. Make sure to choose a unique name to avoid messaging conflicts in the following steps. For example, if you have 2 smart plugs, you can name them <code>smart-plug-bedroom</code> and <code>smart-plug-office</code>.</p>
</li>
</ol>
<p>MQTT brokers follow a pub/sub messaging pattern which involves the following:</p>
<ul>
<li><p><strong>Subscribing to MQTT topics</strong> like <code>zigbee2mqtt/aqara-button</code> to monitor device states like listening for button presses.</p>
</li>
<li><p><strong>Publishing to MQTT topics</strong> like <code>zigbee2mqtt/third-reality/set</code> to send commands to devices like a smart plug to turn on a light.</p>
</li>
</ul>
<p>A topic such as <code>zigbee2mqtt/third-reality/set</code> is broken down into 3 parts:</p>
<ul>
<li><p><code>zigbee2mqtt</code> refers to the base topic (default for Zigbee2MQTT is <code>zigbee2mqtt</code>).</p>
</li>
<li><p><code>third-reality</code> refers to a specific device or group using the friendly name shown in the Zigbee2MQTT frontend.</p>
</li>
<li><p><code>set</code> allows you to control the device or group using a JSON message such as <code>{"state": "TOGGLE"}</code>.</p>
</li>
</ul>
<ol>
<li><p>Input the following command to see the MQTT messages being published to Zigbee2MQTT.</p>
<pre><code class="lang-bash"> docker logs -f zigbee2mqtt
</code></pre>
</li>
<li><p>Complete an action on a Zigbee device, for example pushing a button, and make a note of which topics you want to utilize in your automation for the next steps. For example, in the screenshot of the logs below, there is an MQTT topic published called <code>zigbee2mqtt/Aqara</code> when the Aqara button is pressed.</p>
</li>
</ol>
<p><img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731550585620/2f043360-75e1-4ef8-9549-a6bfe576ceb0.png" alt="Logs from pressing the Agara button" class="image--center mx-auto" width="2162" height="86" loading="lazy"></p>
<h2 id="heading-how-to-create-an-automation-script"><strong>How to Create an Automation Script</strong></h2>
<p>To set up an automation, you can use an external system like Home Assistant or Node-RED, or use Zigbee2MQTT’s <a target="_blank" href="https://www.zigbee2mqtt.io/guide/configuration/more-config-options.html#external-converters">external converters</a> to respond to MQTT messages from the broker.</p>
<p>You won’t be doing that. Instead, let’s write a JavaScript script to handle this automation, to keep the functionality modular and independent.</p>
<ol>
<li><p>From the command line prompt of your terminal window, install the NodeSource setup script on your Raspberry Pi.</p>
<pre><code class="lang-bash"> curl -fsSL https://deb.nodesource.com/setup_18.x | sudo -E bash -
</code></pre>
</li>
<li><p>Install <a target="_blank" href="https://nodejs.org/en/download/package-manager">Node.js</a> to use as the runtime for your script.</p>
<pre><code class="lang-bash"> sudo apt install -y nodejs
</code></pre>
</li>
<li><p>Verify the installation went smoothly by showing the installed version.</p>
<pre><code class="lang-bash"> node -v
</code></pre>
</li>
<li><p>Install <a target="_blank" href="https://www.npmjs.com/package/mqtt">MQTT.js</a>, the MQTT client library for Node.js.</p>
<pre><code class="lang-bash"> npm install mqtt
</code></pre>
</li>
<li><p>Create a file called <code>automation.js</code> to contain the automation script. In this example, you can run the script on the Raspberry Pi. However, the file can be placed anywhere and doesn’t even need to run on the same device as the MQTT broker. As long as the program can connect to the MQTT broker over the local network, it will function correctly.</p>
<pre><code class="lang-bash"> touch automation.js
</code></pre>
</li>
<li><p>Open the file with your preferred text editor, like Nano shown here.</p>
<pre><code class="lang-bash"> nano automation.js
</code></pre>
</li>
<li><p>Paste the following code into the file.</p>
<pre><code class="lang-javascript"> <span class="hljs-keyword">const</span> mqtt = <span class="hljs-built_in">require</span>(<span class="hljs-string">'mqtt'</span>);

 <span class="hljs-comment">// MQTT broker connection details</span>
 <span class="hljs-keyword">const</span> MQTT_BROKER = <span class="hljs-string">'mqtt://localhost'</span>; <span class="hljs-comment">// Replace with your broker's address</span>
 <span class="hljs-keyword">const</span> BUTTON_TOPIC = <span class="hljs-string">'zigbee2mqtt/aqara-button'</span>; <span class="hljs-comment">// Replace with your button's topic</span>
 <span class="hljs-keyword">const</span> PLUG_TOPIC = <span class="hljs-string">'zigbee2mqtt/third-reality'</span>; <span class="hljs-comment">// Replace with your plug's topic</span>

 <span class="hljs-comment">// Connect to the MQTT broker</span>
 <span class="hljs-keyword">const</span> client = mqtt.connect(MQTT_BROKER);

 <span class="hljs-comment">// Handle connection events</span>
 client.on(<span class="hljs-string">'connect'</span>, <span class="hljs-function">() =&gt;</span> {
     <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Connected to MQTT broker'</span>);
     <span class="hljs-comment">// Subscribe to the button's topic</span>
     client.subscribe(BUTTON_TOPIC, <span class="hljs-function">(<span class="hljs-params">err</span>) =&gt;</span> {
         <span class="hljs-keyword">if</span> (!err) {
             <span class="hljs-built_in">console</span>.log(<span class="hljs-string">`Subscribed to topic: <span class="hljs-subst">${BUTTON_TOPIC}</span>`</span>);
         } <span class="hljs-keyword">else</span> {
             <span class="hljs-built_in">console</span>.error(<span class="hljs-string">`Failed to subscribe to topic: <span class="hljs-subst">${BUTTON_TOPIC}</span>`</span>, err);
         }
     });
 });

 <span class="hljs-comment">// Handle incoming messages</span>
 client.on(<span class="hljs-string">'message'</span>, <span class="hljs-function">(<span class="hljs-params">topic, message</span>) =&gt;</span> {
     <span class="hljs-keyword">if</span> (topic === BUTTON_TOPIC) {
         <span class="hljs-keyword">try</span> {
             <span class="hljs-keyword">const</span> payload = <span class="hljs-built_in">JSON</span>.parse(message.toString());
             <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Received message:'</span>, payload);
             <span class="hljs-keyword">const</span> desiredAction = payload.action;

             <span class="hljs-comment">// Check for possible actions</span>
             <span class="hljs-keyword">if</span> (desiredAction === <span class="hljs-string">'single'</span>) {
                 <span class="hljs-comment">// Send a message to the plug's topic to toggle the switch</span>
                 client.publish(<span class="hljs-string">`<span class="hljs-subst">${PLUG_TOPIC}</span>/set`</span>, <span class="hljs-built_in">JSON</span>.stringify({<span class="hljs-string">"state"</span>: <span class="hljs-string">"TOGGLE"</span>}));
                 <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Toggling the switch'</span>)
             } <span class="hljs-keyword">else</span> <span class="hljs-keyword">if</span> (desiredAction === <span class="hljs-string">'double'</span>) {
                 <span class="hljs-comment">// Send a message to the plug's topic to turn off the switch</span>
                 client.publish(<span class="hljs-string">`<span class="hljs-subst">${PLUG_TOPIC}</span>/set`</span>, <span class="hljs-built_in">JSON</span>.stringify({ <span class="hljs-attr">state</span>: <span class="hljs-string">'OFF'</span> }));
                 <span class="hljs-built_in">console</span>.log(<span class="hljs-string">'Turning off the switch'</span>)
             }
         } <span class="hljs-keyword">catch</span> (err) { 
             <span class="hljs-built_in">console</span>.error(<span class="hljs-string">'Failed to parse message:'</span>, err.message);
         }           

     }
 });

 <span class="hljs-comment">// Handle errors</span>
 client.on(<span class="hljs-string">'error'</span>, <span class="hljs-function">(<span class="hljs-params">err</span>) =&gt;</span> {
     <span class="hljs-built_in">console</span>.error(<span class="hljs-string">'MQTT error:'</span>, err);
 });
</code></pre>
<p> This script connects to the MQTT broker and subscribes to the button’s topic (<code>zigbee2mqtt/aqara-button</code>). When a message is received, it examines the payload. If the action is a single click (<code>single</code>), the script sends a toggle command (<code>{state: "TOGGLE"}</code>) to the plug’s topic (<code>zigbee2mqtt/third-reality/set</code>), toggling the plug’s state. A <code>double</code> action turns the plug off.</p>
<p> <img src="https://cdn.hashnode.com/res/hashnode/image/upload/v1731777295907/11549e51-c2f9-44cd-af73-a0ba97eeda1e.png" alt="MQTT pub/sub messaging pattern" class="image--center mx-auto" width="1280" height="500" loading="lazy"></p>
<p> Update the MQTT broker connection and topic details at the top of the script as needed to accommodate your own Zigbee devices, and save your changes.</p>
</li>
<li><p>Run the script from the terminal prompt.</p>
<pre><code class="lang-bash"> node automation.js
</code></pre>
</li>
<li><p>Test the setup by pressing the button. The script should log the button action and send a command to toggle on the smart plug. Check the MQTT broker logs if the light doesn’t turn on.</p>
</li>
<li><p>Optional*:* Once the script is working as expected, there are a few more optional steps to make sure the script restarts during reboots. Install a process manager like <a target="_blank" href="https://www.npmjs.com/package/pm2">PM2</a> from the command line prompt of the Raspberry Pi.</p>
<pre><code class="lang-bash">sudo npm install -g pm2
</code></pre>
</li>
<li><p>Start the script again.</p>
<pre><code class="lang-bash">pm2 start automation.js
</code></pre>
</li>
<li><p>Your app should now be daemonized, running in the background, and kept alive forever. Generate and configure a startup script to keep PM2 and your processes alive at every server restart.</p>
<pre><code class="lang-bash">pm2 startup
</code></pre>
</li>
<li><p>Copy and paste the command exactly as shown in the terminal output, and run the suggested command.</p>
</li>
<li><p>Save the process list so PM2 can restore it after a system reboot.</p>
<pre><code class="lang-bash">pm2 save
</code></pre>
</li>
</ol>
<h2 id="heading-whats-next"><strong>What’s Next?</strong></h2>
<p>Now that you’ve created a custom automation, there are more ways to grow your home automation setup.</p>
<ul>
<li><p><strong>Explore more Zigbee devices</strong>: Zigbee2MQTT supports <a target="_blank" href="https://www.zigbee2mqtt.io/supported-devices/">a wide range of devices</a> from various manufacturers.</p>
</li>
<li><p><strong>Add custom behaviors</strong>: Use Zigbee2MQTT’s <a target="_blank" href="https://www.zigbee2mqtt.io/guide/configuration/more-config-options.html#external-converters">external converters</a> to define unique functionality for both supported and unsupported devices.</p>
</li>
<li><p><strong>Scale your setup</strong>: This flexible, lightweight setup is good for beginners and power users alike, who don’t want to get locked into proprietary smart home platforms or cloud services.</p>
</li>
</ul>
<p>If you found this tutorial helpful, don’t forget to check out <a target="_blank" href="https://github.com/loopDelicious/home-automation/blob/main/README.md">my recommended Home Automation hardware</a> and <a target="_blank" href="https://www.youtube.com/@joycejetson">how-to videos on YouTube</a> for more inspiration!</p>
<p>You can watch the video version of this article here:</p>
<div class="embed-wrapper">
        <iframe width="560" height="315" src="https://www.youtube.com/embed/mGg_9FjDKHQ" style="aspect-ratio: 16 / 9; width: 100%; height: auto;" title="YouTube video player" allow="accelerometer; autoplay; clipboard-write; encrypted-media; gyroscope; picture-in-picture; web-share" referrerpolicy="strict-origin-when-cross-origin" allowfullscreen="" loading="lazy"></iframe></div>
 ]]>
                </content:encoded>
            </item>
        
    </channel>
</rss>
