All Projects → zigpy → zigpy-znp

zigpy / zigpy-znp

Licence: GPL-3.0, Unknown licenses found Licenses found GPL-3.0 LICENSE Unknown COPYING
TI CC2531, CC13x2, CC26x2 radio support for Zigpy and ZHA

Programming Languages

python
139335 projects - #7 most used programming language

Projects that are alternatives of or similar to zigpy-znp

awesome-zigbee
Curated List of ZigBee related stuff
Stars: ✭ 45 (-58.72%)
Mutual labels:  zigbee, cc2531
cc-znp
The interface for a host to communicate with TI CC253X Zigbee Network Processor(ZNP) over a serial port.
Stars: ✭ 56 (-48.62%)
Mutual labels:  zigbee, cc2531
zigbee
Database of Zigbee devices compatible with third party gateways: ZHA, deCONZ, Zigbee2MQTT, Tasmota, ZiGate, ioBroker,
Stars: ✭ 117 (+7.34%)
Mutual labels:  zigbee, cc2531
wlan-extcap
Wireshark extcap interface for remote wireless captures.
Stars: ✭ 31 (-71.56%)
Mutual labels:  zigbee, cc2531
homebridge-zigbee-nt
A standalone ZigBee plugin that works with CC2531 USB dongle or Deconz
Stars: ✭ 53 (-51.38%)
Mutual labels:  zigbee, cc2531
nrf24 zigbee
This project is about running zigbee protocol in nrf24l01.
Stars: ✭ 26 (-76.15%)
Mutual labels:  zigbee
Home-Assistant Config
BeardedTinker Home Assistant configuration. Feel free to browse, edit, tweak, improve, criticize and suggest.
Stars: ✭ 241 (+121.1%)
Mutual labels:  zigbee
ioBroker.backitup
Backitup enables the cyclical creation of backups of an IoBroker / Homematic installation
Stars: ✭ 43 (-60.55%)
Mutual labels:  zigbee
zigbee-firmware
No description or website provided.
Stars: ✭ 116 (+6.42%)
Mutual labels:  zigbee
ha-zha-new
update of the zha component
Stars: ✭ 57 (-47.71%)
Mutual labels:  zigbee
geiger
Geiger counter
Stars: ✭ 30 (-72.48%)
Mutual labels:  zigbee
nrf52840-experiments
802.15.4 experiments with nRF52840
Stars: ✭ 23 (-78.9%)
Mutual labels:  zigbee
homebridge-z2m
Expose your Zigbee devices to HomeKit with ease, by integrating 🐝 Zigbee2MQTT with 🏠 Homebridge.
Stars: ✭ 197 (+80.73%)
Mutual labels:  zigbee
Smartthingspublic
SmartThings open-source DeviceTypeHandlers and SmartApps code
Stars: ✭ 2,201 (+1919.27%)
Mutual labels:  zigbee
homebridge-zigbee
ZigBee Platform plugin for HomeBridge
Stars: ✭ 101 (-7.34%)
Mutual labels:  zigbee
mmwave-gesture-recognition
Basic Gesture Recognition Using mmWave Sensor - TI AWR1642
Stars: ✭ 32 (-70.64%)
Mutual labels:  texas-instruments
openlumi.github.io
OpenWrt for Xiaomi Zigbee gateway with imx6 SoC DGNWG05LM, ZHWG11LM
Stars: ✭ 134 (+22.94%)
Mutual labels:  zigbee
SwiftyXBee
⚡️ A Swift library for communicating with XBee radios in API mode
Stars: ✭ 22 (-79.82%)
Mutual labels:  zigbee
AWR1843-Read-Data-Python-MMWAVE-SDK-3-
Python program to read and plot the data in real time from the AWR1843 mmWave radar board (MMWAVE SDK 3)
Stars: ✭ 74 (-32.11%)
Mutual labels:  texas-instruments
Home-Assistant-Configuration
HomeAssistant Configuration
Stars: ✭ 14 (-87.16%)
Mutual labels:  zigbee

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 Zigbee devices such as Philips Hue, GE, OSRAM LIGHTIFY, Xiaomi/Aqara, IKEA Tradfri, Samsung SmartThings, and many more.

Installation

Python module

Install the Python module within your virtual environment:

$ virtualenv -p python3.8 venv                                # if you don't already have one
$ source venv/bin/activate
(venv) $ pip install git+https://github.com/zigpy/zigpy-znp/  # latest commit from Git
(venv) $ pip install zigpy-znp                                # or, latest stable from PyPI

Home Assistant

Stable releases of zigpy-znp are automatically installed when you install the ZHA component.

Testing dev with Home Assistant Core

Upgrade the package within your virtual environment (requires git):

(venv) $ pip install git+https://github.com/zigpy/zigpy-znp/

Launch Home Assistant with the --skip-pip command line option to prevent zigpy-znp from being downgraded. Running with this option may prevent newly added integrations from installing required packages.

Testing dev with Home Assistant OS

Configuration

Below are the defaults with the top-level Home Assistant zha: key. You do not need to copy this configuration, it is provided only for reference:

zha:
  zigpy_config:
    znp_config:
      # Only if your stick has a built-in power amplifier (i.e. CC1352P and CC2592)
      # If set, must be between:
      #  * CC1352/2652:  -22 and 19
      #  * CC253x:       -22 and 22
      tx_power:  

      # Only if your stick has a controllable LED (the CC2531)
      # If set, must be one of: off, on, blink, flash, toggle
      led_mode: off


      ### Internal configuration, there's no reason to touch these values

      # Skips the 60s bootloader delay on CC2531 sticks
      skip_bootloader: True

      # Timeout for synchronous requests' responses
      sreq_timeout: 15

      # Timeout for asynchronous requests' callback responses
      arsp_timeout: 30

      # Delay between auto-reconnect attempts in case the device gets disconnected
      auto_reconnect_retry_delay: 5

      # Pin states for skipping the bootloader
      connect_rts_pin_states: [off, on, off]
      connect_dtr_pin_states: [off, off, off]

Tools

Various command line Zigbee utilities are a part of the zigpy-znp package and can be run with python -m zigpy_znp.tools.name_of_tool. More detailed documentation can be found in TOOLS.md but a brief description of each tool is included below:

  • energy_scan: Performs a continuous energy scan to check for non-Zigbee interference.
  • flash_read: For CC2531s, reads firmware from flash.
  • flash_write: For CC2531s, writes a firmware .bin to flash.
  • form_network: Forms a network with randomized settings on channel 15.
  • network_backup: Backs up the network data and device information into a human-readable JSON document.
  • network_restore: Restores a JSON network backup to the adapter.
  • network_scan: Actively sends beacon requests for network stumbling.
  • nvram_read: Reads all possible NVRAM entries into a JSON document.
  • nvram_reset: Deletes all possible NVRAM entries
  • nvram_write: Writes all NVRAM entries from a JSON document.

Hardware requirements

USB-adapters, GPIO-modules, and development-boards flashed with TI's Z-Stack are compatible with zigpy-znp:

  • CC2652P/CC2652R/CC2652RB USB stick and dev board hardware
  • CC1352P/CC1352R USB stick and dev board hardware
  • CC2538 + CC2592 USB stick and dev board hardware (not recommended, old hardware and end-of-life firmware)
  • CC2531 USB stick hardware (not recommended for Zigbee networks with more than 20 devices)
  • CC2530 + CC2591/CC2592 USB stick hardware (not recommended for Zigbee networks with more than 20 devices)

Tip! Adapters listed as "Texas Instruments sticks compatible with Zigbee2MQTT" also works with zigpy-znp.

Reference hardware for this project

These specific adapters are used as reference hardware for development and testing by zigpy-znp developers:

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.

Supported older generation TI chips

  • CC2538: 2.4GHz Zigbee, 6LoWPAN, and IEEE 802.15.4 wireless MCU. ARM Cortex-M3 core with with 512kB Flash and 32kB RAM.
  • CC2531: CC2530 with a built-in UART/TTL to USB Bridge. Used in the cheap "Zigbee sticks" sold everywhere. Intel 8051 core, 256 Flash, only has 8kB RAM.
  • CC2530: 2.4GHz Zigbee and IEEE 802.15.4 wireless MCU. Intel 8051 core, 256 Flash, only has 8kB RAM.

Auxiliary TI chips

  • CC2591 and CC2592: 2.4 GHz range extenders. These are not wireless MCUs, just auxiliary 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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].