Skip to content

Commit 8c43a9c

Browse files
committed
fix: add docs for new Z2M API endpoints
1 parent fcf77e2 commit 8c43a9c

File tree

2 files changed

+63
-1
lines changed

2 files changed

+63
-1
lines changed

docs/guide/usage/binding.md

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -56,6 +56,18 @@ To do this execute the following steps:
5656
3. Bind the remote to the group by sending the following MQTT message.
5757
- `zigbee2mqtt/bridge/request/device/bind` with payload `{"from": "my_remote", "to": "my_group"}`
5858

59+
### Clearing bindings
60+
61+
Using `zigbee2mqtt/bridge/request/device/binds/clear`, bindings can be all or selectively cleared.
62+
63+
To clear all bindings, just send the topic with the payload e.g. `{"target": "my_device"}`.
64+
65+
To selectively clear bindings by IEEE address, send the topic with the payload e.g. `{"target": "my_deivce", "ieeeList": ["0xa1a2a3a4a5a6a7a8", "0xb1b2b3b4b5b6b7b8"]}`.
66+
67+
::: tip
68+
Clearing bindings will automatically adjust the cached data that Zigbee2MQTT uses internally based on the request/response. After successfully executing this requests, bindings in Zigbee2MQTT should reflect actual bindings on the device.
69+
:::
70+
5971
## Devices
6072

6173
Not all devices support this, it basically comes down to the Zigbee implementation of the device itself. Check the device specific page for more info (can be reached via the supported devices page)

docs/guide/usage/mqtt_topics_and_messages.md

Lines changed: 51 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -542,7 +542,13 @@ See [Binding](./binding.md).
542542
543543
See [Binding](./binding.md).
544544
545-
#### zigbee2mqtt/bridge/request/device/configure_reporting
545+
#### zigbee2mqtt/bridge/request/device/binds/clear
546+
547+
See [Binding](./binding.md).
548+
549+
#### zigbee2mqtt/bridge/request/device/reporting/configure
550+
551+
_Alias: `zigbee2mqtt/bridge/request/device/configure_reporting` (deprecated)_
546552
547553
Allows to send a Zigbee configure reporting command to a device. Zigbee devices often have attributes that can report changes in their state, such as temperature, humidity, battery level, etc. Attribute reporting allows these devices to automatically send updates when there is a change in the values of these attributes.
548554
One example is when you change brightness of a bulb with its remote instead of Zigbee2MQTT, the state becomes out of sync.
@@ -576,6 +582,21 @@ Notes:
576582
- The `reportable_change` value depends on the unit of the attribute, e.g. for temperature 100 means in general 1°C of change.
577583
- To specify options, e.g. the manufacturerCode use e.g. `{"id":"my_bulb","cluster":"genLevelCtrl","attribute":"currentLevel","minimum_report_interval":5,"maximum_report_interval":10,"reportable_change":10,"options":{"manufacturerCode":1234}}`
578584
585+
#### zigbee2mqtt/bridge/request/device/reporting/read
586+
587+
Allows to read the reporting configuration registered on a device.
588+
Attributes must of course be reportable, an error status will be returned for any attribute in the request that is not.
589+
590+
Example payloads:
591+
592+
- For one attribute: `{"id":"my_bulb","endpoint":1,"cluster":"genLevelCtrl","configs":[{"attribute":"currentLevel"}]}`
593+
- For multiple attributes: `{"id":"my_bulb","endpoint":1,"cluster":"genLevelCtrl","configs":[{"attribute":"currentLevel"},{"attribute":"currentFrequency"}]}`
594+
- For manufacturer-specific attribute: `{"id":"my_bulb","endpoint":1,"cluster":"genLevelCtrl","configs":[{"attribute":"currentLevel"}], "manufacturerCode": 0x1234}`
595+
596+
::: tip
597+
Reading reporting config will automatically adjust the cached data that Zigbee2MQTT uses internally based on the request/response. After successfully executing this requests, reporting config in Zigbee2MQTT should reflect the actual reporting config on the device.
598+
:::
599+
579600
### Group
580601
581602
#### zigbee2mqtt/bridge/request/group/remove
@@ -629,3 +650,32 @@ See [Touchlink](./touchlink.md).
629650
#### zigbee2mqtt/bridge/request/touchlink/identify
630651
631652
See [Touchlink](./touchlink.md).
653+
654+
### Action
655+
656+
#### zigbee2mqtt/bridge/request/action
657+
658+
Allows to call specific pre-defined actions, usually manufacturer-specific.
659+
All action names are published in `zigbee2mqtt/bridge/definitions` under `actions`.
660+
661+
::: tip
662+
Specific up-to-date actions/parameters can be observed directly in the source code [https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/converters/actions.ts](https://github.com/Koenkk/zigbee-herdsman-converters/blob/master/src/converters/actions.ts)
663+
:::
664+
665+
##### Action: `hue_factory_reset`
666+
667+
Allows to reset Hue devices via a manufacturer-specific Touchlink request.
668+
669+
Parameters:
670+
671+
- `extended_pan_id` - Hex string in `0x{id}` format - the extended PAN ID of the network the device(s) should try to join after reset. E.g. `0xa1b2c3d4e5f60123`
672+
- `serial_numbers` - Array of numbers - the serial numbers of the device(s) to reset. E.g. `[123456, 987654]`
673+
674+
##### Action: `raw`
675+
676+
::: warning
677+
This allows sending requests that could negatively impact or even break your network. Use with caution!
678+
:::
679+
680+
Special action that allows to send entirely custom payloads. The given payload is analyzed to chose the proper method of sending (ZCL, ZDO, etc.).
681+
See link above for parameters details (beyond the scope of this documentation).

0 commit comments

Comments
 (0)