UNPKG

homebridge-meross

Version:

Homebridge plugin to integrate Meross devices into HomeKit.

1,169 lines 89.9 kB
{ "pluginAlias": "Meross", "pluginType": "platform", "singular": true, "customUi": true, "customUiPath": "./lib/homebridge-ui", "headerDisplay": "<p align=\"center\"><img width=\"60%\" src=\"https://user-images.githubusercontent.com/43026681/127397024-8b15fc07-f31b-44bd-89e3-51d738d2609a.png\"></p><p align=\"center\">For help and support please visit our <a href=\"https://github.com/homebridge-plugins/homebridge-meross/wiki\">GitHub Wiki</a>. We hope you find this plugin useful!</p>", "schema": { "name": { "type": "string", "title": "Plugin Name", "default": "Meross" }, "username": { "title": "Meross Username", "type": "string", "description": "Enter your Meross username to enable cloud devices." }, "password": { "title": "Meross Password", "type": "string", "description": "Enter your Meross password to enable cloud devices." }, "mfaCode": { "title": "Meross MFA Code", "type": "string", "description": "Enter the 6 digit code from your MFA app.", "maxLength": 6, "condition": { "functionBody": "return model.username && model.password;" } }, "showUserKey": { "title": "Show Meross User Key", "type": "boolean", "condition": { "functionBody": "return model.username && model.password;" } }, "userkey": { "title": "Meross Key", "type": "string", "description": "Enter your Meross key to enable local devices. You don't need to enter this if you have entered your username and password above, even for local devices. For help with obtaining this value see <a href=\"https://github.com/homebridge-plugins/homebridge-meross/wiki/Local-Control\" target=\"_blank\">the wiki</a>.", "minLength": 32, "maxLength": 32, "condition": { "functionBody": "return !(model.username || model.password);" } }, "connection": { "type": "string", "title": "Connection Type", "description": "Global setting for device connection type. This can also be set per accessory later in the config.", "oneOf": [ { "title": "Hybrid (Recommended)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IPs)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.username && model.password);" } }, "ignoreHKNative": { "type": "boolean", "title": "Ignore HomeKit Native Devices", "condition": { "functionBody": "return (model.username && model.password);" } }, "ignoreMatter": { "type": "boolean", "title": "Ignore Matter Devices", "condition": { "functionBody": "return (model.username && model.password);" } }, "disableDeviceLogging": { "type": "boolean", "title": "Disable Device Logging", "description": "Global logging setting for accessory status changes. If true then accessory status changes will not be logged. This can also be set per accessory later in the config." }, "domain": { "type": "string", "title": "Domain", "placeholder": "iotx.meross.com", "description": "Used to connect to Meross API, varies by region, example: `iotx-eu.meross.com` is a possible domain in Europe - inspect API calls to figure this if needed." }, "cloudRefreshRate": { "title": "Cloud Refresh Rate", "type": "integer", "description": "Number of seconds between polls to cloud devices. Maximum value 600. If set to 0, 600 will be used.", "placeholder": 0, "maximum": 600, "minimum": 0, "condition": { "functionBody": "return (model.username && model.password);" } }, "refreshRate": { "title": "Local Refresh Rate", "type": "integer", "description": "Number of seconds between polls to local devices. Maximum value 600. If set to 0, 600 will be used.", "maximum": 600, "placeholder": 5, "minimum": 0 }, "singleDevices": { "type": "array", "title": "Single-Channel Devices", "description": "Optional settings for single-channel Meross switches/outlets.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.singleDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.singleDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && model.singleDevices[arrayIndices].connection !== 'local' && !model.singleDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MSS105", "enum": ["MSS105"] }, { "title": "MSS110", "enum": ["MSS110"] }, { "title": "MSS115", "enum": ["MSS115"] }, { "title": "MSS110NR", "enum": ["MSS110NR"] }, { "title": "MSS110R", "enum": ["MSS110R"] }, { "title": "MSS110RTL", "enum": ["MSS110RTL"] }, { "title": "MSS1101", "enum": ["MSS1101"] }, { "title": "MSS1102", "enum": ["MSS1102"] }, { "title": "MSS210", "enum": ["MSS210"] }, { "title": "MSS210N", "enum": ["MSS210N"] }, { "title": "MSS210P", "enum": ["MSS210P"] }, { "title": "MSS210R", "enum": ["MSS210R"] }, { "title": "MSS210RTL", "enum": ["MSS210RTL"] }, { "title": "MSS305", "enum": ["MSS305"] }, { "title": "MSS310", "enum": ["MSS310"] }, { "title": "MSS310H", "enum": ["MSS310H"] }, { "title": "MSS310R", "enum": ["MSS310R"] }, { "title": "MSS310X", "enum": ["MSS310X"] }, { "title": "MSS315", "enum": ["MSS315"] }, { "title": "MSS510", "enum": ["MSS510"] }, { "title": "MSS510H", "enum": ["MSS510H"] }, { "title": "MSS510K", "enum": ["MSS510K"] }, { "title": "MSS510M", "enum": ["MSS510M"] }, { "title": "MSS510S", "enum": ["MSS510S"] }, { "title": "MSS510X", "enum": ["MSS510X"] }, { "title": "MSS510XR", "enum": ["MSS510XR"] }, { "title": "MSS550", "enum": ["MSS550"] }, { "title": "MSS550K", "enum": ["MSS550K"] }, { "title": "MSS550L", "enum": ["MSS550L"] }, { "title": "MSS550X", "enum": ["MSS550X"] }, { "title": "MSS5X0", "enum": ["MSS5X0"] }, { "title": "MSS710", "enum": ["MSS710"] }, { "title": "MSS710R", "enum": ["MSS710R"] }, { "title": "MSS810", "enum": ["MSS810"] } ], "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "showAs": { "type": "string", "title": "Show As", "oneOf": [ { "title": "Switch (Default)", "enum": ["default"] }, { "title": "Outlet", "enum": ["outlet"] }, { "title": "Air Purifier", "enum": ["purifier"] }, { "title": "1 Heater", "enum": ["heater"] }, { "title": "1 Cooler", "enum": ["cooler"] } ], "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice);" } }, "inUsePowerThreshold": { "type": "integer", "title": "'In Use' Threshold", "description": "HomeKit will set the 'In Use' status of outlet devices to true when the wattage is above this number. Only applies to models that support power readings. Must be 0 or more.", "placeholder": 0, "minimum": 0, "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice);" } }, "temperatureSource": { "type": "string", "title": "Temperature Sensor ID", "description": "Enter a Meross, eWeLink or Govee device ID which provides a current temperature reading.", "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && ['heater', 'cooler'].includes(model.singleDevices[arrayIndices].showAs) && !model.singleDevices[arrayIndices].ignoreDevice);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice && model.singleDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.singleDevices && model.singleDevices[arrayIndices] && model.singleDevices[arrayIndices].serialNumber && model.singleDevices[arrayIndices].serialNumber.length === 32 && !model.singleDevices[arrayIndices].ignoreDevice && model.singleDevices[arrayIndices].deviceUrl);" } } } } }, "multiDevices": { "type": "array", "title": "Multi-Channel Devices", "description": "Optional settings for multi-channel Meross switches and outlets.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && !model.multiDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.multiDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.multiDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && model.multiDevices[arrayIndices].connection !== 'local' && !model.multiDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MSP843P", "enum": ["MSP843P"] }, { "title": "MSP844", "enum": ["MSP844"] }, { "title": "MSS120", "enum": ["MSS120"] }, { "title": "MSS120B", "enum": ["MSS120B"] }, { "title": "MSS120BR", "enum": ["MSS120BR"] }, { "title": "MSS420", "enum": ["MSS420"] }, { "title": "MSS420F", "enum": ["MSS420F"] }, { "title": "MSS425", "enum": ["MSS425"] }, { "title": "MSS425E/SP425EW", "enum": ["MSS425E"] }, { "title": "MSS425ER", "enum": ["MSS425ER"] }, { "title": "MSS425EX", "enum": ["MSS425EX"] }, { "title": "MSS425F/SP425FW", "enum": ["MSS425F"] }, { "title": "MSS425FC", "enum": ["MSS425FC"] }, { "title": "MSS426", "enum": ["MSS426"] }, { "title": "MSS426F", "enum": ["MSS426F"] }, { "title": "MSS426S", "enum": ["MSS426S"] }, { "title": "MSS530", "enum": ["MSS530"] }, { "title": "MSS530H", "enum": ["MSS530H"] }, { "title": "MSS620", "enum": ["MSS620"] }, { "title": "MSS620B", "enum": ["MSS620B"] }, { "title": "MSS620BR", "enum": ["MSS620BR"] }, { "title": "MSS620R", "enum": ["MSS620R"] }, { "title": "MSS620S", "enum": ["MSS620S"] }, { "title": "MSS630", "enum": ["MSS630"] } ], "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && !model.multiDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "showAs": { "type": "string", "title": "Show As", "oneOf": [ { "title": "Switches (Default)", "enum": ["default"] }, { "title": "Outlets", "enum": ["outlet"] }, { "title": "Power Strip", "enum": ["power-strip"] } ], "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && !model.multiDevices[arrayIndices].ignoreDevice);" } }, "hideChannels": { "type": "string", "title": "Hide Channels", "description": "A comma separated list of channels to hide for this device. Use '0' to hide the 'All On/Off' accessory. For example '0' or '0,1,2'.", "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && (!model.multiDevices[arrayIndices].showAs || model.multiDevices[arrayIndices].showAs !== 'power-strip') && !model.multiDevices[arrayIndices].ignoreDevice);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && !model.multiDevices[arrayIndices].ignoreDevice && model.multiDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.multiDevices && model.multiDevices[arrayIndices] && model.multiDevices[arrayIndices].serialNumber && model.multiDevices[arrayIndices].serialNumber.length === 32 && !model.multiDevices[arrayIndices].ignoreDevice && model.multiDevices[arrayIndices].deviceUrl);" } } } } }, "lightDevices": { "type": "array", "title": "Light Devices", "description": "Optional settings for Meross light dimmers/bulbs/strips.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.lightDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.lightDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && model.lightDevices[arrayIndices].connection !== 'local' && !model.lightDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MDL110", "enum": ["MDL110"] }, { "title": "MDL110M", "enum": ["MDL110M"] }, { "title": "MPD100", "enum": ["MPD100"] }, { "title": "MSL100", "enum": ["MSL-100"] }, { "title": "MSL100D", "enum": ["MSL-100D"] }, { "title": "MSL100R", "enum": ["MSL100R"] }, { "title": "MSL120", "enum": ["MSL-120"] }, { "title": "MSL120B", "enum": ["MSL-120B"] }, { "title": "MSL120D", "enum": ["MSL-120D"] }, { "title": "MSL120DA", "enum": ["MSL120DA"] }, { "title": "MSL120DBR", "enum": ["MSL120DBR"] }, { "title": "MSL120DR", "enum": ["MSL120DR"] }, { "title": "MSL120J", "enum": ["MSL120J"] }, { "title": "MSL120M", "enum": ["MSL120M"] }, { "title": "MSL210", "enum": ["MSL210"] }, { "title": "MSL320", "enum": ["MSL-320"] }, { "title": "MSL320C", "enum": ["MSL320C"] }, { "title": "MSL320CP", "enum": ["MSL320CP"] }, { "title": "MSL320CPR", "enum": ["MSL320CPR"] }, { "title": "MSL320CR", "enum": ["MSL320CR"] }, { "title": "MSL320M", "enum": ["MSL-320M"] }, { "title": "MSL420", "enum": ["MSL-420"] }, { "title": "MSL430", "enum": ["MSL-430"] }, { "title": "MSL450", "enum": ["MSL450"] }, { "title": "MSL610", "enum": ["MSL610"] }, { "title": "MSS560", "enum": ["MSS560"] }, { "title": "MSS560M", "enum": ["MSS560M"] }, { "title": "MSS560X", "enum": ["MSS560X"] }, { "title": "MSS565", "enum": ["MSS565"] }, { "title": "MSS565X", "enum": ["MSS565X"] }, { "title": "MSS570", "enum": ["MSS570"] }, { "title": "MSS570M", "enum": ["MSS570M"] }, { "title": "MSS570X", "enum": ["MSS570x"] } ], "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "brightnessStep": { "title": "Brightness Step", "type": "integer", "description": "A minimum step for the brightness slider in the Home app. Must be 1 or more.", "placeholder": 1, "minimum": 1, "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice);" } }, "adaptiveLightingShift": { "title": "Adaptive Lighting Shift", "type": "integer", "description": "The mired for each Adaptive Lighting update will be increased by this value, making the light appear warmer. Set to -1 to remove Adaptive Lighting feature. Must be -1 or more.", "placeholder": 0, "minimum": -1, "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.lightDevices && model.lightDevices[arrayIndices] && model.lightDevices[arrayIndices].serialNumber && model.lightDevices[arrayIndices].serialNumber.length === 32 && !model.lightDevices[arrayIndices].ignoreDevice && model.lightDevices[arrayIndices].deviceUrl);" } } } } }, "fanDevices": { "type": "array", "title": "Fan Devices", "description": "Optional settings for Meross fan controllers.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && !model.fanDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.fanDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.fanDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && model.fanDevices[arrayIndices].connection !== 'local' && !model.fanDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MFC100", "enum": ["MFC100"] } ], "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && !model.fanDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && !model.fanDevices[arrayIndices].ignoreDevice && model.fanDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.fanDevices && model.fanDevices[arrayIndices] && model.fanDevices[arrayIndices].serialNumber && model.fanDevices[arrayIndices].serialNumber.length === 32 && !model.fanDevices[arrayIndices].ignoreDevice && model.fanDevices[arrayIndices].deviceUrl);" } } } } }, "diffuserDevices": { "type": "array", "title": "Diffuser Devices", "description": "Optional settings for Meross diffuser devices.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && !model.diffuserDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.diffuserDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.diffuserDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && model.diffuserDevices[arrayIndices].connection !== 'local' && !model.diffuserDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MOD100", "enum": ["MOD100"] } ], "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && !model.diffuserDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "brightnessStep": { "title": "Brightness Step", "type": "integer", "description": "A minimum step for the brightness slider in the Home app. Must be 1 or more.", "placeholder": 1, "minimum": 1, "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && !model.diffuserDevices[arrayIndices].ignoreDevice);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && !model.diffuserDevices[arrayIndices].ignoreDevice && model.diffuserDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.diffuserDevices && model.diffuserDevices[arrayIndices] && model.diffuserDevices[arrayIndices].serialNumber && model.diffuserDevices[arrayIndices].serialNumber.length === 32 && !model.diffuserDevices[arrayIndices].ignoreDevice && model.diffuserDevices[arrayIndices].deviceUrl);" } } } } }, "purifierDevices": { "type": "array", "title": "Purifier Devices", "description": "Optional settings for Meross purifier devices.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].name);" } }, "connection": { "type": "string", "title": "Connection Type", "oneOf": [ { "title": "Hybrid (Default)", "enum": ["default"] }, { "title": "Force Cloud Control", "enum": ["cloud"] }, { "title": "Force Local Control (with configured IP)", "enum": ["local"] } ], "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && !model.purifierDevices[arrayIndices].ignoreDevice && model.username && model.password);" } }, "deviceUrl": { "title": "Device IP", "description": "Enter the IP address of this device for local connection.", "type": "string", "format": "ipv4", "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && ((!model.username && !model.password && model.userkey) || (model.username && model.password && ((model.connection === 'local' && [undefined, 'local'].includes(model.purifierDevices[arrayIndices].connection)) || (model.connection !== 'local' && model.purifierDevices[arrayIndices].connection === 'local')))));" } }, "ignoreDevice": { "type": "boolean", "title": "Hide From HomeKit", "description": "If true, this accessory will be removed and ignored from HomeKit.", "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && model.purifierDevices[arrayIndices].connection !== 'local' && !model.purifierDevices[arrayIndices].deviceUrl);" } }, "model": { "title": "Model", "description": "The model of this device.", "type": "string", "oneOf": [ { "title": "MAP100", "enum": ["MAP100"] } ], "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && !model.purifierDevices[arrayIndices].ignoreDevice && !model.username && !model.password && model.userkey);" } }, "firmwareRevision": { "title": "Firmware Version", "type": "string", "description": "For local devices, HomeKit will show this as the firmware version.", "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && !model.purifierDevices[arrayIndices].ignoreDevice && model.purifierDevices[arrayIndices].deviceUrl);" } }, "userkey": { "title": "Device (User) Key", "type": "string", "description": "Override the user key for this device if it is registered to a different Meross account.", "condition": { "functionBody": "return (model.purifierDevices && model.purifierDevices[arrayIndices] && model.purifierDevices[arrayIndices].serialNumber && model.purifierDevices[arrayIndices].serialNumber.length === 32 && !model.purifierDevices[arrayIndices].ignoreDevice && model.purifierDevices[arrayIndices].deviceUrl);" } } } } }, "humidifierDevices": { "type": "array", "title": "Humidifier Devices", "description": "Optional settings for Meross humidifier devices.", "items": { "type": "object", "properties": { "name": { "title": "Name", "description": "A label for this device, will be used as the HomeKit name if setting up a local device.", "type": "string", "required": true }, "serialNumber": { "title": "Device UUID", "description": "Device UUIDs are 32 characters long, and can be found in the Homebridge log when the plugin starts.", "type": "string", "minLength": 32, "maxLength": 32, "required": true, "condition": { "functionBody": "return (model.humidifierDevices && model.humidifierDevices[arrayIndices] && model.humidifierDevices[arrayIndices].name);" } }, "connection": { "