homebridge-tuya-laundry
Version:
Allows washer/dryer cycle completion notifications using Tuya smart plugs with power meter, now using local control.
259 lines • 9.66 kB
JSON
{
"pluginAlias": "TuyaLaundryNotify",
"pluginType": "platform",
"singular": true,
"schema": {
"type": "object",
"properties": {
"enableIpcServer": {
"title": "Enable CLI tool (IPC server)",
"type": "boolean",
"required": false,
"description": "When enabled (default), the CLI tool is available via a local socket for discover, track, and exportConfig. Disable this in plugin settings when you're done with setup to close the socket.",
"default": true
},
"tuyaApiCredentials": {
"title": "Tuya API Credentials",
"type": "object",
"required": true,
"properties": {
"accessId": {
"title": "Tuya Access ID",
"type": "string",
"required": true,
"description": "The Access ID for your Tuya OpenAPI project"
},
"accessKey": {
"title": "Tuya Access Key",
"type": "string",
"required": true,
"description": "The Access Key for your Tuya OpenAPI project"
},
"username": {
"title": "Tuya Username",
"type": "string",
"required": true,
"description": "Your Tuya account username (usually your email address)"
},
"password": {
"title": "Tuya Password",
"type": "string",
"required": true,
"description": "Your Tuya account password"
},
"countryCode": {
"title": "Country Code",
"type": "string",
"required": true,
"description": "Country code for your account (e.g., '49' for Germany)"
},
"appSchema": {
"title": "Tuya App Schema",
"type": "string",
"required": true,
"description": "The schema for your Tuya app (e.g., 'smartlife' or 'tuyaSmart')"
},
"endpoint": {
"title": "Tuya API Endpoint",
"type": "string",
"required": true,
"description": "The endpoint for your Tuya API (e.g., 'https://openapi.tuyaeu.com')"
}
}
},
"notifications": {
"title": "Notifications Configuration",
"type": "object",
"properties": {
"telegram": {
"type": "object",
"title": "Telegram Notifications",
"properties": {
"botToken": {
"title": "Telegram Bot Token",
"type": "string",
"required": false,
"description": "Telegram Bot Token for push notifications"
}
}
},
"pushed": {
"type": "object",
"title": "Pushed.co Notifications",
"properties": {
"appKey": {
"title": "App Key",
"type": "string",
"required": false
},
"appSecret": {
"title": "App Secret",
"type": "string",
"required": false
},
"channelAlias": {
"title": "Channel Alias",
"type": "string",
"required": false
}
}
},
"ntfy": {
"type": "object",
"title": "ntfy Notifications",
"properties": {
"title": {
"title": "ntfy Title",
"type": "string",
"required": true,
"description": "ntfy title for notifications"
},
"topic": {
"title": "ntfy Topic",
"type": "string",
"required": true,
"description": "ntfy topic for notifications"
},
"serverUrl": {
"title": "ntfy Server URL",
"type": "string",
"required": false,
"description": "Optional custom server URL for ntfy notifications (default: 'https://ntfy.sh')"
}
}
}
}
},
"laundryDevices": {
"title": "Laundry Devices",
"type": "array",
"items": {
"type": "object",
"properties": {
"name": {
"title": "Device Name",
"type": "string",
"required": true,
"description": "Device name for logging purposes"
},
"deviceId": {
"title": "Tuya Device ID",
"type": "string",
"required": true,
"description": "Local Tuya Device ID"
},
"localKey": {
"title": "Tuya Device Local Key",
"type": "string",
"required": true,
"description": "Local key for local device communication"
},
"ipAddress": {
"title": "Device IP Address",
"type": "string",
"required": true,
"description": "IP address of the Tuya device"
},
"protocolVersion": {
"title": "Tuya Protocol Version",
"type": "string",
"required": false,
"description": "Select the Tuya protocol version for your device",
"enum": ["3.1", "3.2", "3.3", "3.4"],
"default": "3.3"
},
"powerValueId": {
"title": "Power Value ID",
"type": "string",
"required": true,
"description": "DPS ID that represents power consumption"
},
"startValue": {
"title": "Start Value",
"type": "number",
"required": false,
"description": "Expected power value when the device starts the cycle"
},
"startDuration": {
"title": "Start Duration",
"type": "number",
"required": false,
"description": "Duration in seconds that the start value needs to hold until the device is considered active."
},
"endValue": {
"title": "End Value",
"type": "number",
"required": false,
"description": "Expected power value when the device finishes the cycle"
},
"endDuration": {
"title": "End Duration",
"type": "number",
"required": false,
"description": "Duration in seconds that the end value needs to hold until the device is considered inactive."
},
"startMessage": {
"title": "Start Message",
"type": "string",
"required": false,
"description": "Optional push message when the device starts the cycle",
"default": "Washing started..."
},
"endMessage": {
"title": "End Message",
"type": "string",
"required": false,
"description": "Push message when the device ends the cycle",
"default": "Washing finished!"
},
"exposeStateSwitch": {
"title": "Expose State Switch",
"type": "boolean",
"required": false,
"description": "Creates dummy switch that will indicate the current device status, useful for extra automation",
"default": false
},
"exportPowerLog": {
"title": "Export Power Log",
"type": "boolean",
"required": false,
"description": "Write detailed power measurements for each cycle to logs/<deviceId>-<timestamp>.json",
"default": false
},
"minRunDurationSec": {
"title": "Min Run Duration (sec)",
"type": "number",
"required": false,
"description": "Minimum run duration in seconds to count as a real cycle (e.g. for dryers: ignore short after-run bursts)."
},
"minRunKWh": {
"title": "Min Run Energy (kWh)",
"type": "number",
"required": false,
"description": "Minimum energy in kWh to count as a full cycle. Used with min run duration to ignore short after-run cycles (e.g. dryer cool-down)."
},
"minRunAvgPowerW": {
"title": "Min Run Avg Power (W)",
"type": "number",
"required": false,
"description": "Minimum average power in watts to count as a real cycle. Optional additional criterion."
},
"afterRunWindowMin": {
"title": "After-run window (min)",
"type": "number",
"required": false,
"description": "Minutes after a full cycle end during which a new start is only confirmed once min duration/kWh are reached (avoids false start on dryer after-run spikes)."
},
"dryRun": {
"title": "Dry Run (learn thresholds)",
"type": "boolean",
"required": false,
"description": "If enabled: no notifications are sent; each run is logged with duration, kWh, avg power; suggested minRunDurationSec/minRunKWh/minRunAvgPowerW are written to logs/dry-run-<deviceId>.json so you can copy them into your config.",
"default": false
}
}
}
}
}
}
}