Skip to content

Commit 9a5a621

Browse files
committed
Document long-press companion endpoints
1 parent 7e70dd4 commit 9a5a621

2 files changed

Lines changed: 42 additions & 9 deletions

File tree

docs/changelog_fw.md

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,15 @@ Please describe what you are working on, under ## Upcoming
1212

1313
### Features
1414

15+
- **Long-press companion endpoints** — new endpoints `2N+1`..`3N` paired with
16+
the existing switch endpoints `1..N`.
17+
- One button can now drive two independent Zigbee bindings: short-press on
18+
`1..N`, long-press on `2N+1`..`3N`.
19+
- LevelControl emit on long-press is configurable: `Move` vs `MoveWithOnOff`,
20+
direction `Up`/`Down`/`Alternate`.
21+
- Safe defaults — nothing happens on long-press until you opt in. A mutex
22+
protects against conflicting configurations between paired endpoints.
23+
- See [endpoints.md](usage/endpoints.md#long-press-as-a-second-binding-target).
1524
- **Cover cluster** (window covering) for controlling the motor of curtains, blinds, and shutters.
1625
Supports open, close, and stop commands with motor safety delays.
1726
- **Cover switch cluster** for handling user input from window covering switches.
@@ -29,6 +38,11 @@ Please describe what you are working on, under ## Upcoming
2938

3039
### Changes
3140

41+
- **Deprecate `binded_mode=LONG` and `relay_mode=LONG` on switch endpoints**
42+
use the new long-press companion endpoint instead. Legacy configurations keep
43+
working unchanged; while a switch endpoint is in either deprecated long mode,
44+
its paired long-press endpoint is muted to prevent double-toggles and
45+
conflicting emissions.
3246
- Add `D<N>` config option to customize button debounce delay in milliseconds
3347
- **Bi-stable (latching) relays** have been reworked
3448
- They now use proper pulses instead of continuously driving the coil

docs/usage/endpoints.md

Lines changed: 28 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@
44
55
As the firmware supports multi-channel (multi-gang) devices, it uses Zigbee endpoints to handle command routing. Zigbee endpoints are numbered, starting from one. For each endpoint, only one instance of a specific function can exist. For example, there can only be a single relay (`OnOffCluster`) attached to endpoint 1. This document explains how the firmware assigns and uses endpoints.
66

7-
If the device is an N-gang switch module, the firmware will use `2 × N` endpoints. The first N endpoints are used for "client" (output) OnOff clusters, which can control other Zigbee devices via direct bindings. The next N endpoints (endpoints N+1 to 2×N) are used for "server" (input) OnOff clusters, which are directly linked to physical relays.
7+
If the device is an N-gang switch module, the firmware uses up to `3 × N` endpoints. The first N endpoints are "client" (output) OnOff clusters for direct bindings. If the device has physical relays, endpoints `N+1`..`2N` are "server" (input) OnOff clusters linked to those relays — on relay-less devices these endpoints are absent. Endpoints `2N+1`..`3N` are long-press companion "client" (output) OnOff + LevelControl clusters that fire on long-press.
88

99
Here is an example table:
1010

11-
| Endpoint | Clusters | Description |
12-
|----------|--------------|----------------------------------------------------------------------------------------------|
13-
| 1 | OnOff client | Binding to control other Zigbee devices |
14-
| ... | OnOff client | ... |
15-
| N | OnOff client | Binding to control other Zigbee devices |
16-
| N+1 | OnOff server | Controls Relay 1 state. Add to a group or bind it with another device to control the relay. |
17-
| ... | OnOff server | ... |
18-
| 2N | OnOff server | Controls Relay N state. Add to a group or bind it with another device to control the relay. |
11+
| Endpoint | Clusters | Description |
12+
|----------|--------------------------------|-------------|
13+
| 1 | OnOff client | Binding to control other Zigbee devices on short press |
14+
| ... | OnOff client | ... |
15+
| N | OnOff client | Binding to control other Zigbee devices |
16+
| N+1 | OnOff server | Controls Relay 1 state. Add to a group or bind it with another device to control the relay. |
17+
| ... | OnOff server | ... |
18+
| 2N | OnOff server | Controls Relay N state. Add to a group or bind it with another device to control the relay. |
19+
| 2N+1 | OnOff client + Level client | Long-press companion for switch 1 |
20+
| ... | OnOff client + Level client | ... |
21+
| 3N | OnOff client + Level client | Long-press companion for switch N |
1922

2023
## Usage Examples
2124

@@ -32,3 +35,19 @@ Bind endpoint 2 of your device to endpoint 1 of the bulb, and bind the `OnOff` c
3235
If you have two 2-gang devices and want to group the first relay of both devices, you should add endpoint 3 of both devices to the same group, as shown in the screenshot:
3336

3437
![add to group](/docs/.images/add_to_group.png)
38+
39+
### Long-press as a second binding target
40+
41+
Bind the `OnOff` cluster of endpoint `2N+1` (long-press companion of button 1) to a Zigbee target. Each long-press sends `Toggle` to that target — independently of any Home Assistant / Zigbee2MQTT automation.
42+
43+
## Migration from legacy long-press configuration
44+
45+
Earlier firmware reused the short-press endpoint for long-press via `binded_mode=LongPress` / `relay_mode=LongPress`. These are deprecated in favor of the dedicated long-press companion endpoints (`2N+1..3N`).
46+
47+
Existing configurations keep working: while a switch endpoint has either of those deprecated modes, its paired long-press companion is muted to prevent double-toggles.
48+
49+
**To migrate a button**:
50+
51+
1. Move any OnOff and LevelControl bindings from the switch endpoint (`1..N`) onto its long-press companion (`2N+1..3N`).
52+
2. If `relay_mode=LongPress` was used on the switch endpoint, set `relay_mode=LongPress` on the companion (and configure `relay_index` if needed).
53+
3. Set the switch endpoint's `binded_mode` and `relay_mode` to anything except `LongPress` — that releases the mute on the companion.

0 commit comments

Comments
 (0)