Skip to content

Commit c96f573

Browse files
trapacskaKoenkk
andauthored
Add docs about reporting and optimistic mode (Koenkk#2519)
* Add reporting docs * Add settings.md with optimistic * Delete docs/guide/usage/reporting.md * update (#1) * Update mqtt_topics_and_messages.md * Update devices-groups.md * Delete docs/guide/usage/settings.md * Update devices-groups.md * Update mqtt_topics_and_messages.md --------- Co-authored-by: Koen Kanters <[email protected]>
1 parent 6b452e2 commit c96f573

File tree

2 files changed

+27
-3
lines changed

2 files changed

+27
-3
lines changed

docs/guide/configuration/devices-groups.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,8 +111,11 @@ Allows preventing certain attributes from ending up in the cache.
111111
This prevents attributes from being published when the value did not change.
112112

113113
**`optimistic`**
114-
Publish optimistic state after set, e.g. when a brightness change command succeeds Zigbee2MQTT assumes
115-
the brightness of the device changed and will publish this (default `true`).
114+
The optimistic mode is a feature that influences how the state of a device is handled in the absence of updates. When optimistic mode is enabled for a device and the last sent command was successful, it updates the device state accordingly, even before receiving confirmation from the device itself (default `true`).
115+
116+
Enabled: If you send a command to turn on a light and the command was succesful, for example, Zigbee2MQTT will immediately update its internal state to reflect that the light is on. If the command fails, the state is not updated.
117+
118+
Disabled: Zigbee2MQTT will only update its internal state after the device reports the new state, regardless wether the command was succesful or not.
116119

117120
**`filtered_optimistic`**
118121
Same as the `filtered_attributes` option but only applies to the optimistic published

docs/guide/usage/mqtt_topics_and_messages.md

Lines changed: 22 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -384,7 +384,28 @@ See [Binding](./binding.md).
384384

385385
#### zigbee2mqtt/bridge/request/device/configure_reporting
386386

387-
Allows to send a Zigbee configure reporting command to a device. Refer to the Configure Reporting Command in the [ZigBee Cluster Library](https://github.com/Koenkk/zigbee-herdsman/blob/master/docs/07-5123-08-Zigbee-Cluster-Library.pdf) for more information. Example payload is `{"id":"my_bulb","cluster":"genLevelCtrl","attribute":"currentLevel","minimum_report_interval":5,"maximum_report_interval":10,"reportable_change":10}`. In this case the response would be `{"data":{"id":"my_bulb","cluster":"genLevelCtrl","attribute":"currentLevel","minimum_report_interval":5,"maximum_report_interval":"10","reportable_change":10},"status":"ok"}`.
387+
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.
388+
One example is when you change brightness of a bulb with its remote instead of Zigbee2MQTT, the state becomes out of sync.
389+
By setting up reporting for the bulb it will send notifications to Zigbee2MQTT about the brightness change and can update state in Zigbee2MQTT.
390+
391+
It is a good practice to keep a balance between staying updated with relevant information and conserving energy, especially in the case of battery-powered devices.
392+
393+
Refer to the Configure Reporting Command in the [ZigBee Cluster Library](https://github.com/Koenkk/zigbee-herdsman/blob/master/docs/07-5123-08-Zigbee-Cluster-Library.pdf) for more information. Example payload is `{"id":"my_bulb","cluster":"genLevelCtrl","attribute":"currentLevel","minimum_report_interval":5,"maximum_report_interval":10,"reportable_change":10}`. In this case the response would be `{"data":{"id":"my_bulb","cluster":"genLevelCtrl","attribute":"currentLevel","minimum_report_interval":5,"maximum_report_interval":"10","reportable_change":10},"status":"ok"}`.
394+
395+
Parameters
396+
397+
**Minimum reporting interval** (minimum_report_interval)
398+
In other words: how long after the attribute changes on the device should it send an update.
399+
A value of 0 means: send an update as soon as the attribute (e.g.: temperature) changes.
400+
401+
**Maximum reporting interval** (maximum_report_interval)
402+
In other words: how frequently shall the device send a report if there is no change in the attribute constantly.
403+
A value of 60 means: if the bulb is off for 30 minutes, it still sends 30 updates (every 60 seconds) even if there was no any attribute changes(e.g.: it was not turned on or off).
404+
405+
**Minimum reporting change** (reportable_change)
406+
The Minimum Reporting Change is like telling your device to speak up only when something significant happens.
407+
If you set a minimum reporting change of 1 degree for a temperature sensor, it means the sensor won't bother you with updates unless the temperature changes by at least 1 degree.
408+
It's a way to filter out minor fluctuations and focus on important changes in the environment.
388409

389410
To disable reporting set the `maximum_report_interval` to `65535`.
390411

0 commit comments

Comments
 (0)