@homebridge-plugins/homebridge-tuya 2.0.2-beta.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.idea/copilot.data.migration.agent.xml +6 -0
- package/.idea/copilot.data.migration.ask.xml +6 -0
- package/.idea/copilot.data.migration.ask2agent.xml +6 -0
- package/.idea/copilot.data.migration.edit.xml +6 -0
- package/.idea/dictionaries/benpotter.xml +3 -0
- package/.idea/homebridge-tuya.iml +8 -0
- package/.idea/inspectionProfiles/Project_Default.xml +6 -0
- package/.idea/modules.xml +8 -0
- package/.idea/vcs.xml +6 -0
- package/.idea/workspace.xml +64 -0
- package/ADVANCED_OPTIONS.md +267 -0
- package/CHANGELOG.md +127 -0
- package/LICENSE +20 -0
- package/README.md +206 -0
- package/SUPPORTED_DEVICES.md +206 -0
- package/config.schema.json +550 -0
- package/dist/accessory/AccessoryFactory.js +274 -0
- package/dist/accessory/AccessoryFactory.js.map +1 -0
- package/dist/accessory/AirConditionerAccessory.js +307 -0
- package/dist/accessory/AirConditionerAccessory.js.map +1 -0
- package/dist/accessory/AirPurifierAccessory.js +90 -0
- package/dist/accessory/AirPurifierAccessory.js.map +1 -0
- package/dist/accessory/AirQualitySensorAccessory.js +30 -0
- package/dist/accessory/AirQualitySensorAccessory.js.map +1 -0
- package/dist/accessory/BaseAccessory.js +295 -0
- package/dist/accessory/BaseAccessory.js.map +1 -0
- package/dist/accessory/CameraAccessory.js +117 -0
- package/dist/accessory/CameraAccessory.js.map +1 -0
- package/dist/accessory/CarbonDioxideSensorAccessory.js +52 -0
- package/dist/accessory/CarbonDioxideSensorAccessory.js.map +1 -0
- package/dist/accessory/CarbonMonoxideSensorAccessory.js +52 -0
- package/dist/accessory/CarbonMonoxideSensorAccessory.js.map +1 -0
- package/dist/accessory/ContactSensorAccessory.js +30 -0
- package/dist/accessory/ContactSensorAccessory.js.map +1 -0
- package/dist/accessory/DehumidifierAccessory.js +68 -0
- package/dist/accessory/DehumidifierAccessory.js.map +1 -0
- package/dist/accessory/DiffuserAccessory.js +55 -0
- package/dist/accessory/DiffuserAccessory.js.map +1 -0
- package/dist/accessory/DimmerAccessory.js +94 -0
- package/dist/accessory/DimmerAccessory.js.map +1 -0
- package/dist/accessory/DoorbellAccessory.js +89 -0
- package/dist/accessory/DoorbellAccessory.js.map +1 -0
- package/dist/accessory/ExtractionHoodAccessory.js +118 -0
- package/dist/accessory/ExtractionHoodAccessory.js.map +1 -0
- package/dist/accessory/FanAccessory.js +123 -0
- package/dist/accessory/FanAccessory.js.map +1 -0
- package/dist/accessory/GarageDoorAccessory.js +69 -0
- package/dist/accessory/GarageDoorAccessory.js.map +1 -0
- package/dist/accessory/HeaterAccessory.js +96 -0
- package/dist/accessory/HeaterAccessory.js.map +1 -0
- package/dist/accessory/HumanPresenceSensorAccessory.js +20 -0
- package/dist/accessory/HumanPresenceSensorAccessory.js.map +1 -0
- package/dist/accessory/HumidifierAccessory.js +135 -0
- package/dist/accessory/HumidifierAccessory.js.map +1 -0
- package/dist/accessory/IRAirConditionerAccessory.js +285 -0
- package/dist/accessory/IRAirConditionerAccessory.js.map +1 -0
- package/dist/accessory/IRControlHubAccessory.js +49 -0
- package/dist/accessory/IRControlHubAccessory.js.map +1 -0
- package/dist/accessory/IRControlHubSubAccessory.js +53 -0
- package/dist/accessory/IRControlHubSubAccessory.js.map +1 -0
- package/dist/accessory/IRGenericAccessory.js +50 -0
- package/dist/accessory/IRGenericAccessory.js.map +1 -0
- package/dist/accessory/LeakSensorAccessory.js +36 -0
- package/dist/accessory/LeakSensorAccessory.js.map +1 -0
- package/dist/accessory/LightAccessory.js +36 -0
- package/dist/accessory/LightAccessory.js.map +1 -0
- package/dist/accessory/LightSensorAccessory.js +32 -0
- package/dist/accessory/LightSensorAccessory.js.map +1 -0
- package/dist/accessory/LocationWeatherAccessory.js +72 -0
- package/dist/accessory/LocationWeatherAccessory.js.map +1 -0
- package/dist/accessory/LockAccessory.js +56 -0
- package/dist/accessory/LockAccessory.js.map +1 -0
- package/dist/accessory/MotionSensorAccessory.js +20 -0
- package/dist/accessory/MotionSensorAccessory.js.map +1 -0
- package/dist/accessory/OutletAccessory.js +23 -0
- package/dist/accessory/OutletAccessory.js.map +1 -0
- package/dist/accessory/PetFeederAccessory.js +139 -0
- package/dist/accessory/PetFeederAccessory.js.map +1 -0
- package/dist/accessory/SceneAccessory.js +32 -0
- package/dist/accessory/SceneAccessory.js.map +1 -0
- package/dist/accessory/SceneSwitchAccessory.js +44 -0
- package/dist/accessory/SceneSwitchAccessory.js.map +1 -0
- package/dist/accessory/SecuritySystemAccessory.js +30 -0
- package/dist/accessory/SecuritySystemAccessory.js.map +1 -0
- package/dist/accessory/SmokeSensorAccessory.js +35 -0
- package/dist/accessory/SmokeSensorAccessory.js.map +1 -0
- package/dist/accessory/SwitchAccessory.js +86 -0
- package/dist/accessory/SwitchAccessory.js.map +1 -0
- package/dist/accessory/TemperatureHumiditySensorAccessory.js +24 -0
- package/dist/accessory/TemperatureHumiditySensorAccessory.js.map +1 -0
- package/dist/accessory/ThermostatAccessory.js +190 -0
- package/dist/accessory/ThermostatAccessory.js.map +1 -0
- package/dist/accessory/ValveAccessory.js +45 -0
- package/dist/accessory/ValveAccessory.js.map +1 -0
- package/dist/accessory/VibrationSensorAccessory.js +42 -0
- package/dist/accessory/VibrationSensorAccessory.js.map +1 -0
- package/dist/accessory/WeatherStationAccessory.js +59 -0
- package/dist/accessory/WeatherStationAccessory.js.map +1 -0
- package/dist/accessory/WetBulbGlobeTemperatureAccessory.js +23 -0
- package/dist/accessory/WetBulbGlobeTemperatureAccessory.js.map +1 -0
- package/dist/accessory/WhiteNoiseLightAccessory.js +59 -0
- package/dist/accessory/WhiteNoiseLightAccessory.js.map +1 -0
- package/dist/accessory/WindowAccessory.js +14 -0
- package/dist/accessory/WindowAccessory.js.map +1 -0
- package/dist/accessory/WindowCoveringAccessory.js +156 -0
- package/dist/accessory/WindowCoveringAccessory.js.map +1 -0
- package/dist/accessory/WirelessSwitchAccessory.js +42 -0
- package/dist/accessory/WirelessSwitchAccessory.js.map +1 -0
- package/dist/accessory/characteristic/Active.js +23 -0
- package/dist/accessory/characteristic/Active.js.map +1 -0
- package/dist/accessory/characteristic/AirQuality.js +75 -0
- package/dist/accessory/characteristic/AirQuality.js.map +1 -0
- package/dist/accessory/characteristic/CurrentRelativeHumidity.js +24 -0
- package/dist/accessory/characteristic/CurrentRelativeHumidity.js.map +1 -0
- package/dist/accessory/characteristic/CurrentTemperature.js +24 -0
- package/dist/accessory/characteristic/CurrentTemperature.js.map +1 -0
- package/dist/accessory/characteristic/CurrentWeather.js +51 -0
- package/dist/accessory/characteristic/CurrentWeather.js.map +1 -0
- package/dist/accessory/characteristic/CurrentWeatherByOpenMeteo.js +81 -0
- package/dist/accessory/characteristic/CurrentWeatherByOpenMeteo.js.map +1 -0
- package/dist/accessory/characteristic/CurrentWetBulbGlobeTemperature.js +50 -0
- package/dist/accessory/characteristic/CurrentWetBulbGlobeTemperature.js.map +1 -0
- package/dist/accessory/characteristic/EnergyUsage.js +103 -0
- package/dist/accessory/characteristic/EnergyUsage.js.map +1 -0
- package/dist/accessory/characteristic/Light.js +269 -0
- package/dist/accessory/characteristic/Light.js.map +1 -0
- package/dist/accessory/characteristic/LightSensor.js +24 -0
- package/dist/accessory/characteristic/LightSensor.js.map +1 -0
- package/dist/accessory/characteristic/LockPhysicalControls.js +22 -0
- package/dist/accessory/characteristic/LockPhysicalControls.js.map +1 -0
- package/dist/accessory/characteristic/MotionDetected.js +23 -0
- package/dist/accessory/characteristic/MotionDetected.js.map +1 -0
- package/dist/accessory/characteristic/Name.js +12 -0
- package/dist/accessory/characteristic/Name.js.map +1 -0
- package/dist/accessory/characteristic/OccupancyDetected.js +20 -0
- package/dist/accessory/characteristic/OccupancyDetected.js.map +1 -0
- package/dist/accessory/characteristic/On.js +26 -0
- package/dist/accessory/characteristic/On.js.map +1 -0
- package/dist/accessory/characteristic/OutletInUse.js +15 -0
- package/dist/accessory/characteristic/OutletInUse.js.map +1 -0
- package/dist/accessory/characteristic/ProgrammableSwitchEvent.js +90 -0
- package/dist/accessory/characteristic/ProgrammableSwitchEvent.js.map +1 -0
- package/dist/accessory/characteristic/RelativeHumidityDehumidifierThreshold.js +29 -0
- package/dist/accessory/characteristic/RelativeHumidityDehumidifierThreshold.js.map +1 -0
- package/dist/accessory/characteristic/RotationSpeed.js +79 -0
- package/dist/accessory/characteristic/RotationSpeed.js.map +1 -0
- package/dist/accessory/characteristic/SecuritySystemState.js +76 -0
- package/dist/accessory/characteristic/SecuritySystemState.js.map +1 -0
- package/dist/accessory/characteristic/SwingMode.js +22 -0
- package/dist/accessory/characteristic/SwingMode.js.map +1 -0
- package/dist/accessory/characteristic/TemperatureDisplayUnits.js +26 -0
- package/dist/accessory/characteristic/TemperatureDisplayUnits.js.map +1 -0
- package/dist/config.js +29 -0
- package/dist/config.js.map +1 -0
- package/dist/core/TuyaOpenAPI.js +314 -0
- package/dist/core/TuyaOpenAPI.js.map +1 -0
- package/dist/core/TuyaOpenMQ.js +182 -0
- package/dist/core/TuyaOpenMQ.js.map +1 -0
- package/dist/device/TuyaCustomDeviceManager.js +65 -0
- package/dist/device/TuyaCustomDeviceManager.js.map +1 -0
- package/dist/device/TuyaDevice.js +37 -0
- package/dist/device/TuyaDevice.js.map +1 -0
- package/dist/device/TuyaDeviceManager.js +447 -0
- package/dist/device/TuyaDeviceManager.js.map +1 -0
- package/dist/device/TuyaHomeDeviceManager.js +64 -0
- package/dist/device/TuyaHomeDeviceManager.js.map +1 -0
- package/dist/index.js +7 -0
- package/dist/index.js.map +1 -0
- package/dist/platform.js +466 -0
- package/dist/platform.js.map +1 -0
- package/dist/settings.js +18 -0
- package/dist/settings.js.map +1 -0
- package/dist/util/FfmpegStreamingProcess.js +126 -0
- package/dist/util/FfmpegStreamingProcess.js.map +1 -0
- package/dist/util/InfraredTool.js +396 -0
- package/dist/util/InfraredTool.js.map +1 -0
- package/dist/util/Logger.js +42 -0
- package/dist/util/Logger.js.map +1 -0
- package/dist/util/TuyaRecordingDelegate.js +22 -0
- package/dist/util/TuyaRecordingDelegate.js.map +1 -0
- package/dist/util/TuyaStreamDelegate.js +330 -0
- package/dist/util/TuyaStreamDelegate.js.map +1 -0
- package/dist/util/color.js +24 -0
- package/dist/util/color.js.map +1 -0
- package/dist/util/util.js +48 -0
- package/dist/util/util.js.map +1 -0
- package/jest.config.js +5 -0
- package/package.json +74 -0
- package/test/custom.test.ts +101 -0
- package/test/home.test.ts +81 -0
- package/test/util.ts +39 -0
|
@@ -0,0 +1,550 @@
|
|
|
1
|
+
{
|
|
2
|
+
"pluginAlias": "TuyaPlatform",
|
|
3
|
+
"pluginType": "platform",
|
|
4
|
+
"singular": true,
|
|
5
|
+
"headerDisplay": "",
|
|
6
|
+
"footerDisplay": "",
|
|
7
|
+
"customUi": false,
|
|
8
|
+
"schema": {
|
|
9
|
+
"type": "object",
|
|
10
|
+
"properties": {
|
|
11
|
+
"name": {
|
|
12
|
+
"type": "string",
|
|
13
|
+
"title": "Name",
|
|
14
|
+
"default": "Tuya"
|
|
15
|
+
},
|
|
16
|
+
"options": {
|
|
17
|
+
"title": "Project Info",
|
|
18
|
+
"type": "object",
|
|
19
|
+
"required": ["projectType", "accessId", "accessKey", "weatherAPI"],
|
|
20
|
+
"properties": {
|
|
21
|
+
"projectType": {
|
|
22
|
+
"title": "Project Type (Development Method)",
|
|
23
|
+
"type": "string",
|
|
24
|
+
"default": "2",
|
|
25
|
+
"oneOf": [
|
|
26
|
+
{
|
|
27
|
+
"title": "Custom",
|
|
28
|
+
"enum": [
|
|
29
|
+
"1"
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
{
|
|
33
|
+
"title": "Smart Home",
|
|
34
|
+
"enum": [
|
|
35
|
+
"2"
|
|
36
|
+
]
|
|
37
|
+
}
|
|
38
|
+
]
|
|
39
|
+
},
|
|
40
|
+
"endpoint": {
|
|
41
|
+
"title": "Endpoint URL",
|
|
42
|
+
"type": "string",
|
|
43
|
+
"format": "url"
|
|
44
|
+
},
|
|
45
|
+
"accessId": {
|
|
46
|
+
"title": "Access ID",
|
|
47
|
+
"type": "string"
|
|
48
|
+
},
|
|
49
|
+
"accessKey": {
|
|
50
|
+
"title": "Access Secret",
|
|
51
|
+
"type": "string"
|
|
52
|
+
},
|
|
53
|
+
"countryCode": {
|
|
54
|
+
"title": "Country Code",
|
|
55
|
+
"type": "integer",
|
|
56
|
+
"minimum": 1,
|
|
57
|
+
"condition": {
|
|
58
|
+
"functionBody": "return model.options.projectType === '2';"
|
|
59
|
+
}
|
|
60
|
+
},
|
|
61
|
+
"username": {
|
|
62
|
+
"title": "Username",
|
|
63
|
+
"type": "string",
|
|
64
|
+
"condition": {
|
|
65
|
+
"functionBody": "return model.options.projectType === '2';"
|
|
66
|
+
}
|
|
67
|
+
},
|
|
68
|
+
"password": {
|
|
69
|
+
"title": "Password",
|
|
70
|
+
"type": "string",
|
|
71
|
+
"condition": {
|
|
72
|
+
"functionBody": "return model.options.projectType === '2';"
|
|
73
|
+
}
|
|
74
|
+
},
|
|
75
|
+
"appSchema": {
|
|
76
|
+
"title": "App",
|
|
77
|
+
"type": "string",
|
|
78
|
+
"default": "tuyaSmart",
|
|
79
|
+
"oneOf": [
|
|
80
|
+
{
|
|
81
|
+
"title": "Tuya Smart",
|
|
82
|
+
"enum": [
|
|
83
|
+
"tuyaSmart"
|
|
84
|
+
]
|
|
85
|
+
},
|
|
86
|
+
{
|
|
87
|
+
"title": "Smart Life",
|
|
88
|
+
"enum": [
|
|
89
|
+
"smartlife"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
],
|
|
93
|
+
"condition": {
|
|
94
|
+
"functionBody": "return model.options.projectType === '2';"
|
|
95
|
+
}
|
|
96
|
+
},
|
|
97
|
+
"homeWhitelist": {
|
|
98
|
+
"title": "Whitelisted Home IDs",
|
|
99
|
+
"description": "An optional list of Home IDs to match. If blank, all homes are matched.",
|
|
100
|
+
"type": "array",
|
|
101
|
+
"items": {
|
|
102
|
+
"title": "Home ID",
|
|
103
|
+
"type": "integer"
|
|
104
|
+
},
|
|
105
|
+
"condition": {
|
|
106
|
+
"functionBody": "return model.options.projectType === '2';"
|
|
107
|
+
}
|
|
108
|
+
},
|
|
109
|
+
"deviceOverrides": {
|
|
110
|
+
"title": "Device Overriding Configs",
|
|
111
|
+
"type": "array",
|
|
112
|
+
"items": {
|
|
113
|
+
"type": "object",
|
|
114
|
+
"required": ["id"],
|
|
115
|
+
"properties": {
|
|
116
|
+
"id": {
|
|
117
|
+
"title": "ID",
|
|
118
|
+
"description": "Device ID or Product ID or `global`",
|
|
119
|
+
"type": "string"
|
|
120
|
+
},
|
|
121
|
+
"category": {
|
|
122
|
+
"title": "Category",
|
|
123
|
+
"description": "Category Code or `hidden`",
|
|
124
|
+
"type": "string",
|
|
125
|
+
"condition": {
|
|
126
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
127
|
+
}
|
|
128
|
+
},
|
|
129
|
+
"unbridged": {
|
|
130
|
+
"title": "Unbridge",
|
|
131
|
+
"description": "Would you like to make this device be an external device?",
|
|
132
|
+
"type": "boolean",
|
|
133
|
+
"condition": {
|
|
134
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
135
|
+
}
|
|
136
|
+
},
|
|
137
|
+
"schema": {
|
|
138
|
+
"title": "Schema Overriding Configs",
|
|
139
|
+
"type": "array",
|
|
140
|
+
"items": {
|
|
141
|
+
"type": "object",
|
|
142
|
+
"required": ["code"],
|
|
143
|
+
"properties": {
|
|
144
|
+
"code": {
|
|
145
|
+
"title": "DP Code",
|
|
146
|
+
"type": "string",
|
|
147
|
+
"condition": {
|
|
148
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
149
|
+
}
|
|
150
|
+
},
|
|
151
|
+
"newCode": {
|
|
152
|
+
"title": "New DP Code",
|
|
153
|
+
"type": "string",
|
|
154
|
+
"condition": {
|
|
155
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].code && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
156
|
+
}
|
|
157
|
+
},
|
|
158
|
+
"type": {
|
|
159
|
+
"title": "New DP Type",
|
|
160
|
+
"type": "string",
|
|
161
|
+
"default": "",
|
|
162
|
+
"oneOf": [
|
|
163
|
+
{
|
|
164
|
+
"title": "Boolean",
|
|
165
|
+
"enum": [
|
|
166
|
+
"Boolean"
|
|
167
|
+
]
|
|
168
|
+
},
|
|
169
|
+
{
|
|
170
|
+
"title": "Integer",
|
|
171
|
+
"enum": [
|
|
172
|
+
"Integer"
|
|
173
|
+
]
|
|
174
|
+
},
|
|
175
|
+
{
|
|
176
|
+
"title": "Enum",
|
|
177
|
+
"enum": [
|
|
178
|
+
"Enum"
|
|
179
|
+
]
|
|
180
|
+
},
|
|
181
|
+
{
|
|
182
|
+
"title": "String",
|
|
183
|
+
"enum": [
|
|
184
|
+
"String"
|
|
185
|
+
]
|
|
186
|
+
},
|
|
187
|
+
{
|
|
188
|
+
"title": "Json",
|
|
189
|
+
"enum": [
|
|
190
|
+
"Json"
|
|
191
|
+
]
|
|
192
|
+
},
|
|
193
|
+
{
|
|
194
|
+
"title": "Raw",
|
|
195
|
+
"enum": [
|
|
196
|
+
"Raw"
|
|
197
|
+
]
|
|
198
|
+
}
|
|
199
|
+
],
|
|
200
|
+
"condition": {
|
|
201
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].code && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
202
|
+
}
|
|
203
|
+
},
|
|
204
|
+
"property": {
|
|
205
|
+
"title": "New DP Property",
|
|
206
|
+
"type": "object",
|
|
207
|
+
"properties": {
|
|
208
|
+
"min": {
|
|
209
|
+
"title": "min",
|
|
210
|
+
"type": "integer",
|
|
211
|
+
"condition": {
|
|
212
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].type === 'Integer' && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
213
|
+
}
|
|
214
|
+
},
|
|
215
|
+
"max": {
|
|
216
|
+
"title": "max",
|
|
217
|
+
"type": "integer",
|
|
218
|
+
"condition": {
|
|
219
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].type === 'Integer' && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
220
|
+
}
|
|
221
|
+
},
|
|
222
|
+
"scale": {
|
|
223
|
+
"title": "scale",
|
|
224
|
+
"type": "integer",
|
|
225
|
+
"condition": {
|
|
226
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].type === 'Integer' && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
227
|
+
}
|
|
228
|
+
},
|
|
229
|
+
"step": {
|
|
230
|
+
"title": "step",
|
|
231
|
+
"type": "integer",
|
|
232
|
+
"condition": {
|
|
233
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].type === 'Integer' && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
234
|
+
}
|
|
235
|
+
},
|
|
236
|
+
"range": {
|
|
237
|
+
"title": "range",
|
|
238
|
+
"type": "array",
|
|
239
|
+
"items": {
|
|
240
|
+
"title": "value",
|
|
241
|
+
"type": "string"
|
|
242
|
+
},
|
|
243
|
+
"condition": {
|
|
244
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].type === 'Enum' && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
245
|
+
}
|
|
246
|
+
}
|
|
247
|
+
},
|
|
248
|
+
"condition": {
|
|
249
|
+
"functionBody": "return (model.options && model.options.deviceOverrides && model.options.deviceOverrides[arrayIndices[0]].schema && model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].code && !model.options.deviceOverrides[arrayIndices[0]].schema[arrayIndices[1]].hidden);"
|
|
250
|
+
}
|
|
251
|
+
},
|
|
252
|
+
"hidden": {
|
|
253
|
+
"title": "Hidden",
|
|
254
|
+
"type": "boolean",
|
|
255
|
+
"condition": {
|
|
256
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
257
|
+
}
|
|
258
|
+
}
|
|
259
|
+
}
|
|
260
|
+
},
|
|
261
|
+
"condition": {
|
|
262
|
+
"functionBody": "return (model.options && model.options.deviceOverrides);"
|
|
263
|
+
}
|
|
264
|
+
}
|
|
265
|
+
}
|
|
266
|
+
}
|
|
267
|
+
},
|
|
268
|
+
"serviceInformationOverrides": {
|
|
269
|
+
"title": "Accessory Service Informations ",
|
|
270
|
+
"description": "Accessory Service Information Configs",
|
|
271
|
+
"type": "array",
|
|
272
|
+
"items": {
|
|
273
|
+
"type": "object",
|
|
274
|
+
"required": ["device_id", "index"],
|
|
275
|
+
"properties": {
|
|
276
|
+
"device_id": {
|
|
277
|
+
"title": "DeviceID",
|
|
278
|
+
"description": "Device ID. Often Sub Device ID. See Accessory Information > Serial Number.",
|
|
279
|
+
"type": "string"
|
|
280
|
+
},
|
|
281
|
+
"index": {
|
|
282
|
+
"title": "Characteristic Index",
|
|
283
|
+
"description": "Usually 1. If Accessory has more functions, it might be 2 or more.",
|
|
284
|
+
"type": "string",
|
|
285
|
+
"default": 1
|
|
286
|
+
},
|
|
287
|
+
"manifacturer": {
|
|
288
|
+
"title": "Manifacturer",
|
|
289
|
+
"description": "Product Manifacturer",
|
|
290
|
+
"type": "string"
|
|
291
|
+
},
|
|
292
|
+
"model": {
|
|
293
|
+
"title": "Model",
|
|
294
|
+
"description": "Model",
|
|
295
|
+
"type": "string"
|
|
296
|
+
},
|
|
297
|
+
"firmwareRevision": {
|
|
298
|
+
"title": "Firmware Revision",
|
|
299
|
+
"description": "Firware Revision",
|
|
300
|
+
"type": "string"
|
|
301
|
+
},
|
|
302
|
+
"configuredName": {
|
|
303
|
+
"title": "Configured Name",
|
|
304
|
+
"description": "Accessory name displayed in Home.app",
|
|
305
|
+
"type": "string"
|
|
306
|
+
}
|
|
307
|
+
}
|
|
308
|
+
}
|
|
309
|
+
},
|
|
310
|
+
"generateWeatherAccessory": {
|
|
311
|
+
"title": "Generate Weather Accessory",
|
|
312
|
+
"description": "Generate Current Weather at Home Location. Gets Temperature and Humidity.",
|
|
313
|
+
"type": "boolean",
|
|
314
|
+
"default": false
|
|
315
|
+
},
|
|
316
|
+
"weatherAPI": {
|
|
317
|
+
"title": "Weather API",
|
|
318
|
+
"description": "Open-Meteo : For non-commercial use. [Weather data by Open-Meteo.com](https://open-meteo.com/)<br>Tuya : Requires authorization for Weather Service.",
|
|
319
|
+
"type": "string",
|
|
320
|
+
"enum": ["Open-Meteo", "Tuya"],
|
|
321
|
+
"default": "Open-Meteo",
|
|
322
|
+
"condition": {
|
|
323
|
+
"functionBody": "return (model.options && model.options.generateWeatherAccessory);"
|
|
324
|
+
}
|
|
325
|
+
},
|
|
326
|
+
"debug": {
|
|
327
|
+
"title": "Enable Debug Logging",
|
|
328
|
+
"type": "boolean",
|
|
329
|
+
"default": false
|
|
330
|
+
},
|
|
331
|
+
"debugLevel": {
|
|
332
|
+
"title": "Debug Level",
|
|
333
|
+
"description": "An optional list of strings seperated with comma `,`. `api` represents for API and MQTT log, device ID represents for specific device log. If blank, all logs are outputed.",
|
|
334
|
+
"type": "string",
|
|
335
|
+
"condition": {
|
|
336
|
+
"functionBody": "return (model.options && model.options.debug);"
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
}
|
|
340
|
+
}
|
|
341
|
+
},
|
|
342
|
+
"required":["name"]
|
|
343
|
+
},
|
|
344
|
+
"layout": [
|
|
345
|
+
{
|
|
346
|
+
"type": "fieldset",
|
|
347
|
+
"title": "Tuya Account Info",
|
|
348
|
+
"expandable": true,
|
|
349
|
+
"expanded": false,
|
|
350
|
+
"items": [
|
|
351
|
+
"options.projectType",
|
|
352
|
+
"options.endpoint",
|
|
353
|
+
"options.accessId",
|
|
354
|
+
"options.accessKey",
|
|
355
|
+
"options.countryCode",
|
|
356
|
+
"options.username",
|
|
357
|
+
"options.password",
|
|
358
|
+
"options.appSchema"
|
|
359
|
+
]
|
|
360
|
+
},
|
|
361
|
+
{
|
|
362
|
+
"type": "fieldset",
|
|
363
|
+
"title": "Tuya Home Settings",
|
|
364
|
+
"expandable": true,
|
|
365
|
+
"expanded": false,
|
|
366
|
+
"notitle": false,
|
|
367
|
+
"items": [
|
|
368
|
+
{
|
|
369
|
+
"key": "options.homeWhitelist",
|
|
370
|
+
"add": "Add Another Home ID",
|
|
371
|
+
"title": "{{ 'New Whitelisted Home' }}",
|
|
372
|
+
"type": "tabarray",
|
|
373
|
+
"notitle": true,
|
|
374
|
+
"items": [
|
|
375
|
+
{
|
|
376
|
+
"type": "div",
|
|
377
|
+
"displayFlex": true,
|
|
378
|
+
"flex-direction": "row",
|
|
379
|
+
"notitle": true,
|
|
380
|
+
"title": "{{ value }}",
|
|
381
|
+
"items": [
|
|
382
|
+
{
|
|
383
|
+
"key": "options.homeWhitelist[]",
|
|
384
|
+
"placeholder": "Home ID"
|
|
385
|
+
}
|
|
386
|
+
]
|
|
387
|
+
}
|
|
388
|
+
]
|
|
389
|
+
}
|
|
390
|
+
]
|
|
391
|
+
},
|
|
392
|
+
{
|
|
393
|
+
"type": "fieldset",
|
|
394
|
+
"title": "Tuya Device Settings",
|
|
395
|
+
"expandable": true,
|
|
396
|
+
"expanded": true,
|
|
397
|
+
"notitle": false,
|
|
398
|
+
"items": [
|
|
399
|
+
{
|
|
400
|
+
"key": "options.deviceOverrides",
|
|
401
|
+
"add": "Add Another Device Override",
|
|
402
|
+
"title": "{{ 'New Device Override' }}",
|
|
403
|
+
"type": "tabarray",
|
|
404
|
+
"notitle": true,
|
|
405
|
+
"items": [
|
|
406
|
+
{
|
|
407
|
+
"type": "div",
|
|
408
|
+
"displayFlex": false,
|
|
409
|
+
"flex-direction": "row",
|
|
410
|
+
"notitle": true,
|
|
411
|
+
"title": "{{ value.id }}",
|
|
412
|
+
"items": [
|
|
413
|
+
{
|
|
414
|
+
"key": "options.deviceOverrides[].id"
|
|
415
|
+
},
|
|
416
|
+
{
|
|
417
|
+
"key": "options.deviceOverrides[].category"
|
|
418
|
+
},
|
|
419
|
+
{
|
|
420
|
+
"key": "options.deviceOverrides[].unbridged"
|
|
421
|
+
},
|
|
422
|
+
{
|
|
423
|
+
"key": "options.deviceOverrides[].schema",
|
|
424
|
+
"add": "Add New Schema",
|
|
425
|
+
"title": "{{ 'New Schema' }}",
|
|
426
|
+
"type": "tabarray",
|
|
427
|
+
"notitle": true,
|
|
428
|
+
"items": [
|
|
429
|
+
{
|
|
430
|
+
"type": "div",
|
|
431
|
+
"displayFlex": true,
|
|
432
|
+
"title": "{{ value.code }}",
|
|
433
|
+
"flex-direction": "column",
|
|
434
|
+
"notitle": false,
|
|
435
|
+
"items": [
|
|
436
|
+
{
|
|
437
|
+
"key": "options.deviceOverrides[].schema[].code"
|
|
438
|
+
},
|
|
439
|
+
{
|
|
440
|
+
"key": "options.deviceOverrides[].schema[].newCode"
|
|
441
|
+
},
|
|
442
|
+
{
|
|
443
|
+
"key": "options.deviceOverrides[].schema[].hidden"
|
|
444
|
+
},
|
|
445
|
+
{
|
|
446
|
+
"key": "options.deviceOverrides[].schema[].type"
|
|
447
|
+
},
|
|
448
|
+
{
|
|
449
|
+
"key": "options.deviceOverrides[].schema[].property",
|
|
450
|
+
"notitle": false,
|
|
451
|
+
"items": [
|
|
452
|
+
"options.deviceOverrides[].schema[].property.min",
|
|
453
|
+
"options.deviceOverrides[].schema[].property.max",
|
|
454
|
+
"options.deviceOverrides[].schema[].property.scale",
|
|
455
|
+
"options.deviceOverrides[].schema[].property.step",
|
|
456
|
+
{
|
|
457
|
+
"key": "options.deviceOverrides[].schema[].property.range",
|
|
458
|
+
"add": "Add Range",
|
|
459
|
+
"title": "{{ 'New Range' }}",
|
|
460
|
+
"type": "tabarray",
|
|
461
|
+
"notitle": true,
|
|
462
|
+
"items": [
|
|
463
|
+
{
|
|
464
|
+
"type": "div",
|
|
465
|
+
"displayFlex": true,
|
|
466
|
+
"flex-direction": "row",
|
|
467
|
+
"notitle": true,
|
|
468
|
+
"title": "{{ value }}",
|
|
469
|
+
"items": [
|
|
470
|
+
{
|
|
471
|
+
"key": "options.deviceOverrides[].schema[].property.range[]",
|
|
472
|
+
"placeholder": "Range"
|
|
473
|
+
}
|
|
474
|
+
]
|
|
475
|
+
}
|
|
476
|
+
]
|
|
477
|
+
}
|
|
478
|
+
]
|
|
479
|
+
}
|
|
480
|
+
]
|
|
481
|
+
}
|
|
482
|
+
]
|
|
483
|
+
}
|
|
484
|
+
]
|
|
485
|
+
}
|
|
486
|
+
]
|
|
487
|
+
}
|
|
488
|
+
]
|
|
489
|
+
},
|
|
490
|
+
|
|
491
|
+
{
|
|
492
|
+
"type": "fieldset",
|
|
493
|
+
"title": "Accessory Service Informations",
|
|
494
|
+
"expandable": true,
|
|
495
|
+
"expanded": false,
|
|
496
|
+
"notitle": false,
|
|
497
|
+
"items": [
|
|
498
|
+
{
|
|
499
|
+
"key": "options.serviceInformationOverrides",
|
|
500
|
+
"add": "Add Another Service Information Override",
|
|
501
|
+
"title": "{{ 'New Service Information Override' }}",
|
|
502
|
+
"type": "tabarray",
|
|
503
|
+
"notitle": true,
|
|
504
|
+
"items": [
|
|
505
|
+
{
|
|
506
|
+
"type": "div",
|
|
507
|
+
"displayFlex": false,
|
|
508
|
+
"flex-direction": "row",
|
|
509
|
+
"notitle": true,
|
|
510
|
+
"title": "{{ value.device_id }}",
|
|
511
|
+
"items": [
|
|
512
|
+
{
|
|
513
|
+
"key": "options.serviceInformationOverrides[].device_id"
|
|
514
|
+
},
|
|
515
|
+
{
|
|
516
|
+
"key": "options.serviceInformationOverrides[].index"
|
|
517
|
+
},
|
|
518
|
+
{
|
|
519
|
+
"key": "options.serviceInformationOverrides[].manifacturer"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
"key": "options.serviceInformationOverrides[].model"
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
"key": "options.serviceInformationOverrides[].firmwareRevision"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"key": "options.serviceInformationOverrides[].configuredName"
|
|
529
|
+
}
|
|
530
|
+
]
|
|
531
|
+
}
|
|
532
|
+
]
|
|
533
|
+
}
|
|
534
|
+
]
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
"type": "fieldset",
|
|
538
|
+
"title": "Advance Settings",
|
|
539
|
+
"expandable": true,
|
|
540
|
+
"expanded": false,
|
|
541
|
+
"notitle": false,
|
|
542
|
+
"items": [
|
|
543
|
+
"options.generateWeatherAccessory",
|
|
544
|
+
"options.weatherAPI",
|
|
545
|
+
"options.debug",
|
|
546
|
+
"options.debugLevel"
|
|
547
|
+
]
|
|
548
|
+
}
|
|
549
|
+
]
|
|
550
|
+
}
|