{
  "pluginAlias": "FritzPlatform",
  "pluginType": "platform",
  "singular": true,
  "footerDisplay": "For documentation please see [GitHub repository](https://github.com/SeydX/homebridge-fritz-platform)",
  "schema": {
    "name": {
      "title": "Name",
      "type": "string",
      "default": "FritzPlatform",
      "description": "Name for the log."
    },
    "debug": {
      "title": "Debug Log",
      "type": "boolean",
      "description": "Enables additional output (debug) in the log."
    },
    "warn": {
      "title": "Warn Log",
      "type": "boolean",
      "description": "Enables additional output (warn) in the log.",
      "default": true
    },
    "error": {
      "title": "Error Log",
      "type": "boolean",
      "description": "Enables additional output (error) in the log.",
      "default": true
    },
    "extendedError": {
      "title": "Extended Error Log",
      "type": "boolean",
      "description": "Enables additional output (detailed error) in the log.",
      "default": true,
      "condition": {
        "functionBody": "try { return model.error } catch(e){ return false }"
      }
    },
    "devices": {
      "type": "array",
      "items": {
        "title": "Devices",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "If enabled, the device will be exposed to HomeKit."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in the Home app."
          },
          "host": {
            "title": "Host",
            "type": "string",
            "required": true,
            "description": "FritzBox IP Address.",
            "condition": {
              "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "port": {
            "title": "Port",
            "type": "integer",
            "placeholder": 49000,
            "description": "Port to the TR064 Endpoint.",
            "condition": {
              "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "username": {
            "title": "Username",
            "type": "string",
            "description": "Username to log in to your FritzBox."
          },
          "password": {
            "title": "Password",
            "type": "string",
            "description": "Password to log in to your FritzBox."
          },
          "ssl": {
            "title": "SSL",
            "type": "boolean",
            "description": "Required for extended requests.",
            "required": true,
            "default": true
          },
          "tr064": {
            "title": "TR064",
            "type": "boolean",
            "description": "Enables TR064 endpoint on requests.",
            "required": true,
            "default": true
          },
          "igd": {
            "title": "IGD",
            "type": "boolean",
            "description": "Enables IGD endpoint on requests. Please disable if device seems to be offline in Apple Home.",
            "default": false
          },
          "manufacturer": {
            "name": "Manufacturer",
            "type": "string",
            "placeholder": "Fritz Box",
            "description": "Set the manufacturer name for display in the Home app."
          },
          "model": {
            "name": "Model",
            "type": "string",
            "placeholder": "Fritz Box",
            "description": "Set the model for display in the Home app."
          },
          "serialNumber": {
            "name": "Serial Number",
            "type": "string",
            "placeholder": "SerialNumber",
            "description": "Set the serial number for display in the Home app."
          },
          "oldFW": {
            "title": "Old Firmware",
            "type": "boolean",
            "description": "If you have problems with device LED turn on this option."
          },
          "wifiUnits": {
            "title": "Wifi Units",
            "type": "integer",
            "placeholder": 2,
            "default": 2,
            "description": "The amount of available wifi units (only 2.4Ghz = 1 unit / 1x 2.4Ghz and 1x 5Ghz = 2 units / 1x 2.4Ghz and 2x 5Ghz = 3 units and so on)"
          },
          "master": {
            "title": "Master Device",
            "type": "boolean",
            "description": "Enables this device as master device. Only ONE device can be checked as master device!",
            "required": true,
            "condition": {
              "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "readOnly": {
            "title": "Read Only",
            "type": "boolean",
            "description": "If enabled, the switch will not trigger on switching on/off."
          },
          "hide": {
            "title": "Hide Switch",
            "type": "boolean",
            "description": "If enabled, the switch and all his characteristics will not be exposed to Apple Home. (Options like Wifi etc. must be set to Switch to be visible in Apple Home)"
          },
          "connection": {
            "title": "Connection",
            "type": "string",
            "description": "Type of your connection",
            "oneOf": [
              {
                "title": "DSL",
                "enum": ["dsl"]
              },
              {
                "title": "Cable",
                "enum": ["cable"]
              },
              {
                "title": "Repeater",
                "enum": ["repeater"]
              }
            ],
            "required": true,
            "condition": {
              "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "options": {
            "title": "Options",
            "type": "object",
            "properties": {
              "wifi_2ghz": {
                "title": "Wifi 2.4GHZ",
                "type": "string",
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Wifi 2.4GHZ as Switch or Characteristic."
              },
              "wifi_5ghz": {
                "title": "Wifi 5GHZ",
                "type": "string",
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Wifi 5GHZ as Switch or Characteristic."
              },
              "wifi_guest": {
                "title": "Wifi Guest",
                "type": "string",
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Wifi Guest as Switch or Characteristic."
              },
              "wps": {
                "title": "WPS",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].master === true;"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables WPS as Switch or Characteristic. (Only for Master Device)"
              },
              "dect": {
                "title": "DECT",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].master === true;"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables DECT as Switch or Characteristic. (Only for Master Device)"
              },
              "aw": {
                "title": "Answering Machine",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].master === true;"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Answering Machine as Switch or Characteristic. (Only for Master Device)"
              },
              "deflection": {
                "title": "Deflection",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].master === true;"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Deflection as Switch or Characteristic. (Only for Master Device)"
              },
              "led": {
                "title": "LED",
                "type": "string",
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables LED as Switch or Characteristic."
              },
              "lock": {
                "title": "Device Lock",
                "type": "string",
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Device Lock as Switch or Characteristic."
              },
              "broadband": {
                "title": "Broadband",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].master === true;"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  }
                ],
                "description": "Enables Broadband as Characteristic. (Only for Master Device)"
              },
              "reconnect": {
                "title": "Reconnect",
                "type": "string",
                "condition": {
                  "functionBody": "return model.devices[arrayIndices[0]].connection !== 'repeater';"
                },
                "oneOf": [
                  {
                    "title": "Characteristic",
                    "enum": ["characteristic"]
                  },
                  {
                    "title": "Switch",
                    "enum": ["switch"]
                  }
                ],
                "description": "Enables Reconnect as Characteristic."
              }
            }
          }
        }
      }
    },
    "presence": {
      "type": "array",
      "items": {
        "title": "Presence",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "If enabled, the user will be exposed to HomeKit as motion/occupancy sensor."
          },
          "blockTelegram": {
            "title": "Block Telegram",
            "type": "boolean",
            "description": "Enable this, if you don't want telegram notifications for this user.",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in the Home app."
          },
          "address": {
            "title": "Address",
            "type": "string",
            "required": true,
            "description": "The IP/MAC address of the device.",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "accType": {
            "title": "Accessory Type",
            "type": "string",
            "oneOf": [
              {
                "title": "Occupancy",
                "enum": ["occupancy"]
              },
              {
                "title": "Motion",
                "enum": ["motion"]
              }
            ],
            "required": true,
            "description": "The accessory type of the device.",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "ping": {
            "title": "Ping",
            "type": "boolean",
            "description": "Enable this, to additionally ping the device if the status is not recognized correctly by the FritzBox."
          },
          "threshold": {
            "title": "Threshold",
            "type": "integer",
            "description": "Some devices deliberately disconnect from the network once the screen is turned off to save power. Ping works by keeping track of the last time a device was seen, and comparing that to a threshold value (in minutes). (Default: 15min)",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].ping } catch(e){ return false }"
            }
          },
          "onDelay": {
            "title": "Delay on detection",
            "type": "integer",
            "placeholder": 30,
            "description": "Delay timer (s) before switching to detected.",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "offDelay": {
            "title": "Delay on NO detection",
            "type": "integer",
            "placeholder": 90,
            "description": "Delay timer (s) before switching to NOT detected.",
            "condition": {
              "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
            }
          }
        }
      }
    },
    "wol": {
      "type": "array",
      "items": {
        "title": "Wake on LAN",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "If enabled, the device will be exposed to HomeKit."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in the Home app."
          },
          "address": {
            "title": "Address",
            "type": "string",
            "required": true,
            "description": "The MAC address of the device.",
            "placeholder": "AA:BB:00:11:22:B1",
            "condition": {
              "functionBody": "try { return model.wol[arrayIndices[0]].active } catch(e){ return false }"
            }
          }
        }
      }
    },
    "smarthome": {
      "type": "array",
      "items": {
        "title": "Smarthome",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "If enabled, the device will be exposed to HomeKit."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in the Home app. If it is a grouped device, please enter the name of the group as defined in FritzBox."
          },
          "ain": {
            "title": "AIN",
            "type": "string",
            "required": true,
            "placeholder": "01234567890",
            "description": "The AIN of the device.",
            "condition": {
              "functionBody": "try { return model.smarthome[arrayIndices[0]].active && !model.smarthome[arrayIndices[0]].group } catch(e){ return false }"
            }
          },
          "readOnly": {
            "title": "Read Only",
            "type": "boolean",
            "description": "If enabled, the device/group will not trigger on switching on/off.",
            "condition": {
              "functionBody": "try { model.smarthome[arrayIndices[0]].accType === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb' } catch(e){ return false }"
            }
          },
          "group": {
            "title": "Grouped Device",
            "type": "boolean",
            "description": "Enable this if you want to expose a group instead of a smarthome device.",
            "condition": {
              "functionBody": "try { return model.smarthome[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "energy": {
            "title": "Power Meter",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb';"
            },
            "description": "Enable this, if the device(s) has a built in power meter. The switch will be exposed as an outlet accessory instead of a switch accessory with FakeGato functionality to HomeKit."
          },
          "startValue": {
            "title": "Start Value",
            "type": "integer",
            "condition": {
              "functionBody": "return (model.smarthome[arrayIndices[0]].accType === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb') && model.smarthome[arrayIndices[0]].energy;"
            },
            "description": "Current power consumption when the device is active. Used for notification via telegram when started (current power consumption above this value) or ended (current power consumption below this value).",
            "minimum": 1
          },
          "externTemperatureSensor": {
            "title": "Use Extern Temperature Sensor",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'thermostat';"
            },
            "description": "Enable this, if you want to show the temperature value from the extern temperature sensor setted up in your FritzBox GUI as the current temperature."
          },
          "temperature": {
            "title": "Temperature Sensor",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'button' || model.smarthome[arrayIndices[0]].accType === 'thermostat' || model.smarthome[arrayIndices[0]].accType === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb';"
            },
            "description": "Enable this, if the device(s) has a built in temperature sensor. This exposes an additional temperature sensor as an accessory to HomeKit."
          },
          "humidity": {
            "title": "Humidity Sensor",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'button' || model.smarthome[arrayIndices[0]].accType === 'thermostat' || model.smarthome[arrayIndices[0]].accType === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb';"
            },
            "description": "Enable this, if the device(s) has a built in humidty sensor. This exposes an additional humidty sensor as an accessory to HomeKit."
          },
          "window": {
            "title": "Window Sensor",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'thermostat';"
            },
            "description": "Enable this, if the device has a built in window open function. This exposes an additional window (contact) as an accessory to HomeKit."
          },
          "openWindow": {
            "title": "Open Window Switch",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'thermostat';"
            },
            "description": "Enable this, if the device has a built in window open function. This exposes an additional open window (switch) as an accessory to HomeKit to trigger open/close window."
          },
          "brightness": {
            "title": "Brightness",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'lightbulb' || model.smarthome[arrayIndices[0]].accTypeGroup === 'lightbulb' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb';"
            },
            "description": "Enable this, if the lightbulb has a brightness adjustment functionality. This will enable brightness adjustment through HomeKit."
          },
          "color": {
            "title": "Color",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'lightbulb' || model.smarthome[arrayIndices[0]].accTypeGroup === 'lightbulb' || model.smarthome[arrayIndices[0]].accTypeGroup === 'switch-lightbulb';"
            },
            "description": "Enable this, if the lightbulb has a color adjustment functionality. This will enable color adjustment through HomeKit."
          },
          "battery": {
            "title": "Battery",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'thermostat' || model.smarthome[arrayIndices[0]].accType === 'window' || model.smarthome[arrayIndices[0]].accType === 'temperature' || model.smarthome[arrayIndices[0]].accType === 'contact' || model.smarthome[arrayIndices[0]].accTypeGroup === 'thermostat';"
            },
            "description": "Enable this, if the device has a built in battery sensor. This shows additional battery information within the accessory."
          },
          "buttons": {
            "title": "Available Button",
            "type": "integer",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'button';"
            },
            "description": "Amount of available buttons.",
            "oneOf": [
              {
                "title": "1",
                "enum": [1]
              },
              {
                "title": "4",
                "enum": [4]
              }
            ]
          },
          "longPress": {
            "title": "Long Press",
            "type": "boolean",
            "condition": {
              "functionBody": "return model.smarthome[arrayIndices[0]].accType === 'button';"
            },
            "description": "Enable this if your button also supports 'long press'."
          },
          "accTypeGroup": {
            "title": "Accessory Types (Group)",
            "type": "string",
            "condition": {
              "functionBody": "try { return model.smarthome[arrayIndices[0]].active && model.smarthome[arrayIndices[0]].group } catch(e){ return false }"
            },
            "oneOf": [
              {
                "title": "Switch",
                "enum": ["switch"]
              },
              {
                "title": "Lightbulb",
                "enum": ["lightbulb"]
              },
              {
                "title": "Thermostat",
                "enum": ["thermostat"]
              },
              {
                "title": "Switch & Lightbulb",
                "enum": ["switch-lightbulb"]
              }
            ],
            "required": true,
            "description": "The accessory type of the device(s) in the group."
          },
          "accType": {
            "title": "Accessory Type",
            "type": "string",
            "condition": {
              "functionBody": "try { return model.smarthome[arrayIndices[0]].active && !model.smarthome[arrayIndices[0]].group } catch(e){ return false }"
            },
            "oneOf": [
              {
                "title": "Button",
                "enum": ["button"]
              },
              {
                "title": "Switch",
                "enum": ["switch"]
              },
              {
                "title": "Blind",
                "enum": ["blind"]
              },
              {
                "title": "Contact",
                "enum": ["contact"]
              },
              {
                "title": "Thermostat",
                "enum": ["thermostat"]
              },
              {
                "title": "Lightbulb",
                "enum": ["lightbulb"]
              },
              {
                "title": "Temperature",
                "enum": ["temperature"]
              },
              {
                "title": "Window",
                "enum": ["window"]
              }
            ],
            "required": true,
            "description": "The accessory type of the device."
          }
        }
      }
    },
    "network": {
      "type": "array",
      "items": {
        "title": "Watch Network",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "Enabled the device for network monitoring."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in Telegram and Log."
          },
          "address": {
            "title": "Address",
            "type": "string",
            "required": true,
            "description": "The IP/MAC address of the device.",
            "condition": {
              "functionBody": "try { return model.network[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "polling": {
            "title": "Polling",
            "type": "integer",
            "description": "Polling timer.",
            "placeholder": 30,
            "minimum": 10,
            "condition": {
              "functionBody": "try { return model.network[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "onDelay": {
            "title": "Delay on detection",
            "type": "integer",
            "description": "Delay timer (s) before switching to detected.",
            "condition": {
              "functionBody": "try { return model.network[arrayIndices[0]].active } catch(e){ return false }"
            }
          },
          "offDelay": {
            "title": "Delay on NO detection",
            "type": "integer",
            "description": "Delay timer (s) before switching to NOT detected.",
            "condition": {
              "functionBody": "try { return model.network[arrayIndices[0]].active } catch(e){ return false }"
            }
          }
        }
      }
    },
    "childLock": {
      "type": "array",
      "items": {
        "title": "Child Lock",
        "type": "object",
        "properties": {
          "active": {
            "title": "Active",
            "type": "boolean",
            "description": "If enabled, the device will be exposed to HomeKit."
          },
          "name": {
            "title": "Name",
            "type": "string",
            "required": true,
            "description": "Set the device name for display in the Home app."
          },
          "ips": {
            "title": "IP addresses",
            "type": "array",
            "condition": {
              "functionBody": "try { return model.childLock[arrayIndices[0]].active } catch(e){ return false }"
            },
            "items": {
              "title": "IP Address",
              "type": "string",
              "description": "An array of ip adresses of the target.",
              "required": true
            }
          }
        }
      }
    },
    "callmonitor": {
      "titel": "Callmonitor",
      "type": "object",
      "properties": {
        "active": {
          "title": "Active",
          "description": "Activates Callmonitor.",
          "type": "boolean"
        },
        "group": {
          "title": "Group",
          "description": "Groups incoming and outgoing sensor to one.",
          "type": "boolean",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          }
        },
        "ip": {
          "title": "IP Address",
          "type": "string",
          "placeholder": "192.168.178.1",
          "required": true,
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "description": "FritzBox IP Address. (Master Device)"
        },
        "port": {
          "title": "Callmonitor Port",
          "type": "integer",
          "placeholder": 1012,
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "description": "The port to listen on for Callmonitor.",
          "required": true
        },
        "countryPrefix": {
          "title": "Country Prefix",
          "type": "string",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "description": "If your FritzBox does not provide VOIP, please enter your country prefix (eg 49, 0049 or +49)."
        },
        "cityPrefix": {
          "title": "City Prefix",
          "type": "string",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "description": "If your FritzBox does not provide VOIP, please enter your city prefix (eg 030)."
        },
        "incomingFrom": {
          "title": "Filter Incoming From number",
          "type": "array",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "items": {
            "title": "Number",
            "type": "string",
            "description": "Number to filter for incoming calls. (If a number is given, the accessory will only trigger if the number matches)"
          }
        },
        "incomingTo": {
          "title": "Filter Incoming To number",
          "type": "array",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "items": {
            "title": "Number",
            "type": "string",
            "description": "Number to filter for incoming calls only to the defined (home) number specified in the array. (If a number is given, the accessory will only trigger if the number matches)"
          }
        },
        "outgoingFrom": {
          "title": "Filter Outgoing From number",
          "type": "array",
          "condition": {
            "functionBody": "try { return model.callmonitor.active } catch(e){ return false }"
          },
          "items": {
            "title": "Number",
            "type": "string",
            "description": "Number to filter for outgoing calls only from the defined (home) number specified in the array. (If a number is given, the accessory will only trigger if the number matches)"
          }
        }
      }
    },
    "extras": {
      "titel": "Extras",
      "type": "object",
      "properties": {
        "alarm": {
          "title": "Alarm",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a Alarm switch/characteristic will be exposed to Apple Home. (Your FritzBox must support VOIP to use this function)",
              "type": "boolean"
            },
            "duration": {
              "title": "Duration",
              "type": "integer",
              "placeholder": 30,
              "condition": {
                "functionBody": "try { return model.extras.alarm.active } catch(e){ return false }"
              },
              "description": "Duration of the call."
            },
            "telNr": {
              "title": "Telephone Number",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.alarm.active } catch(e){ return false }"
              },
              "description": "Telephone number to call if alarm is enabled.",
              "required": true
            },
            "accType": {
              "title": "Accessory Type",
              "condition": {
                "functionBody": "try { return model.extras.alarm.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        },
        "wakeup": {
          "title": "Wake Up",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a WakeUp switch/characteristic will be exposed to Apple Home. (Your FritzBox must support VOIP to use this function)",
              "type": "boolean"
            },
            "duration": {
              "title": "Duration",
              "condition": {
                "functionBody": "try { return model.extras.wakeup.active } catch(e){ return false }"
              },
              "type": "integer",
              "placeholder": 30,
              "description": "Duration of the call."
            },
            "internNr": {
              "title": "Intern Phone Number",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.wakeup.active } catch(e){ return false }"
              },
              "description": "The intern phone number to call on WakeUp. (e.g **620)",
              "required": true
            },
            "accType": {
              "title": "Accessory Type",
              "condition": {
                "functionBody": "try { return model.extras.wakeup.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        },
        "ringlock": {
          "title": "Ring Lock",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a RingLock switch/characteristic will be exposed to Apple Home.",
              "type": "boolean"
            },
            "DECTphones": {
              "title": "DECT phones",
              "type": "integer",
              "condition": {
                "functionBody": "try { return model.extras.ringlock.active } catch(e){ return false }"
              },
              "description": "Amount of DECT phones.",
              "required": true
            },
            "start": {
              "title": "Start Time",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.ringlock.active } catch(e){ return false }"
              },
              "description": "The time to start ring lock. (eg 14:00)"
            },
            "end": {
              "title": "End Time",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.ringlock.active } catch(e){ return false }"
              },
              "description": "The time to end ring lock. (eg 22:00)"
            },
            "accType": {
              "title": "Accessory Type",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.ringlock.active } catch(e){ return false }"
              },
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        },
        "phoneBook": {
          "title": "Phonebook",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a PhoneBook switch/characteristic will be exposed to Apple Home.",
              "type": "boolean"
            },
            "blacklists": {
              "title": "Blacklists",
              "type": "array",
              "condition": {
                "functionBody": "try { return model.extras.phoneBook.active } catch(e){ return false }"
              },
              "items": {
                "title": "Name",
                "type": "string",
                "description": "Name of the blacklist from FritzBox."
              }
            },
            "accType": {
              "title": "Accessory Type",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.phoneBook.active } catch(e){ return false }"
              },
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        },
        "dnsServer": {
          "title": "DNS Server",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a switch/characteristic will be exposed to Apple Home to toggle between dns from internet provider and own dns server.",
              "type": "boolean"
            },
            "preferredDns": {
              "title": "Preferred DNS",
              "type": "string",
              "placeholder": "8.8.8.8",
              "condition": {
                "functionBody": "try { return model.extras.dnsServer.active } catch(e){ return false }"
              },
              "required": true,
              "description": "Preferred DNS Server."
            },
            "alternateDns": {
              "title": "Alternate DNS",
              "type": "string",
              "placeholder": "8.8.4.4",
              "condition": {
                "functionBody": "try { return model.extras.dnsServer.active } catch(e){ return false }"
              },
              "required": true,
              "description": "Alternate DNS Server."
            },
            "accType": {
              "title": "Accessory Type",
              "condition": {
                "functionBody": "try { return model.extras.dnsServer.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        },
        "fallbackInternet": {
          "title": "Fallback Internet",
          "type": "object",
          "properties": {
            "active": {
              "title": "Active",
              "description": "If enabled, a switch/characteristic will be exposed to Apple Home to toggle target fallback internet option.",
              "type": "boolean"
            },
            "provider": {
              "title": "Provider",
              "type": "string",
              "condition": {
                "functionBody": "try { return model.extras.fallbackInternet.active } catch(e){ return false }"
              },
              "required": true,
              "description": "Fallback Internet (mobile) provider."
            },
            "onState": {
              "title": "On State",
              "condition": {
                "functionBody": "try { return model.extras.fallbackInternet.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Internet access via mobile active",
                  "enum": [1]
                },
                {
                  "title": "Fallback Mode for DSL",
                  "enum": [2]
                },
                {
                  "title": "Fallback Mode for DSL/WAN",
                  "enum": [3]
                },
                {
                  "title": "Internet access via mobile deactive",
                  "enum": [4]
                }
              ],
              "description": "Because Fritzbox provides 4 options how to handle fallback, you can enter here a user defined option (1 = Internet access via mobile active, 2 = Fallback Mode for DSL, 3 = Fallback Mode for DSL/WAN, 4 = Internet access via mobile deactive) what should happen when the switch is turned on OR when the status 'ON' should be detected."
            },
            "offState": {
              "title": "Off State",
              "condition": {
                "functionBody": "try { return model.extras.fallbackInternet.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Internet access via mobile active",
                  "enum": [1]
                },
                {
                  "title": "Fallback Mode for DSL",
                  "enum": [2]
                },
                {
                  "title": "Fallback Mode for DSL/WAN",
                  "enum": [3]
                },
                {
                  "title": "Internet access via mobile deactive",
                  "enum": [4]
                }
              ],
              "description": "Because Fritzbox provides 4 options how to handle fallback, you can enter here a user defined option (1 = Internet access via mobile active, 2 = Fallback Mode for DSL, 3 = Fallback Mode for DSL/WAN, 4 = Internet access via mobile deactive) what should happen when the switch is turned off OR when the status 'OFF' should be detected."
            },
            "accType": {
              "title": "Accessory Type",
              "condition": {
                "functionBody": "try { return model.extras.fallbackInternet.active } catch(e){ return false }"
              },
              "type": "string",
              "oneOf": [
                {
                  "title": "Switch",
                  "enum": ["switch"]
                },
                {
                  "title": "Characteristic",
                  "enum": ["characteristic"]
                }
              ],
              "required": true,
              "description": "The accessory type of the device."
            }
          }
        }
      }
    },
    "options": {
      "titel": "Options",
      "type": "object",
      "properties": {
        "presence": {
          "title": "Presence",
          "type": "object",
          "properties": {
            "anyone": {
              "title": "Anyone Sensor",
              "description": "Exposes Anyone Sensor to Apple Home.",
              "type": "boolean"
            },
            "guest": {
              "title": "Guest Sensor",
              "description": "Exposes Guest Sensor to Apple Home.",
              "type": "boolean"
            },
            "accType": {
              "title": "Accessory Type",
              "type": "string",
              "oneOf": [
                {
                  "title": "Occupancy",
                  "enum": ["occupancy"]
                },
                {
                  "title": "Motion",
                  "enum": ["motion"]
                }
              ],
              "description": "The accessory type of the anyone/guest sensor."
            }
          }
        },
        "reboot": {
          "title": "Reboot",
          "type": "object",
          "properties": {
            "on": {
              "title": "On Script",
              "type": "string",
              "description": "Script to execute on starting reboot."
            },
            "off": {
              "title": "Off Script",
              "type": "string",
              "description": "Script to execute after reboot finished."
            }
          }
        },
        "polling": {
          "title": "Reboot",
          "type": "object",
          "properties": {
            "timer": {
              "title": "Polling Timer",
              "type": "integer",
              "placeholder": 15,
              "default": 15,
              "description": "Timer to refresh data on background.",
              "required": true
            },
            "timerSmarthomeButtons": {
              "title": "Polling Timer for Smarthome Buttons",
              "type": "integer",
              "placeholder": 5,
              "description": "Timer to refresh data on background."
            },
            "exclude": {
              "title": "Exclude",
              "type": "array",
              "items": {
                "title": "Name/Type/Catagory",
                "type": "string",
                "description": "Name/Type/Catagory of the device to exclude from polling."
              }
            }
          }
        }
      }
    },
    "telegram": {
      "titel": "Options",
      "type": "object",
      "properties": {
        "active": {
          "title": "Active",
          "description": "Activates Telegram.",
          "type": "boolean"
        },
        "token": {
          "title": "Token",
          "type": "string",
          "description": "Telegram Bot Token.",
          "condition": {
            "functionBody": "try { return model.telegram.active } catch(e){ return false }"
          },
          "required": true
        },
        "chatID": {
          "title": "Chat ID",
          "type": "string",
          "description": "Telegram Chat ID.",
          "condition": {
            "functionBody": "try { return model.telegram.active } catch(e){ return false }"
          },
          "required": true
        },
        "messages": {
          "title": "Messages",
          "type": "object",
          "properties": {
            "presence": {
              "title": "Presence",
              "type": "object",
              "properties": {
                "user_in": {
                  "title": "User Detected",
                  "type": "string",
                  "description": "Message if user detected. (Hint: @ will be replaced with accessory name)"
                },
                "user_out": {
                  "title": "User Not Detected",
                  "type": "string",
                  "description": "Message if user not detected anymore. (Hint: @ will be replaced with accessory name)"
                },
                "anyone_in": {
                  "title": "Anyone Detected",
                  "type": "string",
                  "description": "Message if anyone detected."
                },
                "anyone_out": {
                  "title": "Anyone Not Detected",
                  "type": "string",
                  "description": "Message if nobody detected."
                },
                "guest_in": {
                  "title": "Guest Detected",
                  "type": "string",
                  "description": "Message if someone connected to guest wlan."
                },
                "guest_out": {
                  "title": "Guest Not Detected",
                  "type": "string",
                  "description": "Message if no one connected to guest wlan."
                }
              }
            },
            "callmonitor": {
              "title": "Callmonitor",
              "type": "object",
              "properties": {
                "incoming": {
                  "title": "Incoming Call",
                  "type": "string",
                  "description": "Message for incoming call. (Hint: @ will be replaced with caller name/number and % will be replaced with your home nr.)"
                },
                "outgoing": {
                  "title": "Outgoing Call",
                  "type": "string",
                  "description": "Message for outgoing call. (Hint: @ will be replaced with caller name/number and % will be replaced with your home nr.)"
                },
                "disconnected": {
                  "title": "Call disconnected",
                  "type": "string",
                  "description": "Message if call disconnected. (Hint: @ will be replaced with caller name/number and % will be replaced with your home nr.)"
                }
              }
            },
            "alarm": {
              "title": "Alarm",
              "type": "object",
              "properties": {
                "activated": {
                  "title": "Activated",
                  "type": "string",
                  "description": "Message if alarm activated."
                },
                "deactivated": {
                  "title": "Deactivated",
                  "type": "string",
                  "description": "Message if alarm deactivated."
                }
              }
            },
            "reboot": {
              "title": "Reboot",
              "type": "object",
              "properties": {
                "start": {
                  "title": "Start",
                  "type": "string",
                  "description": "Message if reboot started/device not reachable."
                },
                "finish": {
                  "title": "Finish",
                  "type": "string",
                  "description": "Message if reboot finished/device reachable."
                }
              }
            },
            "network": {
              "title": "Watch Network",
              "type": "object",
              "properties": {
                "on": {
                  "title": "Detected",
                  "type": "string",
                  "description": "Message if device detected on network. (Hint: @ will be replaced with device name)"
                },
                "off": {
                  "title": "Not Detected",
                  "type": "string",
                  "description": "Message if device NOT detected on network. (Hint: @ will be replaced with device name)"
                }
              }
            },
            "outlet": {
              "title": "Smarthome Outlet",
              "type": "object",
              "properties": {
                "started": {
                  "title": "Started",
                  "type": "string",
                  "description": "Message when device started. (Current consumption above or equal startValue)"
                },
                "finished": {
                  "title": "Finished",
                  "type": "string",
                  "description": "Message when device finished. (Current consumption below startValue)"
                }
              }
            }
          }
        }
      }
    }
  },
  "layout": [
    "name",
    {
      "title": "Log",
      "orderable": false,
      "expandable": true,
      "expanded": false,
      "type": "section",
      "items": ["debug", "warn", "error", "extendedError"]
    },
    {
      "title": "Devices",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "devices",
          "type": "array",
          "orderable": false,
          "buttonText": "Add Device",
          "items": [
            "devices[].active",
            "devices[].name",
            "devices[].host",
            "devices[].port",
            "devices[].connection",
            "devices[].master",
            {
              "key": "devices[]",
              "type": "section",
              "title": "Credentials",
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": ["devices[].username", "devices[].password"]
            },
            {
              "key": "devices[]",
              "type": "section",
              "title": "Advanced",
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": [
                "devices[].wifiUnits",
                "devices[].oldFW",
                "devices[].readOnly",
                "devices[].hide",
                "devices[].ssl",
                "devices[].tr064",
                "devices[].igd"
              ]
            },
            {
              "key": "devices[]",
              "type": "section",
              "title": "Branding",
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": ["devices[].manufacturer", "devices[].model", "devices[].serialNumber"]
            },
            {
              "key": "devices[]",
              "type": "section",
              "title": "Options",
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.devices[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": [
                "devices[].options.wifi_2ghz",
                "devices[].options.wifi_5ghz",
                "devices[].options.wifi_guest",
                "devices[].options.wps",
                "devices[].options.dect",
                "devices[].options.aw",
                "devices[].options.deflection",
                "devices[].options.led",
                "devices[].options.lock",
                "devices[].options.broadband",
                "devices[].options.reconnect"
              ]
            }
          ]
        }
      ]
    },
    {
      "title": "Extras",
      "orderable": false,
      "expandable": true,
      "expanded": false,
      "type": "section",
      "items": [
        {
          "key": "extras",
          "type": "section",
          "title": "Alarm",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": ["extras.alarm.active", "extras.alarm.telNr", "extras.alarm.duration", "extras.alarm.accType"]
        },
        {
          "key": "extras",
          "type": "section",
          "title": "Wake Up",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": ["extras.wakeup.active", "extras.wakeup.internNr", "extras.wakeup.duration", "extras.wakeup.accType"]
        },
        {
          "key": "extras",
          "type": "section",
          "title": "Ring Lock",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "extras.ringlock.active",
            "extras.ringlock.DECTphones",
            "extras.ringlock.start",
            "extras.ringlock.end",
            "extras.ringlock.accType"
          ]
        },
        {
          "key": "extras",
          "type": "section",
          "title": "Phonebook",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "extras.phoneBook.active",
            "extras.phoneBook.accType",
            {
              "key": "extras.phoneBook.blacklists",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": true,
              "buttonText": "Add Blacklist",
              "items": ["extras.phoneBook.blacklists[]"]
            }
          ]
        },
        {
          "key": "extras",
          "type": "section",
          "title": "DNS Server",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "extras.dnsServer.active",
            "extras.dnsServer.preferredDns",
            "extras.dnsServer.alternateDns",
            "extras.dnsServer.accType"
          ]
        },
        {
          "key": "extras",
          "type": "section",
          "title": "Fallback Internet",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "extras.fallbackInternet.active",
            "extras.fallbackInternet.provider",
            "extras.fallbackInternet.onState",
            "extras.fallbackInternet.offState",
            "extras.fallbackInternet.accType"
          ]
        }
      ]
    },
    {
      "title": "Presence",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "presence",
          "type": "array",
          "orderable": false,
          "buttonText": "Add User",
          "items": [
            "presence[].active",
            "presence[].name",
            "presence[].address",
            "presence[].accType",
            "presence[].onDelay",
            "presence[].offDelay",
            "presence[].blockTelegram",
            {
              "key": "presence[]",
              "type": "section",
              "title": "Ping",
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.presence[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": ["presence[].ping", "presence[].threshold"]
            }
          ]
        }
      ]
    },
    {
      "title": "Child Lock",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "childLock",
          "type": "array",
          "orderable": false,
          "buttonText": "Add Child Lock",
          "items": [
            "childLock[].active",
            "childLock[].name",
            "childLock[].ips",
            {
              "key": "childLock[].ips",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": true,
              "buttonText": "Add IP",
              "items": ["childLock[].ips[]"]
            }
          ]
        }
      ]
    },
    {
      "title": "Wake on LAN",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "wol",
          "type": "array",
          "orderable": false,
          "buttonText": "Add WOL Device",
          "items": ["wol[].active", "wol[].name", "wol[].address"]
        }
      ]
    },
    {
      "title": "Smart Home",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "smarthome",
          "type": "array",
          "orderable": false,
          "buttonText": "Add Smarthome Device",
          "items": [
            "smarthome[].active",
            "smarthome[].name",
            "smarthome[].group",
            "smarthome[].ain",
            "smarthome[].accType",
            "smarthome[].accTypeGroup",
            {
              "key": "smarthome[]",
              "title": "Advanced",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": false,
              "condition": {
                "functionBody": "try { return model.smarthome[arrayIndices[0]].active } catch(e){ return false }"
              },
              "items": [
                "smarthome[].readOnly",
                "smarthome[].energy",
                "smarthome[].startValue",
                "smarthome[].externTemperatureSensor",
                "smarthome[].temperature",
                "smarthome[].humidity",
                "smarthome[].window",
                "smarthome[].openWindow",
                "smarthome[].brightness",
                "smarthome[].color",
                "smarthome[].battery",
                "smarthome[].longPress",
                "smarthome[].buttons"
              ]
            }
          ]
        }
      ]
    },
    {
      "title": "Callmonitor",
      "orderable": false,
      "expandable": true,
      "expanded": false,
      "type": "section",
      "items": [
        {
          "key": "callmonitor",
          "type": "object",
          "items": [
            "callmonitor.active",
            "callmonitor.group",
            "callmonitor.ip",
            "callmonitor.port",
            "callmonitor.countryPrefix",
            "callmonitor.cityPrefix",
            {
              "key": "callmonitor.incomingFrom",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": false,
              "buttonText": "Add Number",
              "items": ["callmonitor.incomingFrom[]"]
            },
            {
              "key": "callmonitor.incomingTo",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": false,
              "buttonText": "Add Number",
              "items": ["callmonitor.incomingTo[]"]
            },
            {
              "key": "callmonitor.outgoingFrom",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": false,
              "buttonText": "Add Number",
              "items": ["callmonitor.outgoingFrom[]"]
            }
          ]
        }
      ]
    },
    {
      "title": "Network Monitor",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "type": "section",
      "items": [
        {
          "key": "network",
          "type": "array",
          "orderable": false,
          "buttonText": "Add Device",
          "items": [
            "network[].active",
            "network[].name",
            "network[].address",
            "network[].polling",
            "network[].onDelay",
            "network[].offDelay"
          ]
        }
      ]
    },
    {
      "title": "Options",
      "orderable": false,
      "expandable": true,
      "expanded": false,
      "type": "section",
      "items": [
        {
          "key": "options",
          "type": "section",
          "title": "Presence",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": ["options.presence.anyone", "options.presence.guest", "options.presence.accType"]
        },
        {
          "key": "options",
          "type": "section",
          "title": "Reboot",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": ["options.reboot.on", "options.reboot.off"]
        },
        {
          "key": "options",
          "type": "section",
          "title": "Polling",
          "expandable": true,
          "expanded": false,
          "orderable": false,
          "items": [
            "options.polling.timer",
            "options.polling.timerSmarthomeButtons",
            {
              "key": "options.polling.exclude",
              "type": "section",
              "orderable": false,
              "expandable": true,
              "expanded": false,
              "buttonText": "Add",
              "items": ["options.polling.exclude[]"]
            }
          ]
        }
      ]
    },
    {
      "title": "Telegram",
      "orderable": false,
      "expandable": true,
      "expanded": false,
      "type": "section",
      "items": [
        "telegram.active",
        "telegram.token",
        "telegram.chatID",
        {
          "type": "section",
          "title": "Messages",
          "condition": {
            "functionBody": "return model.telegram.active === true;"
          },
          "orderable": false,
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "key": "telegram",
              "type": "section",
              "title": "Presence",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": [
                "telegram.messages.presence.user_in",
                "telegram.messages.presence.user_out",
                "telegram.messages.presence.anyone_in",
                "telegram.messages.presence.anyone_out",
                "telegram.messages.presence.guest_in",
                "telegram.messages.presence.guest_out"
              ]
            },
            {
              "key": "telegram",
              "type": "section",
              "title": "Callmonitor",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": [
                "telegram.messages.callmonitor.incoming",
                "telegram.messages.callmonitor.outgoing",
                "telegram.messages.callmonitor.disconnected"
              ]
            },
            {
              "key": "telegram",
              "type": "section",
              "title": "Alarm",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": ["telegram.messages.alarm.activated", "telegram.messages.alarm.deactivated"]
            },
            {
              "key": "telegram",
              "type": "section",
              "title": "Reboot",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": ["telegram.messages.reboot.start", "telegram.messages.reboot.finish"]
            },
            {
              "key": "telegram",
              "type": "section",
              "title": "Network",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": ["telegram.messages.network.on", "telegram.messages.network.off"]
            },
            {
              "key": "telegram",
              "type": "section",
              "title": "Outlet",
              "expandable": true,
              "expanded": false,
              "orderable": false,
              "items": ["telegram.messages.outlet.started", "telegram.messages.outlet.finished"]
            }
          ]
        }
      ]
    }
  ]
}
