Skip to content

Security System

José Antonio Jiménez Campos edited this page Jul 20, 2021 · 24 revisions

A Security System, that can be used to trigger an alarm and send notifications. Can be activated with a group of sensors using HomeKit automations.

Type Service Type
55 Security System
56 Security System Simple mode

Standard HomeKit Security System has 4 states (Descriptions by @Unteins):

  • Home: People at home, ignore some sensors like your front door sensor and your motion sensors because you’re coming and going through the house
  • Away: No one at home, listen to ALL the sensors and sound alarms.
  • Night: everyone should be inside, ignore motion sensors in the house because we might get a glass of water in the middle of the night but all door and window sensors should trigger alarms because no one should be going on and out.
  • Off: self explanatory.

And HomeKit Security System Simple has only 2 states:

  • Away
  • OFF

The following configuration is available:

Section Key Description
Actions "0", "1" etc. The actions performed by the service
Service Notifications "m" Notifications to send by another service
Initial State "s" State an service enters on boot
Actions on Boot "xa" Enable / Disable execution of service actions on boot

Example

{
  "a": [{
    "t": 55,
    "s": 5,
    "es":[{
      "h": 2,
      "i": 1,
      "1": { "m": [ [ 1, 4 ] ] }
    }]
  }]
}

This is an example of a security system ("t": 55) with a hidden switch used to trigger alarm when security system is activated. If you want to use a standar switch visible in Apple Home App, remove "h":2.

Actions

Key Action Description
"0" Stay at Home mode selected (default)
"1" Away from Home mode selected
"2" Night mode selected
"3" OFF mode selected
"4" Alarm triggered
"5" Alarm triggered when Stay at Home mode selected
"6" Alarm triggered when Away from Home mode selected
"7" Alarm triggered when Night mode selected

Service Notifications

The list of notifications "m" supported are as follows:

Value Notification
0 Set Stay at Home mode
1 Set Away from Home mode
2 Set Night mode
3 Set OFF mode
4 Trigger alarm
5 Trigger alarm if Stay at Home mode selected
6 Trigger alarm if Away from Home mode selected
7 Trigger alarm if Night mode selected
10 Set Stay at Home mode status only
11 Set Away from Home mode status only
12 Set Night mode status only
13 Set OFF mode status only

Setting status only will not exec any associated action.

See the general Service Notifications section for details of how to configure these notifications.

Initial State

The Initial State key is supported by this service. Refer to Initial State for details of the available values.

Clone this wiki locally