{
  "pluginAlias": "NoIP",
  "pluginType": "platform",
  "singular": true,
  "customUi": true,
  "customUiPath": "./dist/homebridge-ui",
  "headerDisplay": "<p align='center'><img width='250px' src='https://raw.githubusercontent.com/homebridge-plugins/homebridge-noip/latest/branding/Homebridge_x_No-IP.svg'></p>\n\nThe **Homebridge No-IP** plugin allows you to update your No-IP hostnames. \n\nTo get started link your No-IP account using the button below.",
  "footerDisplay": "Your No-IP account has been linked. Please raise any issues on our [project page](https://github.com/homebridge-plugins/homebridge-noip/issues).\n\nIf you would like to have other features, fill out [Feature Request Form](https://github.com/homebridge-plugins/homebridge-noip/issues/new?assignees=&labels=&template=feature_request.md).",
  "schema": {
    "type": "object",
    "properties": {
      "name": {
        "type": "string",
        "title": "Name",
        "default": "NoIP",
        "required": true
      },
      "devices": {
        "type": "array",
        "items": {
          "title": "Devices",
          "type": "object",
          "properties": {
            "configDeviceName": {
              "title": "Device Name",
              "type": "string",
              "pattern": "^[a-zA-Z0-9]+([a-zA-Z0-9 ]*[a-zA-Z0-9]+)?$",
              "placeholder": "My Device"
            },
            "username": {
              "title": "NoIP Username/Email",
              "type": "string",
              "required": true,
              "x-schema-form": {
                "type": "email"
              }
            },
            "password": {
              "title": "NoIP Password",
              "type": "string",
              "x-schema-form": {
                "type": "password"
              }
            },
            "ipv4or6": {
              "title": "IPv4 or IPv6",
              "type": "string",
              "required": true,
              "default": "ipv4",
              "oneOf": [
                {
                  "title": "IPv4",
                  "enum": ["ipv4"]
                },
                {
                  "title": "IPv6",
                  "enum": ["ipv6"]
                }
              ]
            },
            "ipProvider": {
              "title": "IP Provider",
              "type": "string",
              "required": true,
              "default": "ipinfo",
              "oneOf": [
                {
                  "title": "ipify.org",
                  "enum": ["ipify"]
                },
                {
                  "title": "getmyip.dev",
                  "enum": ["getmyip"]
                },
                {
                  "title": "ipapi.co",
                  "enum": ["ipapi"]
                },
                {
                  "title": "my-ip.io",
                  "enum": ["myip"]
                },
                {
                  "title": "ipinfo.io",
                  "enum": ["ipinfo"]
                }
              ]
            },
            "hostname": {
              "title": "Hostname",
              "type": "string"
            },
            "firmware": {
              "title": "Firmware Override",
              "type": "string",
              "placeholder": "1.2.8"
            },
            "refreshRate": {
              "title": "Device Refresh Rate",
              "type": "number",
              "minimum": 1800,
              "placeholder": 1800,
              "description": "Indicates the number of seconds between polls of the No-IP service."
            },
            "logging": {
              "title": "Device Logging Override Setting",
              "type": "string",
              "required": true,
              "default": "",
              "oneOf": [
                {
                  "title": "Default Logging",
                  "enum": [""]
                },
                {
                  "title": "Standard Logging",
                  "enum": ["standard"]
                },
                {
                  "title": "No Logging",
                  "enum": ["none"]
                },
                {
                  "title": "Debug Logging",
                  "enum": ["debug"]
                }
              ]
            },
            "delete": {
              "title": "Delete Device",
              "type": "boolean"
            }
          }
        }
      },
      "refreshRate": {
        "title": "Refresh Rate",
        "type": "number",
        "minimum": 1800,
        "placeholder": 1800,
        "description": "Indicates the number of seconds between polls of the No-IP service."
      },
      "logging": {
        "title": "Plugin Logging Setting",
        "type": "string",
        "required": true,
        "default": "",
        "oneOf": [
          {
            "title": "Default Logging",
            "enum": [""]
          },
          {
            "title": "Standard Logging",
            "enum": ["standard"]
          },
          {
            "title": "No Logging",
            "enum": ["none"]
          },
          {
            "title": "Debug Logging",
            "enum": ["debug"]
          }
        ]
      },
      "allowInvalidCharacters": {
        "title": "Allow Invalid Characters",
        "type": "boolean",
        "default": false,
        "description": "Allow invalid characters in the configDeviceName. This is not recommended."
      }
    }
  },
  "layout": [
    {
      "key": "devices",
      "notitle": false,
      "type": "tabarray",
      "title": "{{ value.configDeviceName || value.hostname || 'New Hostname' }}",
      "expandable": true,
      "expanded": false,
      "orderable": false,
      "items": [
        "devices[].configDeviceName",
        "devices[].hostname",
        "devices[].username",
        "devices[].password",
        "devices[].ipv4or6",
        "devices[].ipProvider",
        "devices[].firmware",
        "devices[].refreshRate",
        "devices[].logging"
      ]
    },
    {
      "type": "fieldset",
      "title": "Advanced Settings",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "type": "help",
          "helpvalue": "<h5>Refresh Rate</h5><em class='primary-text'>Refresh Rate indicates the number of seconds between polls of the No-IP service.</em>"
        },
        {
          "key": "refreshRate",
          "notitle": true
        },
        "logging",
        "allowInvalidCharacters"
      ]
    }
  ]
}
