{
    "pluginAlias": "dafangMqtt",
    "pluginType": "platform",
    "singular": true,
    "headerDisplay": "Exposes Dafang Hacks Features as HomeKit Accessories",
    "footerDisplay": "Raise [Issues](https://github.com/Sunoo/homebridge-dafang-mqtt-republish/issues) or submit [Pull Requests](https://github.com/Sunoo/homebridge-dafang-mqtt-republish/pulls) on [Project Page](https://github.com/Sunoo/homebridge-dafang-mqtt-republish).",
    "schema": {
        "type": "object",
        "properties": {
            "name": {
                "title": "Name",
                "type": "string",
                "required": true,
                "default": "Dafang MQTT",
                "description": "A unique name for the accessory."
            },
            "server": {
                "title": "MQTT Server",
                "type": "string",
                "placeholder": "127.0.0.1",
                "description": "The address of your MQTT server."
            },
            "port": {
                "title": "MQTT Port",
                "type": "integer",
                "placeholder": "1883",
                "description": "The port of your MQTT server."
            },
            "tls": {
                "title": "MQTT TLS",
                "type": "boolean",
                "description": "Use TLS to connect to the MQTT server."
            },
            "cameras": {
                "title": "Cameras",
                "type": "array",
                "required": true,
                "minLength": 1,
                "items": {
                    "title": "Camera",
                    "type": "object",
                    "properties": {
                        "name": {
                            "title": "Camera Name",
                            "type": "string",
                			"required": true,
                			"description": "Name of your camera. (Needs to be the same as in homebridge-camera-ffmpeg config)"
                        },
                        "dafang_topic": {
                            "title": "Dafang MQTT Topic",
                            "type": "string",
                			"required": true,
                            "placeholder": "myhome/dafang",
                			"description": "MQTT topic that your camera publishes to. (Must be unique per camera)"
                        },
                        "manufacturer": {
                            "title": "Manufacturer",
                            "type": "string",
                			"description": "Manufacturer for exposed accessories."
                        },
                        "model": {
                            "title": "Model",
                            "type": "string",
                			"description": "Model for exposed accessories."
                        },
                        "serialNumber": {
                            "title": "Serial Number",
                            "type": "string",
                			"description": "Serial number for exposed accessories."
                        },
                        "firmwareRevision": {
                            "title": "Firmware Revision",
                            "type": "string",
                			"description": "Firmware revision for exposed accessories."
                        },
                        "accessories": {
                            "title": "Accessories",
                            "type": "object",
                            "properties": {
                                "blueLed": {
                                    "title": "Blue LED",
                                    "type": "boolean"
                                },
                                "yellowLed": {
                                    "title": "Yellow LED",
                                    "type": "boolean"
                                },
                                "irLed": {
                                    "title": "IR LED",
                                    "type": "boolean"
                                },
                                "irCut": {
                                    "title": "IR Filter",
                                    "type": "boolean"
                                },
                                "nightMode": {
                                    "title": "Night Mode",
                                    "type": "boolean"
                                },
                                "motionTracking": {
                                    "title": "Motion Tracking",
                                    "type": "boolean"
                                },
                                "motorsVertical": {
                                    "title": "Tilt",
                                    "type": "boolean"
                                },
                                "motorsHorizontal": {
                                    "title": "Pan",
                                    "type": "boolean"
                                },
                                "motorsCalibrate": {
                                    "title": "Calibrate",
                                    "type": "boolean"
                                },
                                "recording": {
                                    "title": "Recording",
                                    "type": "boolean"
                                },
                                "snapshot": {
                                    "title": "Snapshot",
                                    "type": "boolean"
                                },
                                "brightness": {
                                    "title": "Brightness",
                                    "type": "string",
                                    "oneOf": [
                                        { "title": "Hardware", "enum": ["hw"] },
                                        { "title": "Virtual", "enum": ["virtual"] }
                                    ]
                                },
                                "rtsp_mjpeg_server": {
                                    "title": "RTSP MJPEG Server",
                                    "type": "boolean"
                                },
                                "rtsp_h264_server": {
                                    "title": "RTSP H264 Server",
                                    "type": "boolean"
                                },
                                "remount_sdcard": {
                                    "title": "Remount SD Card",
                                    "type": "boolean"
                                },
                                "reboot": {
                                    "title": "Reboot",
                                    "type": "boolean"
                                }
                            }
                        }
                    }
                }
            }
        }
    }
}
