Skip to content

Commit

Permalink
Alarm keypads - update docs for all devices (Koenkk#889)
Browse files Browse the repository at this point in the history
* Improve alarm keypad Notes

* Ignore .idea
  • Loading branch information
robertalexa authored Sep 2, 2021
1 parent 67ed45a commit d9c6d3a
Show file tree
Hide file tree
Showing 2 changed files with 59 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
node_modules/
_site/
.sass-cache/
.idea
.DS_Store
.idea/
68 changes: 58 additions & 10 deletions docgen/device_page_notes.js
Original file line number Diff line number Diff line change
Expand Up @@ -3478,41 +3478,89 @@ After this command thermostat responds with two messages. One for calibration ch
`,
},
{
model: ['3400-D', 'XHK1-UE'],
model: ['3400-D', 'XHK1-UE', 'XHK1-TC'],
note: `
### (Dis)arming
To (dis)arm the keypad send to \`zigbee2mqtt/[DEVICE_FRIENDLY_NAME/set\` payload:
### Arming/Disarming from the server
To set arming mode publish the following payload to \`zigbee2mqtt/FRIENDLY_NAME/set\` topic:
\`\`\`js
{
"arm_mode": {
"mode": "arm_all_zones" // Mode "arm_all_zones" or "disarm"
"mode": "arm_all_zones"
}
}
\`\`\`
Valid \`mode\` values are \`'disarm', 'arm_day_zones', 'arm_night_zones', 'arm_all_zones', 'exit_delay'\`
### Arming/Disarming from the keypad
When an attempt to set arm mode is done on the keypad, Zigbee2MQTT will publish the following payload to topic \`zigbee2mqtt/FRIENDLY_NAME\`:
### (Dis)arming from the keypad
When an attempt for (dis)arm is done on the keypad, Zigbee2MQTT will publish the following payload to topic \`zigbee2mqtt/[DEVICE_FRIENDLY_NAME\`:
\`\`\`js
{
"action": "arm_all_zones", // This is the example
"action_code": "123", // The code being entered
"action_zone": 0, // The zone being (dis)armed (always 0)
"action_transaction": 99 // The transaction number
}
\`\`\`
The automation server must validate the request and send a notification to the keypad, confirming or denying the request.
Do so by sending the following payload to \`zigbee2mqtt/FRIENDLY_NAME/set\`:
\`\`\`js
{
"arm_mode": {
"transaction": 99, // Transaction number (this must be the same as the keypad request \`action_transaction\`)
"mode": "arm_all_zones" // Mode (this must be the same as the keypad request \`action\`)
}
}
\`\`\`
Valid \`mode\` values are \`disarm\`, \`arm_day_zones\`, \`arm_night_zones\`, \`arm_all_zones\`, \`invalid_code\`, \`not_ready\`, \`already_disarmed\`
The automation server must follow the notification with an actual change to the correct arm mode. For the example above, the server should respond with \`exit_delay\`, count the elapsed time (e.g 30 secs), then change mode again to \`arm_all_zones\` (see "Arming/Disarming from the server" section above)
`,
},
{
model: ['KEYPAD001'],
note: `
### Arming/Disarming from the server
To set arming mode publish the following payload to \`zigbee2mqtt/FRIENDLY_NAME/set\` topic:
\`\`\`js
{
"action": "arm_all_zones", // OR "disarm" when being disarmed
"arm_mode": {
"mode": "arm_all_zones"
}
}
\`\`\`
Valid \`mode\` values are \`'disarm', 'arm_day_zones', 'arm_all_zones', 'exit_delay'\`
### Arming/Disarming from the keypad
When an attempt to set arm mode is done on the keypad, Zigbee2MQTT will publish the following payload to topic \`zigbee2mqtt/FRIENDLY_NAME\`:
\`\`\`js
{
"action": "arm_all_zones", // This is the example
"action_code": "123", // The code being entered
"action_zone": 0, // The zone being (dis)armed (always 0)
"action_transaction": 99 // The transaction number
}
\`\`\`
In case you want to confirm this action (e.g. \`action_code\` value is OK), respond to it by sending to \`zigbee2mqtt/[DEVICE_FRIENDLY_NAME/set\` payload:
The automation server must validate the request and send a notification to the keypad, confirming or denying the request.
Do so by sending the following payload to \`zigbee2mqtt/FRIENDLY_NAME/set\`:
\`\`\`js
{
"arm_mode": {
"transaction": 99, // Transaction number (take this value from the (dis)arm attempt property \`action_transaction\`)
"mode": "arm_all_zones" // Mode "arm_all_zones", "disarm" or "exit_delay" (take this value from the (dis)arm attempt property \`action\`)
"transaction": 99, // Transaction number (this must be the same as the keypad request \`action_transaction\`)
"mode": "arm_all_zones" // Mode (this must be the same as the keypad request \`action\`)
}
}
\`\`\`
Valid \`mode\` values are \`disarm\`, \`arm_day_zones\`, \`arm_all_zones\`, \`invalid_code\`, \`not_ready\`, \`already_disarmed\`
The automation server must follow the notification with an actual change to the correct arm mode. For the example above, the server should respond with \`exit_delay\`, count the elapsed time (e.g 30 secs), then change mode again to \`arm_all_zones\` (see "Arming/Disarming from the server" section above)
`,
},
{
Expand Down

0 comments on commit d9c6d3a

Please sign in to comment.