Zigbee and Zigbee2MQTT: Integration with Home Assistant
Jul 13, 2024
Zigbee and Zigbee2MQTT: Integration with Home Assistant
Introduction to Zigbee
Zigbee is a wireless communication standard used by many smart device companies (e.g., Philips Hue, Amazon, Acara, Sonoff).
Example: Pressing a button on a Hue dimmer switch sends a Zigbee signal to the Philips Hue hub, which then sends a signal to the Hue light bulb to turn on.
More detailed information on Zigbee: Check out the provided video link in the description.
Issue with Multiple Hubs
Different manufacturers require separate hubs and ecosystems despite using the Zigbee standard.
Often requires signing up for cloud accounts, giving companies access to your data.
Solution: Use Home Assistant to centralize control over Zigbee devices.
What is Zigbee2MQTT?
Software that lets you control Zigbee devices using MQTT (lightweight messaging protocol).
Example: Temperature sensor sends readings to MQTT broker; other devices can subscribe to receive updates or request the latest reading.
Advantage: Scalability and fast communication among numerous devices.
Works seamlessly with Home Assistant.
Why Use Zigbee2MQTT?
Zigbee2MQTT vs. Zigbee Home Automation (ZHA): Both integrate Zigbee devices into Home Assistant without needing multiple hubs.
Zigbee2MQTT offers more flexibility and supports a wider variety of devices.
Initial Recommendation: Start with ZHA due to ease of use and installation.
Required Components
Working Home Assistant installation.
USB Zigbee coordinator: Lists of supported USB adapters available on the Zigbee2MQTT website.
Zigbee USB extension cable: Prevents electronic interference.
Note: Coordinator firmware should be chosen over router firmware when buying the USB stick.
Installation Steps for Zigbee2MQTT
Pre-Installation
Insert USB Coordinator: Plug into a spare port on your Home Assistant server.
Install MQTT Broker: Recommended is 'Mosquitto'. (Refer to linked video for detailed steps).
Installing Zigbee2MQTT via Home Assistant Add-On
Add Zigbee2MQTT Repository:
Navigate to Add-on Store > Repositories.
Add the GitHub URL for Zigbee2MQTT.
Install and Start Add-On:
Select non-edge version and install.
Enable auto-start and sidebar visibility.
Start the add-on, resolve any errors by checking log files.
USB Dongle Configuration:
Use terminal to list USB devices and find the correct port.
Update the serial port in the Zigbee2MQTT add-on configuration.
User Interface:
Access Zigbee2MQTT interface via Home Assistant sidebar.
Configure and pair new devices.
Installing Zigbee2MQTT via Docker Container
Prepare System: Plug in USB dongle and locate its port.
Docker Compose Configuration:
Follow the Zigbee2MQTT Docker install guide.
Update docker-compose YAML file with configuration settings.
Create Configuration File: Download sample config and edit for Home Assistant and MQTT settings.
Deploy Docker Container: Run docker-compose to start Zigbee2MQTT.
Home Assistant Configuration:
Update Home Assistant configuration for UI access to Zigbee2MQTT.
Post-Installation
User Interface Overview: List of devices, settings configurations, device pairing, and naming conventions.
Device Management: Use the Zigbee2MQTT interface for device settings, pairing, and naming.
Conclusion
Zigbee2MQTT provides a unified, flexible Zigbee integration for Home Assistant.
Additional resources and video links available in the description for further learning.
Subscribe to the channel for more Home Assistant automation tutorials.