zigpy / zigpy-cli

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

Add ”Zigbee Router” (router mode) and same same utils commands as Nerivec’s ember-zli command line interface tool for Silicon Labs #48

Open Hedda opened 4 months ago

Hedda commented 4 months ago

Can commands to join a Zigbee network be added to zigpy-cli to enable using NCP in ”router mode”? I believe that bellows CLI already have join commands for this? Nerivec has implemented this and more command line tools in his new ember-zli project:

ember-zli router

Use a coordinator firmware as a router and interact with the joined network.

USAGE
  $ ember-zli router

DESCRIPTION
  Use a coordinator firmware as a router and interact with the joined network.

EXAMPLES
  $ ember-zli router

See code: https://github.com/Nerivec/ember-zli/blob/v2.9.0/src/commands/router/index.ts


For more back-story and reference specifically on the ”Zigbee Router” (router mode) feature request please also see these related requested features for zigpy and bellows about being able to command NCP to join existing network as a Zigbee Router and/or Zigbee End Device. See these previous discussions and feature requests:

And

Please consider adding ”Zigbee Router” commands (i.e. add command to enable router mode, for join network, rejoin network, or leave network, etc.), and other utils commands as Nerivec’s ember-zli command line interface tool for Silicon Labs:

https://github.com/Nerivec/ember-zli

https://github.com/Nerivec/ember-zli?tab=readme-ov-file#router

Ember ZLI

Interact with EmberZNet-based adapters using zigbee-herdsman 'ember' driver

Interactive Menus (with links to Wiki)

Bootloader

Router

Sniff

Stack

Utils

ToC

Hedda commented 2 weeks ago

For reference, @tl-sl and @Nerivec use ZAP tooling/config with custom silabs-firmware-builder to build Zigbee Router firmware:

Implement a new protocol for communicating with the builtin CLI on Silabs router firmware and integrate through out. This will allow to probe and flash router firmware

_Router firmware must implement a custom CLI command bootloader reboot that calls the bootloaderrebootAndInstall api.

This has been tested both standalone and integrated with sl-web-tools.

_Probe of CPC 115200 is fixed in https://github.com/NabuCasa/universal-silabs-flasher/pull/86, but also requires router firmware built with SL_CLI_LOCALECHO: 0

ZAP in this case refers to the ZCL Advanced Platform (ZAP) tool/format for configuring Matter devices in a standardized way: