WB-MSW v.3 Zigbee Sensor: различия между версиями

Строка 186: Строка 186:
{
{
   "id": "0x0000000000000",
   "id": "0x0000000000000",
   "options": {"manufacturerCode":26214},
   "options": {},
   "cluster": "yourCluster",
   "cluster": "yourCluster",
   "attribute": "yourAttribute",
   "attribute": "yourAttribute",
Строка 193: Строка 193:
   "reportable_change": 10
   "reportable_change": 10
}
}
</syntaxhighlight>
Для каналов '''occupancy_level''' и '''noise''', секция '''options''' должна выглядеть так: <code>"options": {"manufacturerCode":26214},</code>. В остальных случаях оставьте её пустой <code>"options": {},</code>.
Например, настроим с помощью wb-rules период опроса уровня шума (noise) в датчике с адресом ''0x842e14fffe8b184e'':
<syntaxhighlight lang="js">
message = {
  "id": "0x842e14fffe8b184e",
  "options": {"manufacturerCode":26214},
  "cluster": "sprutNoise",
  "attribute": "noise",
  "minimum_report_interval": 10,
  "maximum_report_interval": 60,
  "reportable_change": 5
}
publish('zigbee2mqtt/bridge/request/device/configure_reporting', JSON.stringify(message), 2, false);
</syntaxhighlight>
</syntaxhighlight>