Skip to main content

A library for zigpy which communicates with TI ZNP radios

Project description

zigpy-znp

Build Status Coverage Status

zigpy-znp is a Python library that adds support for common Texas Instruments ZNP (Zigbee Network Processors) Zigbee radio modules to zigpy, a Python Zigbee stack project.

Together with zigpy and compatible home automation software (namely Home Assistant's ZHA (Zigbee Home Automation) integration component), you can directly control most Zigbee devices such as Philips Hue, GE, OSRAM LIGHTIFY, Xiaomi/Aqara, IKEA Tradfri, Samsung SmartThings, and many more.

This zigpy-znp library 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. Radio module hardware compatible include but is possibly not limited to Texas Instruments CC13x2 and CC26x2R based chips flashed with Z-Stack 3.x coordinator firmware.

Installation

Install the Python module within your virtual environment:

(venv) $ pip install zigpy-znp

If you are using Home Assistant, copy custom_components/custom_zha_radios.py into your custom_components folder and create a new entry in your configuration.yaml file:

custom_zha_radios:
 znp:
   module: zigpy_znp.zigbee.application
   description: TI CC13x2, CC26x2, and ZZH

Backup and restore

A complete NVRAM backup can be performed to migrate between different radios based on the same chip. Anything else is untested.

(venv) $ python -m zigpy_znp.tools.nvram_read /dev/serial/by-id/old_radio -o backup.json
(venv) $ python -m zigpy_znp.tools.nvram_write /dev/serial/by-id/new_radio -i backup.json

Tested migrations:

  • LAUNCHXL-CC26X2R1 running 3.30.00.03 to and from the zig-a-zig-ah! running 4.10.00.78.

Hardware requirements

USB-adapters, GPIO-modules, and development-boards running recent TI Z-Stack releases (i.e. CC13x2 and CC26x2) are supported. Reference hardware for this project includes:

Z-Stack versions 3.x and above are currently required and all communication with the radio module is done over the the Z-Stack Monitor and Test (MT) interface via a serial port.

Texas Instruments Chip Part Numbers

Texas Instruments (TI) has quite a few different wireless MCU chips and they are all used/mentioned in open-source Zigbee world which can be daunting if you are just starting out. Here is a quick summary of part numbers and key features.

Supported newer generation TI chips

2.4GHz frequency only chips

  • CC2652R = 2.4GHz only wireless MCU for IEEE 802.15.4 multi-protocol (Zigbee, Bluetooth, Thread, IEEE 802.15.4g IPv6-enabled smart objects like 6LoWPAN, and proprietary systems). Cortex-M0 core for radio stack and Cortex-M4F core for application use, plenty of RAM. Free compiler option from TI.
  • CC2652RB = Pin compatible "Crystal-less" CC2652R (so you could use it if you were to build your own zzh and omit the crystal) but not firmware compatible.
  • CC2652P = CC2652R with a built-in RF PA. Not pin or firmware compatible with CC2652R/CC2652RB.

Multi frequency chips

  • CC1352R = Sub 1 GHz & 2.4 GHz wireless MCU. Essentially CC2652R with an extra sub-1GHz radio.
  • CC1352P = CC1352R with a built in RF PA.

Unsupported older generation TI chips

  • CC2530 = 2.4GHz Zigbee and IEEE 802.15.4 wireless MCU. 8051 core, has very little RAM. Needs expensive compiler license for official TI stack.
  • CC2531 = CC2530 with built-in USB. Used in the cheap "Zigbee sticks" sold everywhere.

Auxiliary TI chips

  • CC2591 and CC2592 = 2.4 GHz range extenders. These are not wireless MCUs, just auxillary PA (Power Amplifier) and LNA (Low Noise Amplifier) in the same package to improve RF (Radio Frequency) range of any 2.4 GHz radio chip.

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 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 devices. There is currently support for controlling Zigbee device types such as binary sensors (e.g. motion and door sensors), analog sensors (e.g. temperature sensors), lightbulbs, switches, and fans. Zigpy is tightly integrated with Home Assistant's ZHA component and provides a user-friendly interface for working with a Zigbee network.

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-znp-0.0.8.tar.gz (56.6 kB view details)

Uploaded Source

Built Distribution

zigpy_znp-0.0.8-py3-none-any.whl (78.9 kB view details)

Uploaded Python 3

File details

Details for the file zigpy-znp-0.0.8.tar.gz.

File metadata

  • Download URL: zigpy-znp-0.0.8.tar.gz
  • Upload date:
  • Size: 56.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for zigpy-znp-0.0.8.tar.gz
Algorithm Hash digest
SHA256 e172c798180d1b4a85cbcd1946f8a15ba53af8d665421b5f7ebbd9b1faf921c2
MD5 c7c8b7661d65523f0a2780b0739b058b
BLAKE2b-256 c7469ce8fa5416e88c294960d8ee68af6cc4f4a27dfc1500b6e557ed4e63610f

See more details on using hashes here.

Provenance

File details

Details for the file zigpy_znp-0.0.8-py3-none-any.whl.

File metadata

  • Download URL: zigpy_znp-0.0.8-py3-none-any.whl
  • Upload date:
  • Size: 78.9 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/47.1.1 requests-toolbelt/0.9.1 tqdm/4.46.1 CPython/3.8.3

File hashes

Hashes for zigpy_znp-0.0.8-py3-none-any.whl
Algorithm Hash digest
SHA256 bf549fd81f1568de81a814be5c74de8b7ea3a5c3a19ffbd53e10d2be5fa7aace
MD5 60de1d11945d760fd39d2fdf71a9f374
BLAKE2b-256 b1364bb3f3e11083bf07d6a73cbaec7a6b2ad097ea34b2b2828dcf6f308b08d1

See more details on using hashes here.

Provenance

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