homebridge-mi-hygrothermograph
Version:
Homebridge plugin for Xiaomi Mi Bluetooth Temperature and Humidity Sensor
308 lines (307 loc) • 9.54 kB
JSON
{
"pluginAlias": "Hygrotermograph",
"pluginType": "accessory",
"singular": false,
"headerDisplay": null,
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Accessory Name",
"type": "string",
"format": "string",
"default": "Temperature & Humidity",
"minLength": 1,
"required": true
},
"type": {
"type": "string",
"title": "Type",
"description": "Select the accessory type.",
"placeholder": "Hygrotermograph",
"default": "Hygrotermograph",
"oneOf": [
{
"title": "Hygrotermograph",
"enum": ["Hygrotermograph"]
},
{
"title": "Mi Flora",
"enum": ["MiFlora"]
}
]
},
"address": {
"title": "Device MAC Address",
"type": "string",
"format": "string",
"placeholder": "e.g. 00:00:00:00:00:00",
"description": "Optional. Specify when running multiple devices"
},
"temperatureName": {
"title": "Temperature",
"type": "string",
"format": "string",
"default": "Temperature",
"condition": {
"functionBody": "return ['Hygrotermograph','MiFlora'].includes(model.type);"
}
},
"humidityName": {
"title": "Humidity",
"type": "string",
"format": "string",
"default": "Humidity",
"condition": {
"functionBody": "return ['Hygrotermograph'].includes(model.type);"
}
},
"moistureName": {
"title": "Moisture",
"type": "string",
"format": "string",
"default": "Moisture",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"fertilityName": {
"title": "Fertility",
"type": "string",
"format": "string",
"default": "Fertility",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"illuminanceName": {
"title": "Illuminance",
"type": "string",
"format": "string",
"default": "Illuminance",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"fakeGatoEnabled": {
"title": "Enable FakeGato",
"type": "boolean",
"default": false,
"description": "Enable to send historical data to the Elgato Eve app."
},
"fakeGatoStoragePath": {
"title": "FakeGato Storage Path",
"type": "string",
"description": "Optional. Specify a custom path to save FakeGato history."
},
"timeout": {
"title": "Timeout (minutes)",
"type": "integer",
"default": 15,
"description": "Time in minutes after last contact when the accessory should be regarded as unreachable. If set to 0, timeout will be disabled."
},
"forceDiscovering": {
"title": "Enable Force Discovering",
"type": "boolean",
"default": true,
"description": "Retry start scanning for devices when stopped. For some users scanning will be stopped when connecting to other BLE devices. Setting forceDiscovering to true will start scanning again in these cases."
},
"forceDiscoveringDelay": {
"title": "Force Discovering Interval (seconds)",
"type": "integer",
"default": 2500,
"description": "The delay for when to start scanning again when stopped. Only applicable if forceDiscovering is true."
},
"updateInterval": {
"title": "Update Interval (seconds)",
"type": "integer",
"description": "By default values will be updated as they come in. Often this is once per second, if this is not desired updateInterval can be set to how often updates should be made. Accepts values in seconds."
},
"disableBatteryLevel": {
"title": "Disable Battery Level",
"type": "boolean",
"default": false,
"description": "If battery level should not be exposed to Homekit. New E-Ink sensors do currently not support sending battery levels and setting this to true will make Elgato Eve not warn about it."
},
"lowBattery": {
"title": "Low Battery Threshold",
"type": "integer",
"default": 10,
"description": "At what battery percentage Homekit should start warning about low battery."
},
"temperatureOffset": {
"title": "Offset - Temperature",
"type": "integer",
"default": 0,
"description": "An offset to apply to temperature values for calibration if measured values are incorrect.",
"condition": {
"functionBody": "return ['Hygrotermograph','MiFlora'].includes(model.type);"
}
},
"humidityOffset": {
"title": "Offset - Humidity",
"type": "integer",
"default": 0,
"description": "An offset to apply to humidity values for calibration if measured values are incorrect.",
"condition": {
"functionBody": "return ['Hygrotermograph'].includes(model.type);"
}
},
"moistureOffset": {
"title": "Offset - Moisture",
"type": "integer",
"default": 0,
"description": "An offset to apply to moisture values for calibration if measured values are incorrect.",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"fertilityOffset": {
"title": "Offset - Fertility",
"type": "integer",
"default": 0,
"description": "An offset to apply to fertility values for calibration if measured values are incorrect.",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"illuminanceOffset": {
"title": "Offset - Illuminance",
"type": "integer",
"default": 0,
"description": "An offset to apply to illuminance values for calibration if measured values are incorrect.",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"bindKey": {
"title": "Bind Key",
"type": "string",
"default": "",
"description": "Optional. Specify when using sensors with encryption"
},
"mqtt": {
"type": "object",
"title": "MQTT",
"properties": {
"url": {
"type": "string",
"title": "Broker URL",
"placeholder": "mqtt://localhost:1883"
},
"temperatureTopic": {
"type": "string",
"title": "Temperature Topic",
"condition": {
"functionBody": "return ['Hygrotermograph','MiFlora'].includes(model.type);"
}
},
"humidityTopic": {
"type": "string",
"title": "Humidity Topic",
"condition": {
"functionBody": "return ['Hygrotermograph'].includes(model.type);"
}
},
"moistureTopic": {
"type": "string",
"title": "Moisture Topic",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"fertilityTopic": {
"type": "string",
"title": "Fertility Topic",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"illuminanceTopic": {
"type": "string",
"title": "Illuminance Topic",
"condition": {
"functionBody": "return ['MiFlora'].includes(model.type);"
}
},
"batteryTopic": {
"type": "string",
"title": "Battery Topic"
}
}
}
}
},
"layout": [
{
"type": "flex",
"flex-flow": "row wrap",
"items": ["type"]
},
{
"type": "flex",
"flex-flow": "row wrap",
"items": ["name"]
},
{
"type": "flex",
"title": "<strong>Custom Name</strong>",
"flex-flow": "column wrap",
"items": [
"temperatureName",
"humidityName",
"moistureName",
"fertilityName",
"illuminanceName"
]
},
{
"type": "flex",
"flex-flow": "row wrap",
"items": ["address"]
},
{
"type": "flex",
"flex-flow": "row wrap",
"items": ["bindKey"]
},
{
"type": "fieldset",
"title": "FakeGato",
"expandable": true,
"items": ["fakeGatoEnabled", "fakeGatoStoragePath"]
},
{
"type": "fieldset",
"title": "MQTT",
"expandable": true,
"items": [
"mqtt.url",
"mqtt.temperatureTopic",
"mqtt.humidityTopic",
"mqtt.moistureTopic",
"mqtt.fertilityTopic",
"mqtt.illuminanceTopic",
"mqtt.batteryTopic"
]
},
{
"type": "fieldset",
"title": "Advanced configuration",
"expandable": true,
"items": [
"timeout",
"forceDiscovering",
"forceDiscoveringDelay",
"updateInterval",
"disableBatteryLevel",
"lowBattery",
"temperatureOffset",
"humidityOffset",
"moistureOffset",
"fertilityOffset",
"illuminanceOffset"
]
}
]
}