• Home
  • Robotics
  • 3D Printing
  • Web
  • Microcontrollers
  • Frameworks
  • Protocols
  • Other
  • Explore knowledge
  • Loading graph.
    Depth
    …
    … visible
  • Home
  • Robotics
  • 3D Printing
  • Web
  • Microcontrollers
  • Frameworks
  • Protocols
  • Other
Tools
    Pages
    • Protocols
      • Matter
      • Simple Mesh
      • Thread
      • Ultra Wide Band
      • Zigbee
    Pages
    • Protocols
      • Matter
      • Simple Mesh
      • Thread
      • Ultra Wide Band
      • Zigbee
    Home/Protocols/zigbee
    Metadata
    description
    Zigbee protocol example usage in home automation
    date
    2020-10-06
    tags
    Protocol
    features
    ["Showcase of all used devices and their integration","References for deeper dive in the Zigbee standard","References for DIY coordinators and software"]

    Devices Overview

    Below are examples of used devices in this project

    image-zigbee_devices.png
    ×

    As in the above figure, I kept all the light with the hue gateway for a reliable function, and opted for zigbee2mqtt for all other non lighting devices.

    For a detailed list of used devices and their documentation see the devices list section

    Frameworks

    Philips Hue

    image-hue.png
    ×

    ✅ Philips Hue have an open API that can run in a local network, therefore allowing third party apps integration. This API has been tested in this project, it is of professional grade and reliable.

    meethue developers
    • Hue Light Control from Aquara wall switches and buttons
    • The Smart Home3D webapp is using the hue API, and advanced light groups dimming with 3d sliders

    Zigbee2mqtt

    ✅ The most popular framework that enables DIY fans to use even non-standard devices on standard gateways

    ❌ as this project is diconnected from the devices vendors integration testing, some instabilities and interoperabilites issues might be expected for some devices

    zigbee2mqtt.io

    Useful commands

    Bash
    > cd /opt/zigbee2mqtt
    > ./update
    > sudo systemctl restart zigbee2mqtt
    > nano /opt/zigbee2mqtt/data/configuration.yaml
    > nano /opt/zigbee2mqtt/data/database.db
    > pub 'lzig/bridge/config/permit_join' -m 'true'
    > pub 'lzig/bridge/config/force_remove' -m '0x00158d0012341234'

    Links

    • github repo
    • install
    • supported devices
    • firmware
    • mqtt messages

    Standard

    Specification

    • ZLL : Zigbee Light Link, Easy - No Coordinator 13001r00ZB_MWG-ZigBee_Light_Link_Standard.pdf

    • ZHA : Zigbee Home Automation 075367r03ZB_AFG-Home_Automation_Profile_for_Public_Download.pdf, see also Silicon Labs ZLL Fundamentals UG103.9

    • ZGP : Zigbee Green Power

    • HAP : Homekit Accessory Protocol

    • CLIP : Connected Light Internet Protocol

    • ZHA + ZLL + … webcom_zigbee_rg2017.pdf

    • Security us-15-Zillner-ZigBee-Exploited-The-Good-The-Bad-And-The-Ugly-wp.pdf

    • Zigbee Pro 2015 : docs-05-3474-21-0csg-zigbee-specification.pdf

    • ZCL : Zigbee Cluster Library 07-5123-06-zigbee-cluster-library-specification.pdf

    • Zigbee 3 : Zigbee 3.0 Base Device Behavior Specification docs-13-0402-13-00zi-Base-Device-Behavior-Specification-2.pdf

    For the latest version of the standard documents please refer to the Zigbee alliance official website
    zigbeealliance.org

    Layers Architecture

    In this Figure from the Zigbee Pro 2015 Page2, We see the multiple layers, mainly the physical, the MAC, the network and the application. It is therefore not appropriate to compare Zigbee with other networking protocols such as wifi given that the zigbee includes standardisation of the Application layer (APL)

    image-zigbee_stack_arch.png
    ×

    Firmware

    ZBOSS

    ZBOSS 3.0 and 2.1 are independent, portable, high-performance Zigbee® software protocol stacks

    dsr-zboss.com

    Nordic integration

    The ZBOSS is used in Nordic devices either as lower stack with the application running on the same SoC or used as a Network Coprocessor

    ×
    Nordic Zigbee design

    TI Z-Stack

    image-stack_3_0.jpg
    ×
    This is the Stack used by Zigbee2mqtt
    TI Z-Stack

    reference documents to be accessed through TI website

    • ressource guide

    • Z-Stack ZNP (ZNP Protocol)

    • Z-Stack Monitor and Test API

    Wireshark sniffing

    • Observing the network is mandatory for experiemnting with zigbee devices, as it's sometimes not possible to identify the source of the issue (end device or coordinator) without looking at the air messages.

    • Note that an RF sniffer for 802.15.4 is enough to sniff zigbee as the zigbee higher layer protocol dissection is supported by wireshark

    • nRF Sniffer for 802.15.4
    • TI packet sniffer

    Filters

    No table data available.

    Coloring rules

    MAC, wpan.src64 == 00:15:8d:00:00:11:22:33

    Devices List

    TI MCUs

    CC2531USB, 8051, IEEE 802.15.4 & Zigbee
    CC2530No USB, 8051
    CC2591range extender
    CC2592range extender
    CC2533remote control
    CC2538 datasheetUSB, ARM M3, + 6LoWPAN
    CC2630 datasheetARM-M3, ARM-M0, No USB
    CC2652RARM-M4F, ARM-M0, No USB
    • instructive reference : CC2531

    TI Dongles

    image-cc2531emk.png
    ×
    • CC2530
    • CC2538 datasheet

    TI based dongles

    GB2530

    image-gb2530.png
    ×
    This dongle has an additional amplifier chip.
    • GBAN GB2530-S = CC2530 + RFX2401

    • GBAN GB2530-H = CC2530 + CC2591

    • CC2630 datasheet

    required config for zigbee2mqtt

    Ini
    advanced:
      rtscts: false

    CC2652 based

    This dongle is based on the 2nd generation chips that are more powerful (including ARM-M4F and ARM-M0) also has more memory to handle more zigbee paired devices.

    image-cc2652.png
    ×
    Product page
    • TI wireless connectivity

    Nordik Dongle dev kit

    Unfortunately not supported by Zigbee2mqtt, but there's chance in case they move to a ZBOSS common stack. Nevertheless, it's possible to use it as a sniffer give the zigbee being the stame standard in the air physical layer.

    image-nrf52840-usb-dongle.png
    ×
    Product page
    • cheap, around 9€ CC2531EMK
    • See also its usage in the Zigbee2mqtt guide.

    Eurotronics Heating

    image-eurotronics_heat.png
    ×
    Product page
    • Aliexpress including details about the used clusters and attributes

    usefull commands

    Bash
    > pub 'lzig/office heat/set' -m '{"current_heating_setpoint": 9}'
    > pub 'zig/living heat/set' -m '{"current_system_mode": 16}'
    > pub 'zig/living heat/set' -m '{"current_system_mode": 32}'

    Provided measures

    • current_heating_setpoint

    • occupied_heating_setpoint

    • unoccupied_heating_setpoint

    • eurotronic_system_mode

    • pi_heating_demand

    • eurotronic_error_status

    • battery

    • linkquality

    • local_temperature

    Used in applications

    • Zigbee2mqtt guide
    • on Mouser

    ❌ Unresolved Problem : it happened few times in 2 years that a device starts spontaneously heating with full power after a sort of connection loss or self reset. Not funny when this happens in summer, especially when someone is not at home. No answer from the support.

    ← PreviousSimple Mesh
    On this page
    • Devices Overview
    • Frameworks
      • Philips Hue
      • Zigbee2mqtt
        • Useful commands
        • Links
    • Standard
      • Specification
      • Layers Architecture
    • Firmware
      • ZBOSS
      • Nordic integration
      • TI Z-Stack
    • Wireshark sniffing
      • Filters
      • Coloring rules
    • Devices List
      • TI MCUs
      • TI Dongles
      • TI based dongles
        • GB2530
        • CC2652 based
      • Nordik Dongle dev kit
      • Eurotronics Heating
    Open page ×