Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add config.schema.json for UI-based setup #109

Merged
merged 1 commit into from
Apr 19, 2020
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
108 changes: 108 additions & 0 deletions config.schema.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,108 @@
{
"pluginAlias": "TplinkSmarthome",
"pluginType": "platform",
"singular": true,
"headerDisplay": "TPLink Smart Home Plugin for Homebridge.",
"footerDisplay": "",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Name",
"type": "string",
"default": "TplinkSmarthome",
"minLength": 1,
"required": true
},
"addCustomCharacteristics": {
"type": "boolean",
"title": "Add Custom Characteristics (For energy monitoring in Eve app)"
},
"pollingInterval": {
"type": "integer",
"description": "How often to check device status in the background (seconds)",
"placeholder": "10"
},
"inUseThreshold": {
"type": "integer",
"description": "For plugs that support energy monitoring (HS110), min power draw for OutletInUse (Watts)",
"placeholder": "10"
},
"switchModels": {
"title": "Switch Models",
"type": "array",
"items": {
"title": "Model",
"type": "string"
}
},
"timeout": {
"type": "integer",
"title": "Timeout",
"description": "Communication Timeout (seconds)",
"placeholder": "15"
},
"broadcast": {
"title": "Broadcast Address",
"type": "string",
"description": "If discovery is not working tweak to match your subnet, eg: 192.168.0.255.",
"placeholder": "255.255.255.255"
},
"devices": {
"title": "Manual List Of Devices",
"type": "array",
"items": {
"title": "Device",
"type": "object",
"properties": {
"host": {
"title": "Host",
"type": "string",
"required": true
},
"port": {
"title": "Port",
"type": "string"
}
}
}
},
"macAddresses": {
"title": "Whitelisted Devices",
"type": "array",
"items": {
"title": "Mac Address",
"type": "string"
}
},
"excludeMacAddresses": {
"title": "Blacklisted Devices",
"type": "array",
"items": {
"title": "Mac Address",
"type": "string"
}
}
}
},
"layout": [
"name",
{
"type": "fieldset",
"title": "Advanced Settings",
"expandable": true,
"expanded": false,
"items": [
"addCustomCharacteristics",
"broadcast",
"pollingInterval",
"inUseThreshold",
"timeout",
{
"type": "help",
"helpvalue": "<hr><em>Additional settings to whitelist/blacklist devices and to filter devices types etc. are available. Please see <a href='https://github.com/plasticrake/homebridge-tplink-smarthome' target='_blank'>the plugin README</a> for further information.</em>"
}
]
}
]
}