zigpy / zigpy-cli

Command line interface for zigpy
GNU General Public License v3.0
44 stars 12 forks source link

Add Espressif System Zigbee radio library support #42

Closed lhespress closed 6 months ago

lhespress commented 7 months ago

Add Espressif System Zigbee radio library support which use Espressif Zigbee Network Core-Processor Protocol (EZNP).

lhespress commented 7 months ago

@puddly PTAL

puddly commented 7 months ago

Could you point me to where the zigpy-eznp package resides? It is not available on PyPI (https://pypi.org/project/zigpy-eznp/) and I cannot find it on GitHub.

The name of this package is very close to zigpy-znp (in fact, Google autocorrects it). Perhaps zigpy-esp would be a more distinct name?

Hedda commented 7 months ago

@chshu I guess this is about the zigpy request in https://github.com/zigpy/zigpy/issues/1052 as well related to your posts in https://github.com/espressif/esp-zigbee-sdk/issues/124#issuecomment-1833291850 and -> https://github.com/espressif/esp-zigbee-sdk/issues/124#issuecomment-1835357244 about ESP Zigbee NCP host support https://github.com/espressif/esp-zigbee-sdk/issues/124 ?

We are working on a ESP Zigbee NCP solution, which will be based on the ESP Zigbee APIs, and provide the serial interface to communicate with host.

We will also prepare a corresponding zigpy python library to work with Home Assistant. The draft version will be ready in 2024 January.

The ESP Zigbee NCP will not be compatible with ZBOSS NCP. With ZBOSS NCP, users need to run ZCL and part of ZDO on host. We want to integrate ZCL and ZDO in the ESP Zigbee NCP as well, so host can handle the application logic only. If some hosts already have ZCL implementation, it's also flexible to access the NCP network layer directly.

Hedda commented 7 months ago

The name of this package is very close to zigpy-znp (in fact, Google autocorrects it). Perhaps zigpy-esp would be a more distinct name?

@lhespress Suggest zigpy-espzb, zigpy-esp-zb, or zigpy-esp_zb is better? Or maybe zigpy-esp-zigbee if it is not too long?

zigpy-espzb, zigpy-esp-zb, or zigpy-esp_zb since ESP_ZB is used in your API, or zigpy-esp-zigbee since in SDK + lib name:

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/api-reference/esp_zigbee_core.html

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/api-reference/zcl/index.html

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-zigbee-sdk/tree/main/components/esp-zigbee-lib/include

https://github.com/espressif/esp-zigbee-sdk/tree/main/components/esp-zigbee-lib/include/cli

https://components.espressif.com/components/espressif/esp-zigbee-lib

https://components.espressif.com/components/espressif/esp-zigbee-lib

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/developing.html#zigbee-product

https://github.com/espressif/esp-protocols

lhespress commented 7 months ago

Could you point me to where the zigpy-eznp package resides? It is not available on PyPI (https://pypi.org/project/zigpy-eznp/) and I cannot find it on GitHub.

The name of this package is very close to zigpy-znp (in fact, Google autocorrects it). Perhaps zigpy-esp would be a more distinct name?

We also have some changes in review so haven't been released. BTW, We hope release it with zigpy on github, Could you help create a project for it?

The PR just want to add it to the zigpy-cli for test.

lhespress commented 7 months ago

The name of this package is very close to zigpy-znp (in fact, Google autocorrects it). Perhaps zigpy-esp would be a more distinct name?

@lhespress Suggest zigpy-espzb, zigpy-esp-zb, or zigpy-esp_zb is better? Or maybe zigpy-esp-zigbee if it is not too long?

zigpy-espzb, zigpy-esp-zb, or zigpy-esp_zb since ESP_ZB is used in your API, or zigpy-esp-zigbee since in SDK + lib name:

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/api-reference/esp_zigbee_core.html

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/api-reference/zcl/index.html

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-zigbee-sdk/tree/main/components/esp-zigbee-lib/include

https://github.com/espressif/esp-zigbee-sdk/tree/main/components/esp-zigbee-lib/include/cli

https://components.espressif.com/components/espressif/esp-zigbee-lib

https://components.espressif.com/components/espressif/esp-zigbee-lib

https://docs.espressif.com/projects/esp-zigbee-sdk/en/latest/esp32/developing.html#zigbee-product

https://github.com/espressif/esp-protocols

@Hedda @puddly About zigpy-eznp, we means Espressif Zigbee Network Core-Processor Protocol (EZNP), of course, we'll discuss it again, thanks for your suggestion.

lhespress commented 7 months ago

@chshu I guess this is about the zigpy request in zigpy/zigpy#1052 as well related to your posts in espressif/esp-zigbee-sdk#124 (comment) and -> espressif/esp-zigbee-sdk#124 (comment) about ESP Zigbee NCP host support espressif/esp-zigbee-sdk#124 ?

We are working on a ESP Zigbee NCP solution, which will be based on the ESP Zigbee APIs, and provide the serial interface to communicate with host.

We will also prepare a corresponding zigpy python library to work with Home Assistant. The draft version will be ready in 2024 January.

The ESP Zigbee NCP will not be compatible with ZBOSS NCP. With ZBOSS NCP, users need to run ZCL and part of ZDO on host. We want to integrate ZCL and ZDO in the ESP Zigbee NCP as well, so host can handle the application logic only. If some hosts already have ZCL implementation, it's also flexible to access the NCP network layer directly.

@Hedda Right

puddly commented 7 months ago

We can talk about naming later, it isn't important.

BTW, We hope release it with zigpy on github, Could you help create a project for it?

Do you mean under the zigpy organization? I can do that. You can also create the project within the Espressif organization or a personal account and then transfer it.

The PR just want to add it to the zigpy-cli for test.

zigpy-cli requires all of its dependencies be installable. Otherwise, zigpy-cli can't be installed itself. Let me know once you've published the radio library to PyPI and I can test it out or help get it running.

Hedda commented 7 months ago

BTW, We hope release it with zigpy on github, Could you help create a project for it?

Do you mean under the zigpy organization? I can do that. You can also create the project within the Espressif organization or a personal account and then transfer it.

The PR just want to add it to the zigpy-cli for test.

zigpy-cli requires all of its dependencies be installable. Otherwise, zigpy-cli can't be installed itself. Let me know once you've published the radio library to PyPI and I can test it out or help get it running.

@lhespress remember to add LICENSE and COPYING files to root of repo if have not already, (FYI, all other zigpy libs are GPLv3):

https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/licensing-a-repository

https://docs.github.com/en/communities/setting-up-your-project-for-healthy-contributions/adding-a-license-to-a-repository