Skip to main content

A library which communicates with Texas Instruments CC2531 radios for zigpy

Project description

zigpy-cc

Build Status Coverage

zigpy-cc is a Python 3 library implemention to add support for Texas Instruments CC series of Zigbee radio module chips hardware to the zigpy project. Including but possibly not limited to Texas Instruments CC253x, CC26x2R, and CC13x2 chips flashed with a custom Z-Stack coordinator firmware.

The goal of this project is to add native support for inexpensive Texas Instruments CC chip based USB sticks in Home Assistant's built-in ZHA (Zigbee Home Automation) integration component (via the zigpy library), allowing Home Assistant with such hardware to nativly support direct control of compatible Zigbee devices such as Philips HUE, GE, Osram Lightify, Xiaomi/Aqara, IKEA Tradfri, Samsung SmartThings, and many more.

zigpy-cc allows Zigpy to interact with Texas Instruments ZNP (Zigbee Network Processor) coordinator firmware via TI Z-Stack Monitor and Test(MT) APIs using an UART/serial interface.

The zigpy-cc library itself is a port of the zigbee-herdsman project (version 0.12.24) by the Zigbee2mqtt project by Koen Kanters (a.k.a. Koenkk GitHub) which in turn was originally forked from the zigbee-shepherd project by zigbeer. Therefore, if any improvements like support for new Zigbee devices that gets added in the Zigbee2MQTT project it could be possible to port those improvements and benifit much of that to the zigpy-cc library.

WARNING!!! - Work in progress

Disclaimer: This software is provided "AS IS", without warranty of any kind. The zigpy-cc project is under development as WIP (work in progress), it is not fully working yet.

TODO list:

  • uart communication
  • init coordinator
  • handling join requests
  • get node descriptor
  • get endpoint list
  • get endpoint info
  • bind
  • fix entities in Home Assistant
  • fix lint problems
  • add more tests
  • ...more coming?

Testing new releases

Testing a new release before it is released in Home Assistant.

If you're using Supervised Home Assistant (formerly hassio):

If you're using some custom python installation:

  • Activate your python virtual env
  • Update package with pip
    pip install zigpy-cc==0.2.3
    

Hardware requirement

The zigpy-cc library is currently being tested by developers with Texas Instruments CC2531 and CC2652R based adapters as as reference hardware but it should in theory be possible to get it working with work most USB-adapters and GPIO-modules based on Texas Instruments CC Zigbee radio module chips hardware. Note that you also have to flash the chip a custom Z-Stack coordinator firmware before you can use the hardware, read the firmware requirement section below.

Hardware being tested by zigpy-cc developers

Hardware not yet tested by zigpy-cc developers

Firmware requirement

Firmware requirement is that they support Texas Instruments Z-Stack Monitor and Test(MT) APIs using an UART interface (serial communcation protocol), which they should do if they are flashed with custom Z-Stack "coordinator" firmware for Zigbee 1.2 or Zigbee 3.0 from the Zigbee2mqtt project.

The necessary hardware and equipment for flashing firmware and the device preparation process is best described by the Zigbee2mqtt project whos community develops the custom Z-Stack coordinator firmware that this zigpy-cc libary requires.

The Zigbee2mqtt project has intructions for several alternative metods on how to initially flash their special Z-Stack coordinator firmware on a new CC253x, CC26x2R, CC13x2, CC2538 or other Texas Instruments CCxxxx based USB adapters and development boards that does not have a bootloader. They also have a FAQ and knowledgebase that can be useful for working with these supported hardware adapters/equipment as well as with Zigbee devices.

Port configuration

  • To configure usb port path for your TI CC serial device, just specify the TTY (serial com) port, example : /dev/ttyACM0
    • Alternatively you could try to set just port to auto to enable automatic usb port discovery (not garanteed to work).
  • Texas Instruments default recommend Baud rate of CC253x serial device is 115200 (this could be different for other TI CC chips).

Releases via PyPI

Tagged versions will also be released via PyPI

External documentation and reference

How to contribute

If you are looking to make a code or documentation contribution to this project we suggest that you follow the steps in these guides:

Related projects

Zigpy

zigpy** is Zigbee protocol stack integration project to implement the Zigbee Home Automation standard as a Python 3 library. Zigbee Home Automation integration with zigpy allows you to connect one of many off-the-shelf Zigbee adapters using one of the available Zigbee radio library modules compatible with zigpy to control Zigbee based devices. There is currently support for controlling Zigbee device types such as binary sensors (e.g., motion and door sensors), sensors (e.g., temperature sensors), lightbulbs, switches, and fans. A working implementation of zigbe exist in Home Assistant (Python based open source home automation software) as part of its ZHA component

ZHA Device Handlers

ZHA deviation handling in Home Assistant relies on on the third-party ZHA Device Handlers project. Zigbee devices that deviate from or do not fully conform to the standard specifications set by the Zigbee Alliance may require the development of custom ZHA Device Handlers (ZHA custom quirks handler implementation) to for all their functions to work properly with the ZHA component in Home Assistant. These ZHA Device Handlers for Home Assistant can thus be used to parse custom messages to and from non-compliant Zigbee devices. The custom quirks implementations for zigpy implemented as ZHA Device Handlers for Home Assistant are a similar concept to that of Zigbee-Herdsman Converters / Zigbee-Shepherd Converters as used by Zigbee2mqtt as well as that of Hub-connected Device Handlers for the SmartThings Classics platform, meaning they are each virtual representations of a physical device that expose additional functionality that is not provided out-of-the-box by the existing integration between these platforms.

ZHA Map

Home Assistant can build ZHA network topology map using the zha-map project.

zha-network-visualization-card

zha-network-visualization-card is a custom Lovelace element for visualizing the ZHA Zigbee network in Home Assistant.

ZHA Network Card

zha-network-card is a custom Lovelace card that displays ZHA network and device information in Home Assistant

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

zigpy-cc-0.4.0.tar.gz (31.2 kB view details)

Uploaded Source

Built Distribution

zigpy_cc-0.4.0-py3-none-any.whl (43.7 kB view details)

Uploaded Python 3

File details

Details for the file zigpy-cc-0.4.0.tar.gz.

File metadata

  • Download URL: zigpy-cc-0.4.0.tar.gz
  • Upload date:
  • Size: 31.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for zigpy-cc-0.4.0.tar.gz
Algorithm Hash digest
SHA256 94b77665a99af2a086b286802144124ada98c975d3d248f2574dc426b95e75c9
MD5 9203e7600caeba4fc6310ae285c3357e
BLAKE2b-256 8cdd05e3b595aaf9a78887d20f00629610b937a2842e60b8de1e2b60cf39141f

See more details on using hashes here.

File details

Details for the file zigpy_cc-0.4.0-py3-none-any.whl.

File metadata

  • Download URL: zigpy_cc-0.4.0-py3-none-any.whl
  • Upload date:
  • Size: 43.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.45.0 CPython/3.8.2

File hashes

Hashes for zigpy_cc-0.4.0-py3-none-any.whl
Algorithm Hash digest
SHA256 966ce67083cc75db246399be7cf81835ce1077a24647267da7c626ec6d4f553f
MD5 af81c2e616d54ea6cb0cdb0778464581
BLAKE2b-256 5a6bc9c18461770e0f5f9d65039f6280b4fdf830a9681464673983f6409ad877

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page