Zigbee Sensors
Recommended Zigbee sensors.
This guide covers advanced Zigbee2MQTT techniques - from network optimization and groups to firmware updates and troubleshooting. Perfect for getting the most out of your Zigbee network!
Download firmware from GitHub
sonoff_zbdonglee_zigbee_ncp_8.0.2.0_115200_sw_flow.gblGo to Silabs Web Flasher
Click CONNECT and select your dongle
Click CHANGE FIRMWARE
Upload the firmware file
Wait for flashing (about 1-2 minutes)
Update Z2M configuration:
serial: adapter: ember # Change from ezsp to emberRestart Zigbee2MQTT
Go to SONOFF Dongle Flasher
Select Zigbee Coordinator firmware
Follow on-screen instructions
Update Z2M to adapter: ember
# Download firmwarewget https://github.com/Koenkk/Z-Stack-firmware/raw/master/coordinator/Z-Stack_3.x.0/bin/CC1352P2_CC2652P_launchpad_coordinator_20240710.zip
# Extractunzip CC1352P2_CC2652P_launchpad_coordinator_20240710.zip
# Flash with cc2538-bslpython3 cc2538-bsl.py -e -v -w --bootloader-sonoff-usb \ CC1352P2_CC2652P_launchpad_coordinator_20240710.hex \ -p /dev/ttyUSB0| Device Type | Function | Examples |
|---|---|---|
| Coordinator | Network center | ZBDongle-E/P, Conbee II |
| Router | Extends network | Bulbs, plugs (constant power) |
| End Device | Sensors, battery-powered | Door sensors, thermometers |
# configuration.yaml - Optimal settingsadvanced: # Network key (generate unique) network_key: GENERATE
# Transmit power (max for better range) transmit_power: 20
# Channel (avoid WiFi overlap) # Zigbee channel 11 = WiFi channel 1 # Zigbee channel 15 = WiFi channel 6 # Zigbee channel 20 = WiFi channel 11 # Zigbee channel 25 = Overlap-free channel: 25
# PAN ID (let Z2M generate) pan_id: GENERATE
# Increase for large networks network_key_distribute: true| Router | Quality | Price | Note |
|---|---|---|---|
| IKEA TRÅDFRI | ⭐⭐⭐ | ~$12 | Cheap, stable |
| Philips Hue | ⭐⭐⭐⭐⭐ | ~$25 | Excellent routing |
| SONOFF ZBDongle-E (Router) | ⭐⭐⭐⭐ | ~$18 | Dedicated router |
| Aqara Smart Plug | ⭐⭐⭐⭐ | ~$18 | Also measures power |
| SONOFF S26R2ZB | ⭐⭐ | ~$12 | Variable quality |
# Generate network map via MQTTmosquitto_pub -t 'zigbee2mqtt/bridge/request/networkmap' \ -m '{"type": "raw", "routes": true}'Visualize in Z2M Frontend under Map tab.
groups: '1': friendly_name: living_room_lights retain: false transition: 1 optimistic: true off_state: 'all_members_off'
'2': friendly_name: bedroom_lights retain: false transition: 2 optimistic: true
'3': friendly_name: all_lights retain: false# Create groupmosquitto_pub -t 'zigbee2mqtt/bridge/request/group/add' \ -m '{"friendly_name": "living_room_lights", "id": 1}'
# Add device to groupmosquitto_pub -t 'zigbee2mqtt/bridge/request/group/members/add' \ -m '{"group": "living_room_lights", "device": "living_room_lamp_1"}'
# Control groupmosquitto_pub -t 'zigbee2mqtt/living_room_lights/set' \ -m '{"state": "ON", "brightness": 200}'groups: '1': friendly_name: living_room_lights
# Retain MQTT messages (false = faster) retain: false
# Transition time in seconds transition: 1
# Update state before confirmation optimistic: true
# When is the group OFF? # all_members_off: When ALL devices are off # last_member_state: When LAST device is off off_state: 'all_members_off'Bindings connect devices directly - without going through the coordinator. Perfect for:
# Bind switch to lampmosquitto_pub -t 'zigbee2mqtt/bridge/request/device/bind' \ -m '{ "from": "living_room_switch", "to": "living_room_lamp", "clusters": ["genOnOff", "genLevelCtrl"] }'
# Bind switch to groupmosquitto_pub -t 'zigbee2mqtt/bridge/request/device/bind' \ -m '{ "from": "living_room_switch", "to": "living_room_lights", "clusters": ["genOnOff"] }'
# Remove bindingmosquitto_pub -t 'zigbee2mqtt/bridge/request/device/unbind' \ -m '{ "from": "living_room_switch", "to": "living_room_lamp" }'| Cluster | Function |
|---|---|
genOnOff | On/off |
genLevelCtrl | Brightness |
lightingColorCtrl | Color/temperature |
closuresWindowCovering | Blinds/covers |
devices: '0x00158d0001234567': friendly_name: living_room_sensor
# Reduce noise debounce: 1
# Filter attributes filtered_attributes: - linkquality - voltage
# Retain MQTT messages retain: true
# Optimistic mode optimistic: true
# Device-specific settings occupancy_timeout: 90 no_occupancy_since: - 60 - 120 - 300# configuration.yamldevices: devices.yamlgroups: groups.yaml
# devices.yaml'0x00158d0001234567': friendly_name: living_room_sensor'0x00158d0001234568': friendly_name: bedroom_sensor
# groups.yaml'1': friendly_name: living_room_lights'2': friendly_name: all_lightsadvanced: # Logging log_level: info log_output: - console - file log_file: zigbee2mqtt_%TIMESTAMP%.log log_rotation: true
# Performance cache_state: true cache_state_persistent: true cache_state_send_on_startup: true
# Network last_seen: 'ISO_8601' elapsed: true
# Security permit_join: false
# Home Assistant homeassistant_legacy_entity_attributes: false legacy_api: false legacy_availability_payload: false# 1. Enable permit join on specific routermosquitto_pub -t 'zigbee2mqtt/bridge/request/permit_join' \ -m '{"value": true, "device": "nearby_router"}'
# 2. Factory reset the device (see manual)
# 3. Move device closer to coordinator
# 4. Check logstail -f /opt/zigbee2mqtt/data/log/*/log.log# 1. Check LQI (Link Quality Indicator)# Frontend → Device → About → LQI# Below 50 = poor connection
# 2. Add router between device and coordinator
# 3. Check battery level
# 4. Use availability featureavailability: active: timeout: 10 passive: timeout: 1500# 1. Use groups instead of individual commands
# 2. Use bindings for direct control
# 3. Avoid too many end devices on one router# Max ~20 end devices per router
# 4. Update coordinator firmware
# 5. Check for WiFi interference# Change Zigbee channel if needed# WARNING: This deletes all devices!# Use only as last resort
# 1. Stop Zigbee2MQTTsudo systemctl stop zigbee2mqtt
# 2. Backup databasecp /opt/zigbee2mqtt/data/database.db /opt/zigbee2mqtt/data/database.db.backup
# 3. Delete database (DANGER!)rm /opt/zigbee2mqtt/data/database.db
# 4. Start Zigbee2MQTTsudo systemctl start zigbee2mqtt
# 5. Re-pair all devices# Realtime logsjournalctl -u zigbee2mqtt -f
# Search for errorsjournalctl -u zigbee2mqtt | grep -i error
# Z2M log level# In configuration.yaml:advanced: log_level: debug # warn, info, debugZigbee Sensors
Recommended Zigbee sensors.
Automations
Use Zigbee in automations.
Last updated: December 2025