dresden-elektronik / deconz-serial-protocol

deCONZ Serial Protocol
7 stars 2 forks source link

How to enable the Conbee ZigBee Controller to enable joining as a controller. #12

Closed pwielders closed 2 years ago

pwielders commented 2 years ago

The document is a bit unclear on how to set the stick (if it is a controller) in a joinable mode. Documentation suggests that (chapter 7.2.1) The command CHANGE_NETWORK_STATE (0x08) force, if the role of the stick is controller, should force it into a join allowed by forcing the network state to NET_CONNECTED ?

Than my next question would be how to take it out of a joinable mode. SHould this be done by setting the state to NET_OFFLINE ?

What I am trying to ask is: How can I force the stick into the "Permit Join mode". This setting in the deconz App: image

Adminiuga commented 2 years ago

CHANGE_NETWORK_STATE (0x08) force, if the role of the stick is controller, should force it into a join allowed by forcing the network state to NET_CONNECTED ?

This forms the network, if the role is set as coordinator. This is different from opening the network to allow new devices to join.

To allow new devices to join, you write a value in n seconds into the permit_join network parameter

pwielders commented 2 years ago

@Adminiuga thanks for the reply, tried looking it up in the spec found in this repository (the link :-) ) as indeed I would expect that you have to configure a permit_join parameter somewhere but I can not find such a parameter in the specification. I would have expected that in chapter: "6. Configure Network Parameters" Could it be that the specification is misisng this parameter in this spec: https://deconz.dresden-elektronik.de/raspbian/deCONZ-Serial-Protocol-en_1.21.pdf

Adminiuga commented 2 years ago

Yeah, you are right. Just checked the docs again and it is not there. It's parameter ID #0x21 t.uint8 value in seconds. 0 - closes the network, non zero -opens the network for N seconds. 255 is supposed to keep the network permanently opened, although I have not tested this and per ZB3 specs devices should not keep the network permanently opened

Adminiuga commented 2 years ago

I was using this https://github.com/zigpy/zigpy-deconz/blob/22f07a4cce0f256b49b077827c6a9b26bc586250/zigpy_deconz/api.py#L172 for reference

pwielders commented 2 years ago

@Adminiuga Thanks you very much. This makes sense!