-
Notifications
You must be signed in to change notification settings - Fork 155
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[SUGGESTION] Use Nordic nRF52840 chip ... #394
Comments
I use the dongle as a sniffer and it seems to work fine. If you want to try writing a zigpy radio library for it, using their "CLI interface" might make this a relatively simple adapter to implement. |
Anyone working on a zigpy radio library for ZBOSS stacks on Nordic Semiconductor (Nordic Semi) nRF52833/nRF52840 hardware? nRF52840 Dongle specifications (which include Zigbee 3.0 support) looks to be very attractive for its price of about $9 dollars. https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-Dongle nRF52840 SoC for Bluetooth 5.3 BLE, Bluetooth Mesh, NFC, Thread and Zigbee very impressive hardware specifications: https://www.nordicsemi.com/Products/nRF52840
And unlike most of the others, their nRF5 SDK for Zigbee (and Thread) is available without cost from nordicsemi.com (NordicSemi) https://www.nordicsemi.com/Software-and-tools/Software/Zigbee-software https://www.nordicsemi.com/Software-and-tools/Software/nRF5-SDK-for-Thread-and-Zigbee https://www.nordicsemi.com/Products/Low-power-short-range-wireless/Zigbee It includes a pre-built Zigbee 3.0 stack (ZBOSS independent Zigbee stack by DSR) As already mentioned its firmware application offer a CLI (Command line interface) as an open API https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.0.0%2Fzigbee_cli_wrapper.html The zb-cli-wrapper is a Python package that includes example wrapper for Nordic Zigbee CLI Agent https://pypi.org/project/zb-cli-wrapper/ nRF52840 DK Development kit / development baord is also not expensive at around $49 https://www.nordicsemi.com/Software-and-tools/Development-Kits/nRF52840-DK |
nRF52840 SoC becomes very powerful if it is combined with a nRF21540 RF Font-End Module (FEM) chip that integrates a power amplifier (PA) and low noise amplifier (LNA) as on paper get a boost up to 16 times range increase and -100 dBm RX sensitivity. https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF21540 nRF21540 key features and specifications:
nRF21540 development kit provides a full-featured development kit with the following features:
That board shares many of the same features as the original nRF52840 DK, meaning software support is basically identical. Also, nRF21540 evaluation kit that is meant to connect the RF FEM to lab equipment or other radios via an SMA connector. https://www.nordicsemi.com/Products/Low-power-short-range-wireless/nRF21540 |
@NordicSemiconductor @coderbyheart @LuDuda @philips77 @roshanrajaratnam @mjdietzx / @DSRCorporation @t7ko Does anyone at Nordic Semiconductor and/or DSR Corporation have any interest and resources that could develop a radio library for zigpy as POC? ZBOSS and Nordic Semiconductor support is the last major Zigbee stack and Zigbee hardware that is missing zigpy support now. |
Thank you for bringing this to my attention. I have forwarded this thread internally to colleagues who might have more input. I think it's fair to say that interest for zigpy support is rather low (DevZone search) which is not meant to say that this project is not valuable. It's probably not on many peoples radar at Nordic. Nordic provides a Zigbee CLI wrapper for python which you might be able to leverage for this effort, and this is what we recommend to use when building solutions on Zigbee. |
@coderbyheart That is probably because most people do not know that zigpy is the Zigbee library that Home Assistant depends on https://www.home-assistant.io/integrations/zha/ Home Assistant is otherwise very popular so I think it is hard to call that project not valuable. |
Please double check my comment, I explicitly did write
It's a double negative so I see it's easy to misread, sorry for that. |
Sorry, yeah I am not a native English speaker, though I understand that they might also have problems with a double negative ;) If look at it from a marketing value view you can see Nordic Semiconductor and ZBOSS support is missing from Home Assistant: https://www.home-assistant.io/integrations/zha/ Home Assistant made it on the official GitHub Octoverse Top-10 list for most popular open source projects on GitHub this year: https://octoverse.github.com/#trends If there was support for Nordic Semiconductor in Home Assistant's ZHA component via zigpy then you get more devs and users. https://github.com/zigpy/zigpy/blob/dev/README.md I also read that a few other open source project are looking into integrating zigpy because it has board hardware support. |
I'm quite familiar with the nRF52 and IEEE802.15.4 but new to zigbee. I wanted to write a zigpy radio library for the nRF52. I have read into the code of some of the other radio libraries and if I got it right, I need to implement all the function of the Do you have an API description which is more complete than the one in the contributing document? And for testing: how can I add my new nRF52 lib to Homeassistant? |
Check out the zha custom radios custom component for testing a new radio library in Home Assistant: https://github.com/zha-ng/zha-custom-radios Archived as as not used any longer but you probably get the gist of it. |
I plan on using the zigbee cli that nordic provides. Maybe I need to extend the firmware but it's a good starting point. It uses the zboss stack. There is also a python zigbee cli wrapper but I'm not sure if I will it or not. |
Not sure if any more help than looking at all the other radio libraries but there is a beginning of API documentation in #477 Documenting zigpy API a kind of developer guide #477 There is now also a wiki that was just created a few: https://github.com/zigpy/zigpy/wiki Be sure to check out the discussion area as well: https://github.com/zigpy/zigpy/discussions |
FYI @tomchy |
FYI, found this project by @hipiphock & @ninima0323 which looks to be using zb-cli-wrapper to command Zigbee devices: https://github.com/hipiphock/Dongle-Handler/ https://github.com/ninima0323/TestGUI If it existed then maybe they would be interested in using zigpy together with a zigpy-zboss radio library in such a project? ;) |
@LuDuda: Thank you for bringing my attention to this conversation! The first question that comes into my mind is: does the the zigpy project expects a well-defined device in a Zigbee network (e.g. the coordinator), able to send ZCL commands - or - a generic, universal Zigbee dongle, that (from Zigbee protocol perspective) is defined and configured through python classes? If it is enough to pass the Zigbee CLI device definition through handlers and provide an API to send/receive ZCL commands, than the CLI example looks like a good choice to do the job. On the contrary, if it is expected to define a device through python (e.g. it is required to provide an API to add Zigbee endpoints, set simple descriptors, send/receive raw APS frames), I'd advise to look into the NCP solution, introduced in NCS 1.4.0. |
@tomchy @LuDuda and @MeisterBob For TI coordinators is using the TIs Z-Stack Monitor and Test(MT) APIs for configuring and communicating with the devices in the mesh but its little high level and is limiting the functionality. For the TI integration is @puddly that having the most experience and for the EZSP and others is @Adminiuga the mastermind and overall architect of zigpy. I think implanting Nordic coordinators in Zigpy is one win win situation for both sides then its open more doors and making it more flexible and user friendly for the zigbee community but its not done over one night and need lot of work being done. In lesser than one year zigpy devs have rewritten EZSP for support of more protocols versions (over 15K line codes changed) after implanting deCONZ radios and getting the all radios from alpha or beta to stable stage (exceptions is TI CC253X with old ZHA 1.2 stack) and its more or less only one large platform that is missing in the system, the Nordick one. |
@doudz might also be able to answer some questions as he too has gone through this process with ZiGate (NXP Semi based)? PS: FYI- There is now alsoa new discussion space available for zigpy here -> https://github.com/zigpy/zigpy/discussions as well as a brand new wiki here space for zigpy -> https://github.com/zigpy/zigpy/wiki (again it's brand new so not yet started to be populated). |
I am also interested in using this chip in ZHA. I want to connect a few sensors and servos to HA and I am resisting to use wifi/ESPHome as much as I can. Zigbee has been great and I am forced to have wifi for some devices (when there is no option). I managed to stay away from Zwave, BLE, etc. and for that reason I prefer to have my custom projects connected to my ZHA based Zigbee mesh. |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
I think it is a good idea to keep this suggestion 🙂 And the NCP solution has reached the v1.0.0 milestone in the NCS v1.7.0: |
@tomchy Is that still using the ZBOSS Zigbee stack? . FYI, Home Assistant has just posted some user statistics for the first time so maybe you could use that data as an incentive to convince ZBOSS and/or Nordic Semi bosses/management to contribute developer time to make a new radio library for zigpy: https://www.home-assistant.io/blog/2021/11/12/100k-analytics/ As noted there, their analytics is opt-in only and most users have not enabled analytics, yet it shows that around 14% of all Home Assistant users who actively enabled opt-in for analytics are using the native ZHA (Zigbee Home Automation) integration today: https://analytics.home-assistant.io/#integrations That zha component in Home Assistant's core in turn depends on the zigpy library and its radio libraries for zigpy in this project: https://www.home-assistant.io/integrations/zha https://github.com/home-assistant/core/tree/dev/homeassistant/components/zha Home Assistant founders estimate that less than around 20% of all users have enabled opt-in for analytics and if that is the case at 14% of the userbase there should be just over 50,000 Home Assistant installations with the ZHA integration installed, however, based on the number of users who has registered on the official Home Assistant community forum my guesstimate would be way fewer users have opt-in for analytics and there and there are actually many more ZHA installations than so. Anyway, that is technically off-topic but those interested can continue that part of the discussion in Home Assistant community forum here: Note! I guess it is maybe important noting that while the ZHA integration component is the only "native" Zigbee implementation in Home Assistant core, there are of course also many other integrations for Home Assistant that can indirectly support Zigbee devices. Other implementations that support Zigbee devices are however abstracted behind some kind of third-party hub/bridge/gateway hardware appliance or software application, such as deCONZ/Phoscon by dresden elektronik, Zigbee2MQTT, Tasmota (Zigbee2Tasmota), Philips Hue Bridge, IKEA TRÅDFRI Gateway, Samsung SmartThings, Xiaomi Gateway (or Aqara), and Tuya Smart Gateway, but all of those third-party hubs/bridges/gateways translate and convert Zigbee into other protocols or APIs, (may it be proprietary protocol/API or an open standard like example MQTT), so as far as their Home Assistant integrations go it is not really Zigbee support that has been implemented. |
More in the basket more you can do and is not locked so i think its great open more doors if possible. The statics is interesting what deCOZ user is using there system stand alone or with other integrations then they is on place 34 and they is saying having over 100K installations (= radio adapter sold)(i think most in ZHA and Z2M and some other systems) but i think most is using then with deCONZ and HA as automation system for it. |
@tomchy @coderbyheart @LuDuda @philips77 @roshanrajaratnam @mjdietzx @DSRCorporation @t7ko @andkononykhin @Diadlo @MeisterBob @greg-fer FYI, zigpy developer puddly have begun preliminary work on a new radio API for zigpy as well as on merging respective low-level and high-level functions from different radio libraries into the zigpy-cli command-line tool. As his work has just begun it would now be a great time for members of Nordic Semiconductor and DSR Corporation Zigbee developers to start giving your feedback and input on the design of this new unified new radio API and CLI for zigpy which is meant as a common way for Python developers to support Zigbee stacks and radio hardware from multiple manufacturers. Please see: https://github.com/zigpy/zigpy + https://github.com/zigpy/zigpy-cli/ (specifically zigpy/zigpy-cli#5) At the moment he is focusing on completely exposing the low-level network and node info, (for example energy scanning already works with TI ZNP and the deCONZ ConBee/RaspBee using the same code however the zigpy-znp command line tool just needs to be transplanted into zigpy-cli), so if you want a chance to influence what should go into that zigpy CLI versus what should go into the separate zigpy radio libraries for each manufacturer then now would be the best time to begin contributing.
|
JFYI: DSR now open NCP protocol description. |
Nice. Has anybody started to work on this? I can give a hand... If not, I'll start to work on this locally. And I'll let you know if I go far enough. |
Updated: @DamKast looks like @MeisterBob started on a zigpy radio for nrf52 in 2020 but would be awesome if you picked it up! @MeisterBob first wrote here in 2020 -> #709
and he also posted comments -> #394 (comment)_ and #394 (comment)_
MeisterBob then uploaded his initial work in this repository on GitHub back at the beginning of January of 2021 with no updates: https://github.com/MeisterBob/zigpy_nrf52 Also, it looks like he started work on a matching Zigbee NCP firmware configuration for the nRF52 dongle for reference as well? https://github.com/MeisterBob/nrf52_zigbee_dongle https://github.com/MeisterBob/zephyr-docker Will you make it from scratch based on their Zigbee CLI Reference or base it on Nordic Semi's Zigbee CLI wrapper? I believe one of the problems with Zigbee CLI wrapper might be if their code licenses are not compatible with the open-source license you want? https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/zigbee/shell/README.html https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_example_cli_reference.html https://infocenter.nordicsemi.com/topic/sdk_tz_v4.1.0/zigbee_example_cli_agent.html https://infocenter.nordicsemi.com/index.jsp?topic=%2Fsdk_tz_v4.1.0%2Fzigbee_cli_wrapper.html https://devzone.nordicsemi.com/f/nordic-q-a/59443/building-zigbee-cli-example-4-0 Will you be using "nRF52840 Dongle" and/or "nRF52840 DK" be used as reference hardware (and recommend them for testers?)? https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dongle https://www.nordicsemi.com/Products/Development-hardware/nrf52840-dk While the new radio API for zigpy that @puddly been working on has not yet been merged it sounds as if it probably will sooner rather than later so might want to target that new radio API and use his zigpy-znp radio library branch for it as a reference (or?):
PS: Bikeshedding name idea but probably be nicer if call yours "zigpy-nfr" or at least without numbers if will not limit it to nrf52, or if Zigbee CLI they are using is not proprietary to Nordic Semi and instead ZBOSS NCP serial protocol then maybe "zigpy-zboss" or "zigpy-zoi" is better as DRS ZOI ZBOSS Open Initiative Zigbee stack is meant to be hardware-agnostic? -> https://dsr-zoi.com |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
Still current |
FYI, Nordic Semi announced a new nRF54 MCU family which includes new "H series" with nRF54H20 802.15.4 radio SoC to be first: nRF54H20 will according to Nordic Semi be best-is-class and feature superior state-of-the-art in all functions categories: https://www.youtube.com/watch?v=bPPm3fLiAfc&ab_channel=NordicSemiconductor https://www.nordicsemi.com/Products/nRF54H20 PS: Bt the way, missed that Nordic Semi released nRF53 family, including nRF5340 SoC for Zigbee, Thread, and BLE back in 2019: |
Check this out! zigpy-zboss Let me know what you think, and feel free to test it out on HA |
That is awesome news! Hopefully more developers are interested to assist you now? -> https://github.com/kardia-as/zigpy-zboss Any volunteers? @tomchy @MeisterBob @eexarevsky @codebullfrog @rbultman @codyc1515 @LuDuda @coderbyheart Again, if this is made stable then it will be possible to use ZBOSS based Zigbee NCP adapters in Home Assistant's ZHA integration, Jeedom's Zigbee plugin, and Domoticz's Zigbee plugin, and well as others building Zigbee solutions in Python using zigpy. Btw, what firmware image/version do you recommend for Nordic Semi's nRF52840 Dongle and are there Python scripts to flash it? |
This is very interesting !!! If implanting support for zboss its also open for 5th version of Zigbee of EFR32 chips. Perhaps one RCP with Zigbee / Thread is coming in the future from zboss so can running OTBR on the same chip on different hardware like EFR32 and Nordic (Nordic is having the reference design OTBR implementation). |
I guess that esp-zigbee should really be discussed in its own seperate discussion(?) but it will be really interesting to hear more later once ESPHome adds support to the new ESP32-C6 SoC/modules which requires upcoming Espressif's ESP IDF 5.1-> #783 Open discussion about possibility of an esp-zigbee radio library for zigpy -> #1052 ESP32-C6 Arduino support will require ESP IDF 5.1 framework which is still under development but the hardware is available: esp-zigbee could be very interesting for ESP32-based Zigbee gateway / remote adapter products, like ex. Tube's Zigbee Gateways: https://github.com/tube0013/tube_gateways (and https://tubeszb.com ) Espressif's "esp-zigbee" solution is also based on ZBOSS Open Initiative (ZOI) and Espressif already Zigbee certificated the ESP32-H2, so assume they will do the same for ESP32-C6 after ESP IDF 5.1 is released: https://csa-iot.org/csa_product/esp32-h2/ https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/certification.html esp-zigbee:https://github.com/espressif/esp-zigbee-sdk https://github.com/espressif/esp-zigbee-sdk/tree/main/components/esp-zigbee-lib https://github.com/espressif/esp-zboss-lib/ https://components.espressif.com/components/espressif/esp-zboss-lib https://github.com/espressif/esp-idf/tree/master/examples/zigbee/ https://github.com/espressif/esp-idf/blob/master/examples/zigbee/esp_zigbee_rcp https://github.com/espressif/esp-idf/tree/master/examples/zigbee/esp_zigbee_gateway ESP tools:https://github.com/espressif/esptool https://espressif.github.io/esp-protocols/ https://github.com/espressif/esp-protocols |
By the way, could it be possible to try to update the old "zha-custom-radios" project (or fork @puddly's old custom component from older zigpy-znp revisions that were mentioned since the v0.0.10 release?) in order to make the zigpy-zboss radio library easier to install and test by pre-alpha testers as a custom component installable in Home Assistant from a custom repository via HACS (Home Assistant Community Store)? https://github.com/zha-ng/zha-custom-radios https://hacs.xyz/docs/faq/custom_repositories/ That (now obsolete) "zha-custom-radios" project was a custom component package for Home Assistant (with its ZHA component for zigpy integration) that allows users to test out new zigpy radio libraries and hardware modules before they have officially been integrated into ZHA. This enabled developers and testers to test new or updated zigpy radio modules without having to modify the ZHA component in the Home Assistant core source code. Update! - Posted a separate discussion for that question here -> kardia-as/zigpy-zboss#2 |
The firmware is built from the open nRF Connect SDK. I only changed memory configuration of the zboss stack in order to be able to build big zigbee networks (coordinator configuration). The SDK is built upon Zephyr RTOS. Here can you find a firmware for the dongle that was built from the nRF Connect SDK v2.2.0. |
Originally posted by @DamKast in kardia-as/zigpy-zboss#1 (comment)
@DamKast Could you try to ask your contacts at DSR and/or Nordic Semiconductor if they are maybe willing to also add/share documentation on their public websites so that it could be added as a reference so all zigpy developers could reference that too? (and #595) |
Hi! See there https://cloud.dsr-corporation.com/index.php/s/BAn4LtRWbJjFiAm Yes, ZBOSS supposes that application does not send ZDO commands as just APS data. Use ZDO API instead. There are full sources for the host side of ZBOSS NCP there https://developer.nordicsemi.com/Zigbee/ncp_sdk_for_host/ncp_host_v2.2.1.zip And, remind, Wireshark can parse ZBOSS NCP. But I am in doubt Nordic uses that feature. |
FYI, @DamKast have committed a few fixes to https://github.com/kardia-as/zigpy-zboss and released zigpy-zboss v1.0.2 |
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions. |
Can be closed if and when https://github.com/kardia-as/zigpy-zboss is moved to zigpy organization -> kardia-as/zigpy-zboss#17 |
Is there a willingness from the maintainers to add this? |
@puddly would it be OK to move zigpy-zboss repository to zigpy organization if maintained there by @DamKast as a member? Ownership and Maintainers of PyPI would also need to be transferred similarly: You did write a comment in kardia-as/zigpy-zboss#2 that wanted to test it thoroughly first before including in the downstream ZHA component inside the Home Assistant core repo, but could it not be moved to the zigpy organization before that regardless? It could be added as an "experimental" radio library in zigpy only, long before adding to ZHA integration (also as "experimental"). Again, it is likely to be discovered and tested by more people if added to zigpy organization and included in zigpy and on PyPI. |
The Nordic nRF52840 chip is inexpensive and has Zigbee ZBOSS support.
The pca10059 is only $10.
Nordic has an SDK with different Zigbee architectures (entire stack or just MAC layer)
... and example code
... and precompiled examples
MakerDairy sells similiar USB dongles in a nice case
The text was updated successfully, but these errors were encountered: