Skip to content
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

Add parameter to set channel #6

Closed
mdeweerd opened this issue Dec 20, 2021 · 4 comments
Closed

Add parameter to set channel #6

mdeweerd opened this issue Dec 20, 2021 · 4 comments

Comments

@mdeweerd
Copy link

In order to force the channel, I updated the 'form' function like this:

async def form(app):
    app.config[conf.CONF_NWK][conf.CONF_NWK_CHANNEL]=11
    app.config[conf.CONF_NWK][conf.CONF_NWK_CHANNELS]=[11]
    await app.startup(auto_form=True)
    await app.form_network()
    dump_app_info(app)

I suggest to add a command line option allowing to force the channel or channel list.

@puddly
Copy link
Contributor

puddly commented Dec 20, 2021

Command line options will be rolled into #2. I'm planning on exposing all of the configurable settings in https://github.com/puddly/zigpy/blob/b350c3298a907559a343547c1d86e5e9c2b0bf23/zigpy/state.py#L32-L68:

$ RADIO=/dev/serial/by-id/...
$ zigpy -vv radio znp $RADIO change --channel=11  # Changes channel
$ zigpy -vv radio znp $RADIO form --channel=11  # Forms a new network

@Hedda
Copy link

Hedda commented Jun 29, 2022

Are all the needed parameters to set a channel in order to allow changing Zigbee channels now in place in zigpy-cli/zigpy?

Does it send out a message to all devices to notify them about the channel change so they should try to switch to that channel?

PS: I know channel change should not be done on a whim but would love a UI setting in the ZHA integration as a feature ;)

@puddly
Copy link
Contributor

puddly commented Feb 9, 2023

The change-channel command now exists. You can also change the channel by performing a backup, editing the JSON, and then a restore.

@puddly puddly closed this as completed Feb 9, 2023
@mdeweerd
Copy link
Author

mdeweerd commented Feb 9, 2023

Thanks for the update.

However, I opened this issue with regards to the "form" command, not per se to change a channel already set.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants