{
  "pluginAlias": "homebridge-caddx-interlogix",
  "pluginType": "platform",
  "singular": true,
  "headerDisplay": "Homebridge support for NX-595E ComNav/CaddX network interface (https://github.com/flareman/homebridge-nx595e/)",
  "footerDisplay": "Support the author (https://paypal.me/flareman?locale.x=en_US)",
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "title": "Name",
        "type": "string",
        "required": true,
        "default": "NX595E Security System Platform",
        "description": "Name of the security platform"
      },
      "username" : {
        "title": "Username",
        "type": "string",
        "required": true,
        "description": "The alarm panel username to be used"
      },
      "pin" : {
        "title": "PIN code",
        "type": "string",
        "required": true,
        "minLength": 4,
        "maxLength": 4,
        "pattern": "^[0-9]+$",
        "description": "The PIN code for the username specified"
      },
      "ip" : {
        "title": "IP address",
        "type": "string",
        "required": true,
        "anyOf": [
            {
                "format": "ipv4"
            },
            {
                "format": "hostname"
            }
        ],
        "description": "The alarm panel IP address or hostname (should be set as static)"
      },
      "displayBypassSwitches" : {
        "title": "Display zone bypass switches",
        "type": "boolean",
        "required": false,
        "placeholder": false,
        "default": false,
        "description": "Whether zone sensors will also expose a switch for bypassing"
      },
      "displayOutputSwitches" : {
        "title": "Display output relay switches",
        "type": "boolean",
        "required": false,
        "placeholder": false,
        "default": false,
        "description": "Whether the plugin will expose switches for the output relays"
      },
      "pollTimer" : {
        "title": "Poll delay (in ms)",
        "type": "integer",
        "required": false,
        "placeholder": 500,
        "default": 500,
        "minimum": 100,
        "maximum": 5000,
        "description": "Delay in ms between poll requests to the panel for status updates"
      },
      "radarPersistence" : {
        "title": "Radar sensor persistence (in ms)",
        "type": "integer",
        "required": false,
        "placeholder": 60000,
        "default": 60000,
        "minimum": 500,
        "maximum": 300000,
        "description": "Time in milliseconds for which a radar will report motion after it fires (between 500 and 300,000 ms)"
      },
      "smokePersistence" : {
        "title": "Smoke sensor persistence (in ms)",
        "type": "integer",
        "required": false,
        "placeholder": 60000,
        "default": 60000,
        "minimum": 500,
        "maximum": 300000,
        "description": "Time in milliseconds for which a smoke sensor will report motion after it fires (between 500 and 300,000 ms)"
      },
      "ignoreZones": {
        "title": "Zones to be ignored",
        "type": "string",
        "required": false,
        "description": "Specifies which zones should be ignored; zone indexes can be separated by commas. Ranges are allowed as well using a dash.",
        "pattern": "^\\d{1,3}(?:-\\d{1,3})?(?:,\\d{1,3}(?:-\\d{1,3})?)*$"
      },
      "override": {
        "title": "Zone Overrides",
        "type": "array",
        "required": false,
        "minItems": 0,
        "items": {
          "type": "object",
          "properties": {
            "index": {
              "title": "Zone index",
              "type": "number",
              "required": true,
              "description": "The index of the specified zone to override (must be valid; when multiple overrides are set for the same zone index, only the last one will be used)"
            },
            "name": {
              "title": "Zone name",
              "type": "string",
              "required": false,
              "description": "The override name for this zone (or left blank if you want to retain the original name)"
            },
            "sensor": {
              "title": "Zone type (Contact, Smoke or Radar)",
              "type": "string",
              "enum": ["Contact", "Radar", "Smoke"],
              "required": true,
              "default": "Contact",
              "description": "The type of this zone sensor, namely \"Contact\" sensor, \"Smoke\" sensor, or motion \"Radar\""
            }
          }
        },
        "uniqueItems": false,
        "description": "Custom override for zone names and accessory types"
      }
    }
  }
}
