homebridge-homewizard-energy-socket
Version:
This Homebridge plugin exposes your HomeWizard Energy Sockets to Apple HomeKit. So you can use the Home App to switch your Energy Sockets on or off and integrate the Energy Sockets into your Home Automations.
170 lines (166 loc) • 6.47 kB
JSON
{
"pluginAlias": "HomebridgeHomeWizardEnergySocket",
"pluginType": "platform",
"singular": true,
"headerDisplay": "Please [read the README](https://github.com/jvandenaardweg/homebridge-homewizard-energy-socket#readme) of the plugin for more information and instructions on how to configure it.",
"schema": {
"type": "object",
"properties": {
"name": {
"title": "Bridge name",
"type": "string",
"required": true,
"placeholder": "HomeWizard Energy Socket",
"description": "You'll see this name when you add the bridge in your Home app and also in the logs within Homebridge.",
"default": "HomeWizard Energy Socket"
},
"energySockets": {
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"type": "string",
"title": "Name",
"placeholder": "What is plugged in?",
"required": true
},
"ip": {
"type": "string",
"title": "IP Address",
"placeholder": "192.168.0.10",
"format": "ipv4",
"required": true
},
"outletInUse": {
"type": "object",
"properties": {
"isActive": {
"title": "Use Outlet in Use?",
"type": "boolean",
"required": false,
"default": false,
"description": "When enabled, the \"Outlet In Use\" characteristic will be shown as \"Yes\" if the device plugged in the Energy Socket is consuming a certain amount of power. You can trigger automations based on this characteristic. <a href='https://github.com/jvandenaardweg/homebridge-homewizard-energy-socket/wiki/About-the-Outlet-In-Use-characteristic' target='_blank'>Learn more about it in the Wiki</a>."
},
"threshold": {
"title": "Threshold (watts)",
"placeholder": "Power usage in watts",
"type": "number",
"required": true,
"default": 5,
"minimum": 0.1,
"maximum": 3680,
"description": "When the power consumption is higher than this threshold, the \"Outlet In Use\" characteristic will be shown as \"Yes\" in the Home app. Otherwise it shows \"No\". Defaults to 5 watt.",
"condition": {
"functionBody": "return model.energySockets[arrayIndices].outletInUse.isActive === true;"
}
},
"thresholdDuration": {
"title": "Duration (seconds)",
"placeholder": "Duration in seconds",
"type": "number",
"required": true,
"default": 10,
"minimum": 0,
"maximum": 86400,
"description": "Defaults to 10 seconds.",
"condition": {
"functionBody": "return model.energySockets[arrayIndices].outletInUse.isActive === true;"
}
},
"verboseLogging": {
"title": "Verbose logging",
"type": "boolean",
"required": false,
"description": "Enable to see more verbose logging for the power consumption of this Energy Socket. Useful for determining the right threshold. Default: false",
"default": false
}
}
}
}
}
}
}
},
"layout": [
{
"type": "flex",
"flex-flow": "row wrap",
"orderable": false,
"items": [
{
"key": "name",
"type": "name"
}
]
},
{
"type": "fieldset",
"title": "Energy Sockets",
"description": "<strong>This config option is optional.</strong> Only use this if you want to bypass automatic discovery or use only the Energy Sockets you define here. When no Energy Sockets are defined here, the plugin will automatically discover and use all Energy Sockets on your network.",
"expandable": true,
"orderable": false,
"items": [
{
"title": "Energy Socket",
"key": "energySockets",
"type": "array",
"notitle": true,
"orderable": false,
"items": [
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
{
"type": "flex",
"flex-flow": "row wrap",
"items": [
{
"key": "energySockets[].name"
},
{
"key": "energySockets[].ip"
}
]
},
{
"type": "div",
"items": [
{
"key": "energySockets[].outletInUse.isActive"
}
]
},
{
"type": "flex",
"flex-flow": "row wrap",
"condition": {
"functionBody": "return model.energySockets[arrayIndices].outletInUse.isActive === true;"
},
"items": [
{
"key": "energySockets[].outletInUse.threshold",
"description": ""
},
{
"key": "energySockets[].outletInUse.thresholdDuration",
"description": ""
},
{
"type": "help",
"helpvalue": "<p class='help-block'>When the power consumption <strong>rises above</strong> the <strong>threshold</strong> for the <strong>duration</strong>, the \"Outlet In Use\" characteristic will be set to \"Yes\" in the Home app. If it falls below the <strong>threshold</strong> for the <strong>duration</strong> it will be set to \"No\".</p>"
},
{
"key": "energySockets[].outletInUse.verboseLogging"
}
]
}
]
}
]
}
]
}
]
}