feat: add a button gesture to return to pairing mode
A light that has a network only ever rejoins that one, so there was no way to re-pair it or move it to another coordinator without reflashing. Holding the encoder button for 10 seconds now makes the light flash green twice, forget its Zigbee network (saved to flash) and restart, after which it looks for a network with an open pairing window, in ZHA with Add device. The coordinator is not told, so Home Assistant keeps the device and recognises it by its IEEE address when it joins again. While the light is looking for a network the on-board LED blinks fast instead of once a second, so a waiting pairing window can be seen to be picked up, and the change between joined and searching is logged. The README documents the gesture and how pairing works, and notes that the extended PAN ID is broadcast by the network and is not a secret. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
1 parent
90af6197c6
commit
575cd8896f
6 files changed
+136
-12
No files matched your search
@@ -22,6 +22,7 @@ The on-board user LED (GPIO15) blinks as a heartbeat.
|
||||
| Turn the encoder | Brightness up or down |
|
||||
| Click | Next colour temperature preset |
|
||||
| Long press | Turn on or off |
|
||||
| Hold for 10 seconds | Forget the Zigbee network and go back to pairing mode |
|
||||
|
||||
From Home Assistant you get on/off, brightness, colour temperature and colour.
|
||||
Blink and breathe effects are available through the light's `flash` option, and
|
||||
@@ -83,11 +84,23 @@ hardware checks, run with `cargo run --release --bin led_diag`.
|
||||
|
||||
## Joining the network
|
||||
|
||||
Put your coordinator into pairing mode (in ZHA, **Add device**). The light scans
|
||||
every few seconds and joins when it finds the network permitting joins. After
|
||||
that it rejoins by itself when it restarts. If it has lost its network keys, for
|
||||
example after a long coordinator outage, put the coordinator back into pairing
|
||||
mode and it will join again.
|
||||
A light that is not on a network is always in pairing mode: it scans every few
|
||||
seconds, and the on-board LED blinks quickly while it does. To join, open a
|
||||
pairing window on your coordinator (in ZHA, **Add device**) and the light joins
|
||||
as soon as it sees it. After that it rejoins by itself when it restarts.
|
||||
|
||||
To pair a light that is already on a network, for example to re-pair it or move
|
||||
it to another coordinator, hold the encoder button for 10 seconds. The strip
|
||||
flashes green twice, the light forgets its network and restarts, and it is then
|
||||
in pairing mode as above. The coordinator is not told, so Home Assistant keeps
|
||||
the device and recognises it when it joins again.
|
||||
|
||||
The same applies if it has lost its network keys, for example after a long
|
||||
coordinator outage: open the pairing window and it will join again.
|
||||
|
||||
The network it looks for is fixed in the firmware (see Configuration), so a
|
||||
light only pairs with a coordinator whose extended PAN ID and channel match.
|
||||
The extended PAN ID is broadcast by the network and is not a secret.
|
||||
|
||||
## Effects
|
||||
|
||||
|
||||
Reference in new issue
Block a user