name=IAS Zone Server
description=An IAS Server implementation that will report notifications to the client that has configured it.  This requires extending to trigger alarms. The plugin must store the client IEEE address attribute to flash. This means for the IAS CIE address attribute (0x0010) of the IAS Zone cluster (0x500), the user must select the checkbox that stores that attribute to flash.

category=Home Automation
qualityString=Requires Extending
quality=extend

dependsOnClusterServer=ias zone
sourceFiles=ias-zone-server.c, ias-zone-server-cli.c

implementedCallbacks=emberAfIasZoneClusterServerPreAttributeChangedCallback, emberAfIasZoneClusterZoneEnrollResponseCallback, emberAfIasZoneClusterServerInitCallback, emberAfIasZoneClusterServerTickCallback, emberAfPluginIasZoneServerStackStatusCallback, emberAfIasZoneClusterServerMessageSentCallback, emberAfWwahAppEventRetryManagerConfigBackoffParamsCallback,emberAfWwahAppEventRetryManagerSetBackoffParamsToDefault

providedApis=critical-message-queue

options=zoneType, enableQueue, queueDepth, minOtaTimeMs, firstBackoffTimeSec, backoffSequenceCommonRatio, maxBackoffTimeSec, unlimitedRetries, maxRetryAttempts

zoneType.name=Zone Type
zoneType.description=The configured zone type.
zoneType.type=LIST:type=IasZoneType
# keypad (0x021d)
zoneType.default=541

enableQueue.name=Queue Failed Transactions
enableQueue.description=Enabling this option will cause IAS events to be queued whenever the device is on the network and unable to communicate with the IAS Zone Client.  It will empty the contents of its queue by transmitting a zone status change command for each entry in the queue when it reestablishes communication with the IAS Client.
enableQueue.type=BOOLEAN
enableQueue.default=false

queueDepth.dependsOn=enableQueue
queueDepth.name=State Change Queue Depth
queueDepth.description=When transaction queueing is enabled, this option controls the number of entries in the transaction queue.
queueDepth.type=NUMBER:1,128
queueDepth.default=10

minOtaTimeMs.dependsOn=enableQueue
minOtaTimeMs.name=Minimum OTA Time
minOtaTimeMs.description=When transaction queueing is enabled, this option controls the minimum OTA time in milliseconds. This is to limit the immediate retries to cause an activity storm.
minOtaTimeMs.type=NUMBER:250,3000
minOtaTimeMs.default=500

firstBackoffTimeSec.dependsOn=enableQueue
firstBackoffTimeSec.name=First Backoff Time
firstBackoffTimeSec.description=When transaction queueing is enabled, this option controls the first backoff time in seconds.
firstBackoffTimeSec.type=NUMBER:1,255
firstBackoffTimeSec.default=3

backoffSequenceCommonRatio.dependsOn=enableQueue
backoffSequenceCommonRatio.name=Backoff Sequence Common Ratio
backoffSequenceCommonRatio.description=When transaction queueing is enabled, this option controls the common ratio (ie. multiplier) of the backoff sequence.
backoffSequenceCommonRatio.type=NUMBER:1,255
backoffSequenceCommonRatio.default=2

maxBackoffTimeSec.dependsOn=enableQueue
maxBackoffTimeSec.name=Maximum Backoff Time
maxBackoffTimeSec.description=When transaction queueing is enabled, this option controls the maximum of the backoff time in seconds.
maxBackoffTimeSec.type=NUMBER:1,86400
maxBackoffTimeSec.default=12

unlimitedRetries.dependsOn=enableQueue
unlimitedRetries.name=Unlimite Retries
unlimitedRetries.description=When transaction queueing is enabled, this option controls unlimited retries.
unlimitedRetries.type=BOOLEAN
unlimitedRetries.default=true

maxRetryAttempts.dependsOn=enableQueue
maxRetryAttempts.name=Maximum Number of Retry Attempts
maxRetryAttempts.description=When transaction queueing is enabled, this option controls the maximum number of retry attempts. Note, this is discarded if the Unlimited Retries option is checked.
maxRetryAttempts.type=NUMBER:1,254
maxRetryAttempts.default=100

events=manageQueue

setup(token) {
  files=ias-zone-server-tokens.h
}