{
  "pluginAlias": "HttpWebHooks",
  "pluginType": "platform",
  "singular": true,
  "headerDisplay": "A `http` plugin with support of webhooks for homebridge.\n\nThe plugin gets its states from any system that is calling the url to trigger a state change.\n\nCurrently supports `contact`, `motion`, `occupancy`, `smoke`, `switches`, `push buttons`, `lights` (only on/off and brightness), `temperature`, `humidity`, `thermostats`, `co2sensors`, and `leak` sensors.",
  "footerDisplay": "Visit the Project [Readme](https://github.com/benzman81/homebridge-http-webhooks#readme) for more details.",
  "schema": {
    "type": "object",
    "properties": {
      "webhook_port": {
        "title": "Webhook Port",
        "type": "string",
        "placeholder": "51828",
        "required": true,
        "typeahead": {
          "source": [
            "51828"
          ]
        }
      },
      "webhook_listen_host": {
        "title": "Webhook Listen Host",
        "type": "string",
        "placeholder": "::",
        "required": false
      },
      "webhook_enable_cors": {
        "title": "Webhook enable CORS",
        "type": "boolean",
        "placeholder": false,
        "required": false
      },
      "cache_directory": {
        "title": "Cache Directory",
        "type": "string",
        "placeholder": "./.node-persist/storage",
        "required": false
      },
      "http_auth_user": {
        "title": "HTTP Auth User",
        "type": "string",
        "placeholder": "admin",
        "required": false
      },
      "http_auth_pass": {
        "title": "HTTP Auth Pass",
        "type": "string",
        "placeholder": "admin",
        "required": false
      },
      "https": {
        "title": "HTTPS",
        "type": "boolean",
        "placeholder": false,
        "required": false
      },
      "https_keyfile": {
        "title": "HTTPS Key Location",
        "type": "string",
        "placeholder": "/pathToKeyFile/server.key",
        "required": false
      },
      "https_certfile": {
        "title": "HTTPS Cert Location",
        "type": "string",
        "placeholder": "/pathToKeyFile/server.cert",
        "required": false
      },
      "sensors": {
        "type": "array",
        "title": "Sensors",
        "description": "Create contact, motion, occupancy, smoke, temperature, humidity, airquality, light, or leak sensors.",
        "items": {
          "title": "Sensors",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "sensor1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Sensor 1",
              "required": false
            },
            "type": {
              "title": "Type",
              "type": "string",
              "required": false,
              "enum": [
                "contact",
                "motion",
                "occupancy",
                "smoke",
                "temperature",
                "humidity",
                "airquality",
                "light",
                "leak"
              ]
            },
            "autoRelease": {
              "title": "Enable Auto Release",
              "type": "boolean",
              "required": false
            },
            "autoReleaseTime": {
              "title": "Auto Release Time",
              "type": "integer",
              "placeholder": "7500",
              "required": false
            },
            "resetAutoReleaseOnDetection": {
                "title": "Reset Auto Release on Detection",
                "type": "boolean",
                "required": false
            }
          }
        }
      },
      "switches": {
        "type": "array",
        "title": "Switches",
        "description": "Turn on and off switches by triggering a URL from any system.",
        "items": {
          "title": "Switches",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "Switch1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Switch 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "on_url": {
              "title": "On URL",
              "type": "string",
              "placeholder": "your url to switch the switch on",
              "required": false
            },
            "on_method": {
              "title": "On Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "on_body": {
              "title": "On Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "on_headers": {
              "title": "On Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "off_url": {
              "title": "Off URL",
              "type": "string",
              "placeholder": "your url to switch the switch off",
              "required": false
            },
            "off_method": {
              "title": "Off Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "off_body": {
              "title": "Off Body",
              "type": "string",
              "placeholder": "{ \"on\": false }",
              "required": false
            },
            "off_headers": {
              "title": "Off Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "pushbuttons": {
        "type": "array",
        "title": "Sensors",
        "description": "Push Buttons by triggerring a URL from any system. The button will be released automatically.",
        "items": {
          "title": "Sensors",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "pushbutton1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Push Button 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "push_url": {
              "title": "Push URL",
              "type": "string",
              "placeholder": "your url to be called on push",
              "required": false
            },
            "push_method": {
              "title": "Push Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "push_body": {
              "title": "Push Body",
              "type": "string",
              "placeholder": "{ \"push\": true }",
              "required": false
            },
            "push_headers": {
              "title": "Push Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "lights": {
        "type": "array",
        "title": "Lights",
        "description": "Turn on and off Lights by triggering a URL from any system.",
        "items": {
          "title": "Lights",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "light1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Light 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "on_url": {
              "title": "On URL",
              "type": "string",
              "placeholder": "your url to switch the light on",
              "required": false
            },
            "on_method": {
              "title": "On Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "on_body": {
              "title": "On Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "on_headers": {
              "title": "On Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "off_url": {
              "title": "Off URL",
              "type": "string",
              "placeholder": "your url to switch the light off",
              "required": false
            },
            "off_method": {
              "title": "Off Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "off_body": {
              "title": "Off Body",
              "type": "string",
              "placeholder": "{ \"on\": false }",
              "required": false
            },
            "off_headers": {
              "title": "Off Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "brightness_url": {
              "title": "Brightness URL",
              "type": "string",
              "placeholder": "your url to change the light brightness",
              "required": false
            },
            "brightness_method": {
              "title": "Brightness Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "brightness_body": {
              "title": "Brightness Body",
              "type": "string",
              "placeholder": "{ \"on\" : %statusPlaceholder, \"bri\" : %brightnessPlaceholder}",
              "required": false
            },
            "brightness_headers": {
              "title": "Brightness Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "brightness_factor": {
              "title": "Brightness Factor",
              "type": "number",
              "placeholder": 2.55,
              "required": false,
              "typeahead": {
                "source": [
                  2.55
                ]
              }
            }
          }
        }
      },
      "co2sensors" : {
        "type" : "array",
        "title" : "CO2 Sensors",
        "Description" : "Control a CO2 sensor by updating the PPM value.",
        "items": {
          "title": "CO2 Sensors",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "co2sensor1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "CO2 sensor 1",
              "required": false
            },
            "co2_peak_level": {
              "title": "CO2 peak level",
              "type": "integer",
              "required": false
            }
          }
        }
      },
      "thermostats": {
        "type": "array",
        "title": "Thermostats",
        "description": "Control a thermostat by updating four different values.",
        "items": {
          "title": "Thermostats",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "thermostat1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Thermostat 1",
              "required": false
            },
            "minTemp": {
              "title": "Lower bound for the temperature selector in the Home app",
              "type": "number",
              "placeholder": "15",
              "required": false
            },
            "maxTemp": {
              "title": "Upper bound for the temperature selector in the Home app",
              "type": "number",
              "placeholder": "30",
              "required": false
            },
            "minStep": {
              "title": "Minimum increment value for the temperature selector in the Home app",
              "type": "number",
              "placeholder": "0.5",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "set_target_temperature_url": {
              "title": "Set Target Temperature URL",
              "type": "string",
              "placeholder": "http://127.0.0.1/thermostatscript.php?targettemperature=%f",
              "required": false
            },
            "set_target_temperature_method": {
              "title": "Set Target Temperature Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "set_target_temperature_body": {
              "title": "Set Target Temperature Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "set_target_temperature_headers": {
              "title": "Set Target Temperature Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "set_target_heating_cooling_state_url": {
              "title": "Set Target Heating/Cooling State URL",
              "type": "string",
              "placeholder": "http://127.0.0.1/thermostatscript.php?targetstate=%b",
              "required": false
            },
            "set_target_heating_cooling_state_method": {
              "title": "Set Target Heating/Cooling State Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "set_target_heating_cooling_state_body": {
              "title": "Set Target Heating/Cooling State Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "set_target_heating_cooling_state_headers": {
              "title": "Set Target Heating/Cooling State Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "outlets": {
        "type": "array",
        "title": "Outlets",
        "description": "Turn on and off Outlets by triggering a URL from any system.",
        "items": {
          "title": "Outlets",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "outlet1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Outlet 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "on_url": {
              "title": "On URL",
              "type": "string",
              "placeholder": "your url to switch the outlet on",
              "required": false
            },
            "on_method": {
              "title": "On Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "on_body": {
              "title": "On Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "on_headers": {
              "title": "On Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "off_url": {
              "title": "Off URL",
              "type": "string",
              "placeholder": "your url to switch the outlet off",
              "required": false
            },
            "off_method": {
              "title": "Off Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "off_body": {
              "title": "Off Body",
              "type": "string",
              "placeholder": "{ \"on\": false }",
              "required": false
            },
            "off_headers": {
              "title": "Off Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "security": {
        "type": "array",
        "title": "Security",
        "description": "Control a security system by updating two different values.",
        "items": {
          "title": "Security",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "security1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Security 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "set_state_url": {
              "title": "Set State URL",
              "type": "string",
              "placeholder": "http://localhost/security/mode/%d",
              "required": false
            },
            "set_state_method": {
              "title": "Set State Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "set_state_body": {
              "title": "Set State Body",
              "type": "string",
              "placeholder": "{ \"on\": true }",
              "required": false
            },
            "set_state_headers": {
              "title": "Set State Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "garagedooropeners": {
        "type": "array",
        "title": "Garage Door Openers",
        "description": "Control a garage door opener by updating three different values.",
        "items": {
          "title": "Garage Door Openers",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "garagedooropeners1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Garage Door Opener 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "open_url": {
              "title": "Open URL",
              "type": "string",
              "placeholder": "your url to open the garage door",
              "required": false
            },
            "open_method": {
              "title": "Open Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_body": {
              "title": "Open Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_headers": {
              "title": "Open Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "close_url": {
              "title": "Close URL",
              "type": "string",
              "placeholder": "your url to close the garage door",
              "required": false
            },
            "close_method": {
              "title": "Close Method",
              "type": "string",
              "placeholder": "Get",
              "required": false
            },
            "close_body": {
              "title": "Close Body",
              "type": "string",
              "placeholder": "{ \"open\": false }",
              "required": false
            },
            "close_headers": {
              "title": "Close Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "statelessswitches": {
        "type": "array",
        "title": "Stateless Switches",
        "description": "Stateless switches requires 3 parameters accessoryId, buttonName and the event to trigger: Single press = 0, Double press = 1, Long press = 2.",
        "items": {
          "title": "Stateless Switches",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "statelessswitches1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Stateless Switch 1",
              "required": false
            },
            "buttons": {
              "type": "array",
              "title": "Buttons",
              "items": {
                "title": "Buttons",
                "type": "object",
                "properties": {
                  "name": {
                    "title": "Name",
                    "type": "string",
                    "placeholder": "Button1",
                    "required": false
                  },
                  "double_press": {
                    "title": "Double Press",
                    "type": "boolean",
                    "required": false
                  },
                  "long_press": {
                    "title": "Long Press",
                    "type": "boolean",
                    "required": false
                  }
                }
              }
            }
          }
        }
      },
      "windowcoverings": {
        "type": "array",
        "title": "Window Coverings",
        "description": "Control a window coverings by updating three different values.",
        "items": {
          "title": "Window Coverings",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "windowcovering1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Window Covering 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "open_url": {
              "title": "Open URL",
              "type": "string",
              "placeholder": "http://your.url/to/open",
              "required": false
            },
            "open_method": {
              "title": "Open Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_body": {
              "title": "Open Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_headers": {
              "title": "Open Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "open_80_url": {
              "title": "Open 80 URL",
              "type": "string",
              "placeholder": "http://your.url/to/open80%",
              "required": false
            },
            "open_80_method": {
              "title": "Open 80 Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_80_body": {
              "title": "Open 80 Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_80_headers": {
              "title": "Open 80 Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "open_60_url": {
              "title": "Open 60 URL",
              "type": "string",
              "placeholder": "http://your.url/to/open60%",
              "required": false
            },
            "open_60_method": {
              "title": "Open 60 Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_60_body": {
              "title": "Open 60 Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_60_headers": {
              "title": "Open 60 Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "open_40_url": {
              "title": "Open 40 URL",
              "type": "string",
              "placeholder": "http://your.url/to/open40%",
              "required": false
            },
            "open_40_method": {
              "title": "Open 40 Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_40_body": {
              "title": "Open 40 Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_40_headers": {
              "title": "Open 40 Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "open_20_url": {
              "title": "Open 20 URL",
              "type": "string",
              "placeholder": "http://your.url/to/open20%",
              "required": false
            },
            "open_20_method": {
              "title": "Open 20 Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_20_body": {
              "title": "Open 20 Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_20_headers": {
              "title": "Open 20 Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "close_url": {
              "title": "Close URL",
              "type": "string",
              "placeholder": "http://your.url/to/close",
              "required": false
            },
            "close_method": {
              "title": "Close Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "close_body": {
              "title": "Close Body",
              "type": "string",
              "placeholder": "{ \"open\": false }",
              "required": false
            },
            "close_headers": {
              "title": "Close Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "auto_set_current_position": {
              "title": "Auto set current position",
              "type": "boolean",
              "placeholder": false,
              "required": false
            }
          }
        }
      },
      "lockmechanisms": {
        "type": "array",
        "title": "Lock Mechanisms",
        "description": "Control a lock mechanism by updating two different values.",
        "items": {
          "title": "Lock Mechanisms",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "lockmechanisms1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Lock 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "open_url": {
              "title": "Open URL",
              "type": "string",
              "placeholder": "your url to open the lock mechanism",
              "required": false
            },
            "open_method": {
              "title": "Open Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "open_body": {
              "title": "Open Body",
              "type": "string",
              "placeholder": "{ \"open\": true }",
              "required": false
            },
            "open_headers": {
              "title": "Open Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "close_url": {
              "title": "Close URL",
              "type": "string",
              "placeholder": "your url to close the lock mechanism",
              "required": false
            },
            "close_method": {
              "title": "Close Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "close_body": {
              "title": "Close Body",
              "type": "string",
              "placeholder": "{ \"open\": false }",
              "required": false
            },
            "close_headers": {
              "title": "Close Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "fanv2s": {
        "type": "array",
        "title": "Fanv2",
        "description": "Turn on and off Fanv2s by triggering a URL from any system.",
        "items": {
          "title": "Fanv2s",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "fanv2-1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Fanv2 1",
              "required": false
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "on_url": {
              "title": "On URL",
              "type": "string",
              "placeholder": "your url to switch the fanv2 on",
              "required": false
            },
            "on_method": {
              "title": "On Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "on_body": {
              "title": "On Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "on_headers": {
              "title": "On Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "off_url": {
              "title": "Off URL",
              "type": "string",
              "placeholder": "your url to switch the fanv2 off",
              "required": false
            },
            "off_method": {
              "title": "Off Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "off_body": {
              "title": "Off Body",
              "type": "string",
              "placeholder": "{ \"on\": false }",
              "required": false
            },
            "off_headers": {
              "title": "Off Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "speed_url": {
              "title": "Speed URL",
              "type": "string",
              "placeholder": "your url to change the fanv2 rotation speed",
              "required": false
            },
            "speed_method": {
              "title": "Speed Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "speed_body": {
              "title": "Speed Body",
              "type": "string",
              "placeholder": "{ \"on\" : %statusPlaceholder, \"speed\" : %speedPlaceholder}",
              "required": false
            },
            "speed_headers": {
              "title": "Speed Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "speed_factor": {
              "title": "Speed Factor",
              "type": "number",
              "placeholder": 2.55,
              "required": false,
              "typeahead": {
                "source": [
                  2.55
                ]
              }
            },
            "enableLockPhysicalControls": {
              "title": "Enable lock physical controls",
              "type": "boolean",
              "required": false
            },
            "lock_url": {
              "title": "Lock URL",
              "type": "string",
              "placeholder": "your url to lock the fanv2s physical controls",
              "required": false
            },
            "lock_method": {
              "title": "Lock Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "lock_body": {
              "title": "Lock Body",
              "type": "string",
              "placeholder": "{ \"physicalLock\": true }",
              "required": false
            },
            "lock_headers": {
              "title": "Lock Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "unlock_url": {
              "title": "Unlock URL",
              "type": "string",
              "placeholder": "your url to unlock the fanv2s physical controls",
              "required": false
            },
            "unlock_method": {
              "title": "Unlock Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "unlock_body": {
              "title": "Unlock Body",
              "type": "string",
              "placeholder": "{ \"physicalLock\": false }",
              "required": false
            },
            "unlock_headers": {
              "title": "Unlock Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "enableTargetStateControls": {
              "title": "Enable Target State Controls",
              "type": "boolean",
              "required": false
            },
            "target_state_url": {
              "title": "Target State URL",
              "type": "string",
              "placeholder": "your url to change the fanv2s target state",
              "required": false
            },
            "target_state_method": {
              "title": "Target State Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "target_state_body": {
              "title": "Target State Body",
              "type": "string",
              "placeholder": "{ \"mode\": %targetState }",
              "required": false
            },
            "target_state_headers": {
              "title": "Target State Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "enableSwingModeControls": {
              "title": "Enable Swing Mode Controls",
              "type": "boolean",
              "required": false
            },
            "swing_mode_url": {
              "title": "Swing Mode URL",
              "type": "string",
              "placeholder": "your url to change the fanv2s swing mode",
              "required": false
            },
            "swing_mode_method": {
              "title": "Swing Mode Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "swing_mode_body": {
              "title": "Swing Mode Body",
              "type": "string",
              "placeholder": "{ \"swing_mode\": %swingMode }",
              "required": false
            },
            "swing_mode_headers": {
              "title": "Swing Mode Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "rotation_direction_url": {
              "title": "Rotation Direction URL",
              "type": "string",
              "placeholder": "your url to change the fanv2s rotation direction",
              "required": false
            },
            "rotation_direction_method": {
              "title": "Rotation Direction Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "rotation_direction_body": {
              "title": "Rotation Direction Body",
              "type": "string",
              "placeholder": "{ \"rotation_direction\": %rotationDirection }",
              "required": false
            },
            "rotation_direction_headers": {
              "title": "Rotation Direction Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      },
      "valves": {
        "type": "array",
        "title": "Valves",
        "description": "Turn on and off valves by triggering a URL from any system.",
        "items": {
          "title": "Valves",
          "type": "object",
          "properties": {
            "id": {
              "title": "ID",
              "type": "string",
              "placeholder": "valve1",
              "required": false
            },
            "name": {
              "title": "Name",
              "type": "string",
              "placeholder": "Valve 1",
              "required": false
            },
            "type": {
              "title": "Type",
              "type": "string",
              "enum": ["generic valve","irrigation", "shower head", "water faucet"]
            },
            "rejectUnauthorized": {
              "title": "Reject Unauthorized SSL Certificate",
              "type": "boolean",
              "placeholder": true,
              "required": false
            },
            "on_url": {
              "title": "On URL",
              "type": "string",
              "placeholder": "your url to switch the valve on",
              "required": false
            },
            "on_method": {
              "title": "On Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "on_body": {
              "title": "On Body",
              "type": "string",
              "placeholder": "{ \"on\" : true }",
              "required": false
            },
            "on_headers": {
              "title": "On Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            },
            "off_url": {
              "title": "Off URL",
              "type": "string",
              "placeholder": "your url to switch the valve off",
              "required": false
            },
            "off_method": {
              "title": "Off Method",
              "type": "string",
              "placeholder": "GET",
              "required": false
            },
            "off_body": {
              "title": "Off Body",
              "type": "string",
              "placeholder": "{ \"on\": false }",
              "required": false
            },
            "off_headers": {
              "title": "Off Headers",
              "type": "string",
              "placeholder": "{\"Authorization\": \"Bearer ABCDEFGH\", \"Content-Type\": \"application/json\"}",
              "required": false
            }
          }
        }
      }
    }
  },
  "layout": [
    {
      "type": "fieldset",
      "title": "Webhook Settings",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "title": "Webhook Settings",
          "type": "array",
          "orderable": false,
          "items": [
            "webhook_port",
            "webhook_listen_host",
            "cache_directory",
            "http_auth_user",
            "http_auth_pass",
            "https",
            "https_keyfile",
            "https_certfile"
          ]
        }
      ]
    },
    {
      "type": "fieldset",
      "title": "Webhook Devices",
      "expandable": true,
      "expanded": false,
      "items": [
        {
          "type": "section",
          "title": "Sensors",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Sensors",
              "type": "array",
              "orderable": false,
              "items": [
                "sensors[].id",
                "sensors[].name",
                "sensors[].type",
                "sensors[].autoRelease",
                "sensors[].autoReleaseTime",
                "sensors[].resetAutoReleaseOnDetection"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Switches",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Switches",
              "type": "array",
              "orderable": false,
              "items": [
                "switches[].id",
                "switches[].name",
                "switches[].rejectUnauthorized",
                "switches[].on_url",
                "switches[].on_method",
                "switches[].on_body",
                "switches[].on_headers",
                "switches[].off_url",
                "switches[].off_method",
                "switches[].off_body",
                "switches[].off_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Push Button",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Push Button",
              "type": "array",
              "orderable": false,
              "items": [
                "pushbuttons[].id",
                "pushbuttons[].name",
                "pushbuttons[].rejectUnauthorized",
                "pushbuttons[].push_url",
                "pushbuttons[].push_method",
                "pushbuttons[].push_body",
                "pushbuttons[].push_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Lights",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Lights",
              "type": "array",
              "orderable": false,
              "items": [
                "lights[].id",
                "lights[].name",
                "lights[].rejectUnauthorized",
                "lights[].on_url",
                "lights[].on_method",
                "lights[].on_body",
                "lights[].on_headers",
                "lights[].off_url",
                "lights[].off_method",
                "lights[].off_body",
                "lights[].off_headers",
                "lights[].brightness_url",
                "lights[].brightness_method",
                "lights[].brightness_body",
                "lights[].brightness_headers",
                "lights[].brightness_factor"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Thermostats",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Thermostats",
              "type": "array",
              "orderable": false,
              "items": [
                "thermostats[].id",
                "thermostats[].name",
                "thermostats[].rejectUnauthorized",
                "thermostats[].set_target_temperature_url",
                "thermostats[].set_target_temperature_method",
                "thermostats[].set_target_temperature_body",
                "thermostats[].set_target_temperature_headers",
                "thermostats[].set_target_heating_cooling_state_url",
                "thermostats[].set_target_heating_cooling_state_method",
                "thermostats[].set_target_heating_cooling_state_body",
                "thermostats[].set_target_heating_cooling_state_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Outlets",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Outlets",
              "type": "array",
              "orderable": false,
              "items": [
                "outlets[].id",
                "outlets[].name",
                "outlets[].rejectUnauthorized",
                "outlets[].on_url",
                "outlets[].on_method",
                "outlets[].on_body",
                "outlets[].on_headers",
                "outlets[].off_url",
                "outlets[].off_method",
                "outlets[].off_body",
                "outlets[].off_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Security",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Security",
              "type": "array",
              "orderable": false,
              "items": [
                "security[].id",
                "security[].name",
                "security[].rejectUnauthorized",
                "security[].set_state_url",
                "security[].set_state_method",
                "security[].set_state_body",
                "security[].set_state_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Garage Door Openers",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Garage Door Openers",
              "type": "array",
              "orderable": false,
              "items": [
                "garagedooropeners[].id",
                "garagedooropeners[].name",
                "garagedooropeners[].rejectUnauthorized",
                "garagedooropeners[].open_url",
                "garagedooropeners[].open_method",
                "garagedooropeners[].open_body",
                "garagedooropeners[].open_headers",
                "garagedooropeners[].close_url",
                "garagedooropeners[].close_method",
                "garagedooropeners[].close_body",
                "garagedooropeners[].close_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Stateless Switches",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Stateless Switches",
              "type": "array",
              "orderable": false,
              "items": [
                {
                  "type": "section",
                  "title": "Stateless Switches",
                  "expandable": true,
                  "expanded": true,
                  "items": [
                    "statelessswitches[].id",
                    "statelessswitches[].name",
                    {
                      "type": "section",
                      "title": "Buttons",
                      "expandable": true,
                      "expanded": true,
                      "items": [
                        {
                          "title": "Buttons",
                          "type": "array",
                          "orderable": false,
                          "items": [
                            "statelessswitches[].buttons[].name",
                            "statelessswitches[].buttons[].double_press",
                            "statelessswitches[].buttons[].long_press"
                          ]
                        }
                      ]
                    }
                  ]
                }
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Window Coverings",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Window Coverings",
              "type": "array",
              "orderable": false,
              "items": [
                "windowcoverings[].id",
                "windowcoverings[].name",
                "windowcoverings[].rejectUnauthorized",
                "windowcoverings[].open_url",
                "windowcoverings[].open_method",
                "windowcoverings[].open_body",
                "windowcoverings[].open_headers",
                "windowcoverings[].open_80_url",
                "windowcoverings[].open_80_method",
                "windowcoverings[].open_80_body",
                "windowcoverings[].open_80_headers",
                "windowcoverings[].open_60_url",
                "windowcoverings[].open_60_method",
                "windowcoverings[].open_60_body",
                "windowcoverings[].open_60_headers",
                "windowcoverings[].open_40_url",
                "windowcoverings[].open_40_method",
                "windowcoverings[].open_40_body",
                "windowcoverings[].open_40_headers",
                "windowcoverings[].open_20_url",
                "windowcoverings[].open_20_method",
                "windowcoverings[].open_20_body",
                "windowcoverings[].open_20_headers",
                "windowcoverings[].close_url",
                "windowcoverings[].close_method",
                "windowcoverings[].close_body",
                "windowcoverings[].close_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Lock Mechanisms",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Lock Mechanisms",
              "type": "array",
              "orderable": false,
              "items": [
                "lockmechanisms[].id",
                "lockmechanisms[].name",
                "lockmechanisms[].rejectUnauthorized",
                "lockmechanisms[].open_url",
                "lockmechanisms[].open_method",
                "lockmechanisms[].open_body",
                "lockmechanisms[].open_headers",
                "lockmechanisms[].close_url",
                "lockmechanisms[].close_method",
                "lockmechanisms[].close_body",
                "lockmechanisms[].close_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Fanv2",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Fanv2",
              "type": "array",
              "orderable": false,
              "items": [
                "fanv2s[].id",
                "fanv2s[].name",
                "fanv2s[].rejectUnauthorized",
                "fanv2s[].on_url",
                "fanv2s[].on_method",
                "fanv2s[].on_body",
                "fanv2s[].on_headers",
                "fanv2s[].off_url",
                "fanv2s[].off_method",
                "fanv2s[].off_body",
                "fanv2s[].off_headers",
                "fanv2s[].speed_url",
                "fanv2s[].speed_method",
                "fanv2s[].speed_body",
                "fanv2s[].speed_headers",
                "fanv2s[].speed_factor",
                "fanv2s[].enableLockPhysicalControls",
                "fanv2s[].lock_url",
                "fanv2s[].lock_method",
                "fanv2s[].lock_body",
                "fanv2s[].lock_headers",
                "fanv2s[].unlock_url",
                "fanv2s[].unlock_method",
                "fanv2s[].unlock_body",
                "fanv2s[].unlock_headers",
                "fanv2s[].enableTargetStateControls",
                "fanv2s[].target_state_url",
                "fanv2s[].target_state_method",
                "fanv2s[].target_state_body",
                "fanv2s[].target_state_headers",
                "fanv2s[].enableSwingModeControls",
                "fanv2s[].swing_mode_url",
                "fanv2s[].swing_mode_method",
                "fanv2s[].swing_mode_body",
                "fanv2s[].swing_mode_headers",
                "fanv2s[].rotation_direction_url",
                "fanv2s[].rotation_direction_method",
                "fanv2s[].rotation_direction_body",
                "fanv2s[].rotation_direction_headers"
              ]
            }
          ]
        },
        {
          "type": "section",
          "title": "Valves",
          "expandable": true,
          "expanded": false,
          "items": [
            {
              "title": "Valves",
              "type": "array",
              "orderable": false,
              "items": [
                "valves[].id",
                "valves[].name",
                "valves[].type",
                "valves[].rejectUnauthorized",
                "valves[].on_url",
                "valves[].on_method",
                "valves[].on_body",
                "valves[].on_headers",
                "valves[].off_url",
                "valves[].off_method",
                "valves[].off_body",
                "valves[].off_headers"
              ]
            }
          ]
        }
      ]
    }
  ]
}
