Zigbee is a wireless communication protocol designed for home and industrial automation applications, offering low power consumption and extended range thanks to its mesh network. It allows various devices such as connected bulbs, sensors, and switches to communicate with each other.
Zigbee2MQTT is a gateway that allows controlling Zigbee devices via MQTT without the need for a proprietary gateway. It translates Zigbee messages into MQTT messages, facilitating integration with home automation systems like Calaos.
Zigbee devices can act as routers or coordinators to extend the network range. By adding mains-powered devices (such as smart plugs or connected bulbs), you can increase the Zigbee signal coverage throughout your home.
A compatible Zigbee adapter:
Consult the complete list of supported adapters: Zigbee2MQTT Adapters
The type of adapter will determine how to configure zigbee2mqtt.
Configuration of Zigbee2MQTT
The configuration file is located at:
/mnt/calaos/zigbee2mqtt/configuration.yaml
You can edit this file using the
nano
command-line editor.
The configuration looks like this:
# Home Assistant integration (MQTT discovery)
homeassistant: false
# Allow new devices to join
permit_join: true
# MQTT settings
mqtt:
# MQTT base topic for zigbee2mqtt MQTT messages
base_topic: zigbee2mqtt
# MQTT server URL
server: 'mqtt://127.0.0.1'
# MQTT server authentication, uncomment if required:
# user: my_user
# password: my_password
# Serial settings
serial:
# Location of CC2531 USB sniffer
port: /dev/ttyACM0
frontend: true
Depending on the chosen adapter, you will need to configure the port
option correctly to allow Zigbee2MQTT to use it:
For the ConBee II (USB):
serial:
port: '/dev/ttyACM0'
For the SMLIGHT SLZB-06 (Ethernet POE):
serial:
port: 'tcp://slzb-06.local:6638'
You will also need to modify the MQTT parameters if necessary, particularly username
and password
.
By default in Calaos-OS, MQTT is configured without authentication. If you want more security, it is preferable to set up a username and password.
Activation of Zigbee2MQTT
Zigbee2MQTT is already included in Calaos OS. To activate it, execute the following command in your Calaos server terminal:
systemctl enable zigbee2mqtt.service
systemctl restart zigbee2mqtt.service
Restarting the Service
After modifying the configuration, restart the service to apply the changes:
systemctl restart zigbee2mqtt.service
Open a web browser.
Go to http://<calaos-ip-address>:8080
.
You will see the Zigbee2MQTT dashboard with the list of connected devices.
On this interface, you will need to pair and configure the Zigbee devices before adding them to Calaos.
Activate Pairing Mode
On the Zigbee2MQTT web interface, click on the “Permit join (All devices)” button to allow pairing of new devices.
Put the Device in Pairing Mode
Follow the manufacturer’s instructions to put your device in pairing mode. You can also consult the device’s page on the Zigbee2MQTT website to learn how to perform the pairing.
Example: For a TRADFRI connected bulb, the explanation can be found here: Zigbee2mqtt TRADFRI
Verification of Pairing
Once the device is detected, it will appear in the list with a default identifier.
Rename the Device
Add Routers to Extend the Network
Calaos uses MQTT to communicate with Zigbee2MQTT. Therefore, you will need to add an MQTT IO for each device you wish to control in Calaos. Keep in mind that an IO in Calaos represents a value. Let’s take the example of a temperature and humidity sensor Aqara. We see in the documentation that this device will expose several values: temperature
, humidity
, pressure
, battery
, etc. In Calaos, you will need to create an IO for each property: one IO for temperature, one IO for humidity, etc.
In Calaos Installer, there is a dedicated tool that can connect to the MQTT Broker and detect available Zigbee devices on Zigbee2MQTT. You will need to select the property with which you wish to create an IO, and the assistant will configure it for you.