@switchbot/homebridge-switchbot 3.7.1-beta.2 → 3.7.1-beta.21
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/CHANGELOG.md +10 -0
- package/README.md +14 -0
- package/assets/security-privacy-bluetooth.png +0 -0
- package/config.schema.json +74 -2
- package/dist/device/blindtilt.d.ts +21 -9
- package/dist/device/blindtilt.d.ts.map +1 -1
- package/dist/device/blindtilt.js +167 -96
- package/dist/device/blindtilt.js.map +1 -1
- package/dist/device/bot-old.d.ts +132 -0
- package/dist/device/bot-old.d.ts.map +1 -0
- package/dist/device/bot-old.js +1482 -0
- package/dist/device/bot-old.js.map +1 -0
- package/dist/device/bot.d.ts +10 -9
- package/dist/device/bot.d.ts.map +1 -1
- package/dist/device/bot.js +186 -187
- package/dist/device/bot.js.map +1 -1
- package/dist/device/ceilinglight.d.ts +14 -13
- package/dist/device/ceilinglight.d.ts.map +1 -1
- package/dist/device/ceilinglight.js +87 -97
- package/dist/device/ceilinglight.js.map +1 -1
- package/dist/device/colorbulb.d.ts +13 -12
- package/dist/device/colorbulb.d.ts.map +1 -1
- package/dist/device/colorbulb.js +92 -105
- package/dist/device/colorbulb.js.map +1 -1
- package/dist/device/contact.d.ts +6 -5
- package/dist/device/contact.d.ts.map +1 -1
- package/dist/device/contact.js +71 -68
- package/dist/device/contact.js.map +1 -1
- package/dist/device/curtain.d.ts +17 -5
- package/dist/device/curtain.d.ts.map +1 -1
- package/dist/device/curtain.js +184 -118
- package/dist/device/curtain.js.map +1 -1
- package/dist/device/device.d.ts +18 -18
- package/dist/device/device.d.ts.map +1 -1
- package/dist/device/device.js +33 -36
- package/dist/device/device.js.map +1 -1
- package/dist/device/fan.d.ts +9 -8
- package/dist/device/fan.d.ts.map +1 -1
- package/dist/device/fan.js +94 -101
- package/dist/device/fan.js.map +1 -1
- package/dist/device/hub.d.ts +6 -5
- package/dist/device/hub.d.ts.map +1 -1
- package/dist/device/hub.js +69 -65
- package/dist/device/hub.js.map +1 -1
- package/dist/device/humidifier.d.ts +6 -5
- package/dist/device/humidifier.d.ts.map +1 -1
- package/dist/device/humidifier.js +89 -104
- package/dist/device/humidifier.js.map +1 -1
- package/dist/device/iosensor.d.ts +6 -5
- package/dist/device/iosensor.d.ts.map +1 -1
- package/dist/device/iosensor.js +72 -66
- package/dist/device/iosensor.js.map +1 -1
- package/dist/device/lightstrip.d.ts +7 -6
- package/dist/device/lightstrip.d.ts.map +1 -1
- package/dist/device/lightstrip.js +85 -99
- package/dist/device/lightstrip.js.map +1 -1
- package/dist/device/lock.d.ts +10 -9
- package/dist/device/lock.d.ts.map +1 -1
- package/dist/device/lock.js +89 -79
- package/dist/device/lock.js.map +1 -1
- package/dist/device/meter.d.ts +6 -5
- package/dist/device/meter.d.ts.map +1 -1
- package/dist/device/meter.js +72 -65
- package/dist/device/meter.js.map +1 -1
- package/dist/device/meterplus.d.ts +6 -5
- package/dist/device/meterplus.d.ts.map +1 -1
- package/dist/device/meterplus.js +72 -64
- package/dist/device/meterplus.js.map +1 -1
- package/dist/device/motion.d.ts +6 -5
- package/dist/device/motion.d.ts.map +1 -1
- package/dist/device/motion.js +65 -58
- package/dist/device/motion.js.map +1 -1
- package/dist/device/plug.d.ts +13 -12
- package/dist/device/plug.d.ts.map +1 -1
- package/dist/device/plug.js +68 -52
- package/dist/device/plug.js.map +1 -1
- package/dist/device/robotvacuumcleaner.d.ts +12 -11
- package/dist/device/robotvacuumcleaner.d.ts.map +1 -1
- package/dist/device/robotvacuumcleaner.js +93 -82
- package/dist/device/robotvacuumcleaner.js.map +1 -1
- package/dist/device/waterdetector.d.ts +6 -5
- package/dist/device/waterdetector.d.ts.map +1 -1
- package/dist/device/waterdetector.js +73 -63
- package/dist/device/waterdetector.js.map +1 -1
- package/dist/homebridge-ui/server.js +2 -2
- package/dist/homebridge-ui/server.js.map +1 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +0 -4
- package/dist/index.js.map +1 -1
- package/dist/irdevice/airconditioner.d.ts +8 -8
- package/dist/irdevice/airconditioner.d.ts.map +1 -1
- package/dist/irdevice/airconditioner.js +61 -105
- package/dist/irdevice/airconditioner.js.map +1 -1
- package/dist/irdevice/airpurifier.d.ts +10 -10
- package/dist/irdevice/airpurifier.d.ts.map +1 -1
- package/dist/irdevice/airpurifier.js +22 -42
- package/dist/irdevice/airpurifier.js.map +1 -1
- package/dist/irdevice/camera.d.ts +9 -9
- package/dist/irdevice/camera.d.ts.map +1 -1
- package/dist/irdevice/camera.js +15 -25
- package/dist/irdevice/camera.js.map +1 -1
- package/dist/irdevice/fan.d.ts +8 -8
- package/dist/irdevice/fan.d.ts.map +1 -1
- package/dist/irdevice/fan.js +21 -40
- package/dist/irdevice/fan.js.map +1 -1
- package/dist/irdevice/irdevice.d.ts +11 -11
- package/dist/irdevice/irdevice.d.ts.map +1 -1
- package/dist/irdevice/irdevice.js +14 -22
- package/dist/irdevice/irdevice.js.map +1 -1
- package/dist/irdevice/light.d.ts +9 -9
- package/dist/irdevice/light.d.ts.map +1 -1
- package/dist/irdevice/light.js +24 -47
- package/dist/irdevice/light.js.map +1 -1
- package/dist/irdevice/other.d.ts +9 -9
- package/dist/irdevice/other.d.ts.map +1 -1
- package/dist/irdevice/other.js +40 -83
- package/dist/irdevice/other.js.map +1 -1
- package/dist/irdevice/tv.d.ts +9 -9
- package/dist/irdevice/tv.d.ts.map +1 -1
- package/dist/irdevice/tv.js +29 -54
- package/dist/irdevice/tv.js.map +1 -1
- package/dist/irdevice/vacuumcleaner.d.ts +5 -5
- package/dist/irdevice/vacuumcleaner.d.ts.map +1 -1
- package/dist/irdevice/vacuumcleaner.js +11 -21
- package/dist/irdevice/vacuumcleaner.js.map +1 -1
- package/dist/irdevice/waterheater.d.ts +5 -5
- package/dist/irdevice/waterheater.d.ts.map +1 -1
- package/dist/irdevice/waterheater.js +11 -22
- package/dist/irdevice/waterheater.js.map +1 -1
- package/dist/platform.d.ts +24 -23
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +509 -723
- package/dist/platform.js.map +1 -1
- package/dist/settings.d.ts +5 -2
- package/dist/settings.d.ts.map +1 -1
- package/dist/settings.js.map +1 -1
- package/dist/types/bledevicestatus.d.ts +9 -9
- package/dist/types/bledevicestatus.d.ts.map +1 -1
- package/dist/types/devicelist.d.ts +6 -6
- package/dist/types/devicelist.d.ts.map +1 -1
- package/dist/types/deviceresponse.d.ts +4 -4
- package/dist/types/deviceresponse.d.ts.map +1 -1
- package/dist/types/devicestatus.d.ts +2 -2
- package/dist/types/devicestatus.d.ts.map +1 -1
- package/dist/types/devicewebhookstatus.d.ts +5 -5
- package/dist/types/devicewebhookstatus.d.ts.map +1 -1
- package/dist/types/irdevicelist.d.ts +4 -4
- package/dist/types/irdevicelist.d.ts.map +1 -1
- package/dist/types/pushbody.d.ts +2 -2
- package/dist/types/pushbody.d.ts.map +1 -1
- package/dist/utils.d.ts +4 -4
- package/dist/utils.d.ts.map +1 -1
- package/dist/utils.js +9 -13
- package/dist/utils.js.map +1 -1
- package/eslint.config.js +48 -93
- package/package.json +64 -57
- package/src/device/blindtilt.ts +537 -456
- package/src/device/bot-old.ts +1540 -0
- package/src/device/bot.ts +732 -725
- package/src/device/ceilinglight.ts +359 -368
- package/src/device/colorbulb.ts +441 -453
- package/src/device/contact.ts +229 -226
- package/src/device/curtain.ts +526 -444
- package/src/device/device.ts +206 -208
- package/src/device/fan.ts +336 -345
- package/src/device/hub.ts +213 -214
- package/src/device/humidifier.ts +326 -347
- package/src/device/iosensor.ts +211 -209
- package/src/device/lightstrip.ts +391 -404
- package/src/device/lock.ts +292 -282
- package/src/device/meter.ts +212 -210
- package/src/device/meterplus.ts +212 -209
- package/src/device/motion.ts +198 -190
- package/src/device/plug.ts +203 -182
- package/src/device/robotvacuumcleaner.ts +280 -269
- package/src/device/waterdetector.ts +198 -189
- package/src/homebridge-ui/server.ts +16 -15
- package/src/index.ts +5 -6
- package/src/irdevice/airconditioner.ts +277 -326
- package/src/irdevice/airpurifier.ts +124 -143
- package/src/irdevice/camera.ts +58 -64
- package/src/irdevice/fan.ts +106 -123
- package/src/irdevice/irdevice.ts +116 -119
- package/src/irdevice/light.ts +119 -143
- package/src/irdevice/other.ts +417 -461
- package/src/irdevice/tv.ts +155 -177
- package/src/irdevice/vacuumcleaner.ts +54 -60
- package/src/irdevice/waterheater.ts +56 -63
- package/src/platform.ts +1491 -1681
- package/src/settings.ts +172 -169
- package/src/types/bledevicestatus.ts +252 -256
- package/src/types/devicelist.ts +79 -79
- package/src/types/deviceresponse.ts +12 -13
- package/src/types/devicestatus.ts +124 -124
- package/src/types/devicewebhookstatus.ts +126 -131
- package/src/types/irdevicelist.ts +10 -10
- package/src/types/pushbody.ts +5 -5
- package/src/utils.ts +64 -65
- package/tsconfig.json +10 -9
package/src/types/devicelist.ts
CHANGED
|
@@ -3,122 +3,122 @@
|
|
|
3
3
|
* devicelist.ts: @switchbot/homebridge-switchbot platform class.
|
|
4
4
|
*/
|
|
5
5
|
|
|
6
|
-
export
|
|
7
|
-
device: device[]
|
|
8
|
-
}
|
|
6
|
+
export interface deviceList {
|
|
7
|
+
device: device[]
|
|
8
|
+
}
|
|
9
9
|
|
|
10
|
-
export
|
|
11
|
-
deviceId: string
|
|
12
|
-
deviceName: string
|
|
13
|
-
deviceType: string
|
|
14
|
-
enableCloudService: boolean
|
|
15
|
-
hubDeviceId: string
|
|
16
|
-
version?: number
|
|
17
|
-
}
|
|
10
|
+
export interface device {
|
|
11
|
+
deviceId: string
|
|
12
|
+
deviceName: string
|
|
13
|
+
deviceType: string
|
|
14
|
+
enableCloudService: boolean
|
|
15
|
+
hubDeviceId: string
|
|
16
|
+
version?: number
|
|
17
|
+
}
|
|
18
18
|
|
|
19
|
-
export type bot = device & {}
|
|
19
|
+
export type bot = device & {}
|
|
20
20
|
|
|
21
21
|
export type curtain = device & {
|
|
22
|
-
curtainDevicesIds: string[]
|
|
23
|
-
calibrate: boolean
|
|
24
|
-
group: boolean
|
|
25
|
-
master: boolean
|
|
26
|
-
openDirection: string
|
|
27
|
-
}
|
|
22
|
+
curtainDevicesIds: string[]
|
|
23
|
+
calibrate: boolean
|
|
24
|
+
group: boolean
|
|
25
|
+
master: boolean
|
|
26
|
+
openDirection: string
|
|
27
|
+
}
|
|
28
28
|
|
|
29
29
|
export type curtain3 = device & {
|
|
30
|
-
curtainDevicesIds: string[]
|
|
31
|
-
calibrate: boolean
|
|
32
|
-
group: boolean
|
|
33
|
-
master: boolean
|
|
34
|
-
openDirection?: string
|
|
35
|
-
}
|
|
30
|
+
curtainDevicesIds: string[]
|
|
31
|
+
calibrate: boolean
|
|
32
|
+
group: boolean
|
|
33
|
+
master: boolean
|
|
34
|
+
openDirection?: string
|
|
35
|
+
}
|
|
36
36
|
|
|
37
|
-
export type hub2 = device & {}
|
|
37
|
+
export type hub2 = device & {}
|
|
38
38
|
|
|
39
|
-
export type meter = device & {}
|
|
39
|
+
export type meter = device & {}
|
|
40
40
|
|
|
41
|
-
export type meterPlus = device & {}
|
|
41
|
+
export type meterPlus = device & {}
|
|
42
42
|
|
|
43
|
-
export type outdoorMeter = device & {}
|
|
43
|
+
export type outdoorMeter = device & {}
|
|
44
44
|
|
|
45
45
|
export type lock = device & {
|
|
46
|
-
group: boolean
|
|
47
|
-
master: boolean
|
|
48
|
-
groupName: string
|
|
49
|
-
lockDevicesIds: string[]
|
|
50
|
-
}
|
|
46
|
+
group: boolean
|
|
47
|
+
master: boolean
|
|
48
|
+
groupName: string
|
|
49
|
+
lockDevicesIds: string[]
|
|
50
|
+
}
|
|
51
51
|
|
|
52
52
|
export type lockPro = device & {
|
|
53
|
-
group: boolean
|
|
54
|
-
master: boolean
|
|
55
|
-
groupName: string
|
|
56
|
-
lockDevicesIds: string[]
|
|
57
|
-
}
|
|
53
|
+
group: boolean
|
|
54
|
+
master: boolean
|
|
55
|
+
groupName: string
|
|
56
|
+
lockDevicesIds: string[]
|
|
57
|
+
}
|
|
58
58
|
|
|
59
59
|
export type keypad = device & {
|
|
60
|
-
remoteType: string
|
|
61
|
-
lockDeviceId: string
|
|
60
|
+
remoteType: string
|
|
61
|
+
lockDeviceId: string
|
|
62
62
|
keyList: keyList
|
|
63
|
-
}
|
|
63
|
+
}
|
|
64
64
|
|
|
65
65
|
export type keypadTouch = device & {
|
|
66
|
-
remoteType: string
|
|
67
|
-
lockDeviceId: string
|
|
66
|
+
remoteType: string
|
|
67
|
+
lockDeviceId: string
|
|
68
68
|
keyList: keyList
|
|
69
|
-
}
|
|
69
|
+
}
|
|
70
70
|
|
|
71
|
-
|
|
72
|
-
id: number
|
|
73
|
-
name: string
|
|
74
|
-
type: string
|
|
75
|
-
password: string
|
|
76
|
-
iv: string
|
|
77
|
-
status: string
|
|
78
|
-
createTime: number
|
|
79
|
-
}
|
|
71
|
+
interface keyList {
|
|
72
|
+
id: number
|
|
73
|
+
name: string
|
|
74
|
+
type: string
|
|
75
|
+
password: string
|
|
76
|
+
iv: string
|
|
77
|
+
status: string
|
|
78
|
+
createTime: number
|
|
79
|
+
}
|
|
80
80
|
|
|
81
|
-
export type remote = device & {}
|
|
81
|
+
export type remote = device & {}
|
|
82
82
|
|
|
83
|
-
export type motionSensor = device & {}
|
|
83
|
+
export type motionSensor = device & {}
|
|
84
84
|
|
|
85
|
-
export type contactSensor = device & {}
|
|
85
|
+
export type contactSensor = device & {}
|
|
86
86
|
|
|
87
|
-
export type waterLeakDetector = device & {}
|
|
87
|
+
export type waterLeakDetector = device & {}
|
|
88
88
|
|
|
89
|
-
export type ceilingLight = device & {}
|
|
89
|
+
export type ceilingLight = device & {}
|
|
90
90
|
|
|
91
|
-
export type ceilingLightPro = device & {}
|
|
91
|
+
export type ceilingLightPro = device & {}
|
|
92
92
|
|
|
93
|
-
export type plug = device & {}
|
|
93
|
+
export type plug = device & {}
|
|
94
94
|
|
|
95
|
-
export type plugMini = device & {}
|
|
95
|
+
export type plugMini = device & {}
|
|
96
96
|
|
|
97
|
-
export type stripLight = device & {}
|
|
97
|
+
export type stripLight = device & {}
|
|
98
98
|
|
|
99
|
-
export type colorBulb = device & {}
|
|
99
|
+
export type colorBulb = device & {}
|
|
100
100
|
|
|
101
|
-
export type robotVacuumCleanerS1 = device & {}
|
|
101
|
+
export type robotVacuumCleanerS1 = device & {}
|
|
102
102
|
|
|
103
|
-
export type robotVacuumCleanerS1Plus = device & {}
|
|
103
|
+
export type robotVacuumCleanerS1Plus = device & {}
|
|
104
104
|
|
|
105
|
-
export type floorCleaningRobotS10 = device & {}
|
|
105
|
+
export type floorCleaningRobotS10 = device & {}
|
|
106
106
|
|
|
107
|
-
export type humidifier = device & {}
|
|
107
|
+
export type humidifier = device & {}
|
|
108
108
|
|
|
109
|
-
export type indoorCam = device & {}
|
|
109
|
+
export type indoorCam = device & {}
|
|
110
110
|
|
|
111
|
-
export type pantiltCam = device & {}
|
|
111
|
+
export type pantiltCam = device & {}
|
|
112
112
|
|
|
113
|
-
export type pantiltCam2k = device & {}
|
|
113
|
+
export type pantiltCam2k = device & {}
|
|
114
114
|
|
|
115
115
|
export type blindTilt = device & {
|
|
116
|
-
blindTiltDevicesIds: string[]
|
|
117
|
-
calibrate: boolean
|
|
118
|
-
group: boolean
|
|
119
|
-
master: boolean
|
|
120
|
-
direction: string
|
|
121
|
-
slidePosition: number
|
|
122
|
-
}
|
|
123
|
-
|
|
124
|
-
export type batteryCirculatorFan = device & {}
|
|
116
|
+
blindTiltDevicesIds: string[]
|
|
117
|
+
calibrate: boolean
|
|
118
|
+
group: boolean
|
|
119
|
+
master: boolean
|
|
120
|
+
direction: string
|
|
121
|
+
slidePosition: number
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
export type batteryCirculatorFan = device & {}
|
|
@@ -1,15 +1,14 @@
|
|
|
1
|
-
import type { deviceList } from './devicelist'
|
|
2
|
-
import type { infraredRemoteList } from './irdevicelist'
|
|
1
|
+
import type { deviceList } from './devicelist'
|
|
2
|
+
import type { infraredRemoteList } from './irdevicelist'
|
|
3
3
|
|
|
4
|
+
// json response from SwitchBot API
|
|
5
|
+
export interface devices {
|
|
6
|
+
statusCode: 100 | 190 | 'n/a'
|
|
7
|
+
message: string
|
|
8
|
+
body: body
|
|
9
|
+
}
|
|
4
10
|
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
body: body;
|
|
10
|
-
};
|
|
11
|
-
|
|
12
|
-
type body = {
|
|
13
|
-
deviceList: deviceList;
|
|
14
|
-
infraredRemoteList: infraredRemoteList;
|
|
15
|
-
};
|
|
11
|
+
interface body {
|
|
12
|
+
deviceList: deviceList
|
|
13
|
+
infraredRemoteList: infraredRemoteList
|
|
14
|
+
}
|
|
@@ -1,178 +1,178 @@
|
|
|
1
|
-
import type { device } from './devicelist'
|
|
1
|
+
import type { device } from './devicelist'
|
|
2
2
|
|
|
3
3
|
/* Copyright(C) 2017-2024, donavanbecker (https://github.com/donavanbecker). All rights reserved.
|
|
4
4
|
*
|
|
5
5
|
* devicestatus.ts: @switchbot/homebridge-switchbot platform class.
|
|
6
6
|
*/
|
|
7
|
-
export
|
|
8
|
-
statusCode: number
|
|
9
|
-
message: string
|
|
10
|
-
body: deviceStatus
|
|
11
|
-
}
|
|
7
|
+
export interface deviceStatusRequest {
|
|
8
|
+
statusCode: number
|
|
9
|
+
message: string
|
|
10
|
+
body: deviceStatus
|
|
11
|
+
}
|
|
12
12
|
|
|
13
13
|
export interface deviceStatus extends device {
|
|
14
|
-
//properties on all devices
|
|
15
|
-
deviceId: string
|
|
16
|
-
deviceType: string
|
|
17
|
-
hubDeviceId: string
|
|
18
|
-
version: number
|
|
14
|
+
// properties on all devices
|
|
15
|
+
deviceId: string
|
|
16
|
+
deviceType: string
|
|
17
|
+
hubDeviceId: string
|
|
18
|
+
version: number
|
|
19
19
|
};
|
|
20
20
|
|
|
21
21
|
export type botStatus = deviceStatus & {
|
|
22
|
-
power: string
|
|
23
|
-
battery: number
|
|
24
|
-
mode: 'pressMode' | 'switchMode' | 'customizeMode'
|
|
25
|
-
}
|
|
22
|
+
power: string
|
|
23
|
+
battery: number
|
|
24
|
+
mode: 'pressMode' | 'switchMode' | 'customizeMode'
|
|
25
|
+
}
|
|
26
26
|
|
|
27
27
|
export type curtainStatus = deviceStatus & {
|
|
28
|
-
calibrate: boolean
|
|
29
|
-
group: boolean
|
|
30
|
-
moving: boolean
|
|
31
|
-
battery: number
|
|
32
|
-
slidePosition: number
|
|
33
|
-
lightLevel?: 'bright' | 'dim'
|
|
34
|
-
}
|
|
28
|
+
calibrate: boolean
|
|
29
|
+
group: boolean
|
|
30
|
+
moving: boolean
|
|
31
|
+
battery: number
|
|
32
|
+
slidePosition: number
|
|
33
|
+
lightLevel?: 'bright' | 'dim'
|
|
34
|
+
}
|
|
35
35
|
|
|
36
36
|
export type meterStatus = deviceStatus & {
|
|
37
|
-
temperature: number
|
|
38
|
-
battery: number
|
|
39
|
-
humidity: number
|
|
40
|
-
}
|
|
37
|
+
temperature: number
|
|
38
|
+
battery: number
|
|
39
|
+
humidity: number
|
|
40
|
+
}
|
|
41
41
|
|
|
42
42
|
export type meterPlusStatus = deviceStatus & {
|
|
43
|
-
temperature: number
|
|
44
|
-
battery: number
|
|
45
|
-
humidity: number
|
|
46
|
-
}
|
|
43
|
+
temperature: number
|
|
44
|
+
battery: number
|
|
45
|
+
humidity: number
|
|
46
|
+
}
|
|
47
47
|
|
|
48
48
|
export type outdoorMeterStatus = deviceStatus & {
|
|
49
|
-
battery: number
|
|
50
|
-
temperature: number
|
|
51
|
-
humidity: number
|
|
52
|
-
}
|
|
49
|
+
battery: number
|
|
50
|
+
temperature: number
|
|
51
|
+
humidity: number
|
|
52
|
+
}
|
|
53
53
|
|
|
54
54
|
export type lockStatus = deviceStatus & {
|
|
55
|
-
lockState: string
|
|
56
|
-
doorState: string
|
|
57
|
-
moveDetected: boolean
|
|
58
|
-
battery: number
|
|
59
|
-
}
|
|
55
|
+
lockState: string
|
|
56
|
+
doorState: string
|
|
57
|
+
moveDetected: boolean
|
|
58
|
+
battery: number
|
|
59
|
+
}
|
|
60
60
|
|
|
61
61
|
export type lockProStatus = deviceStatus & {
|
|
62
|
-
lockState: string
|
|
63
|
-
doorState: string
|
|
64
|
-
moveDetected: boolean
|
|
65
|
-
battery: number
|
|
66
|
-
}
|
|
62
|
+
lockState: string
|
|
63
|
+
doorState: string
|
|
64
|
+
moveDetected: boolean
|
|
65
|
+
battery: number
|
|
66
|
+
}
|
|
67
67
|
|
|
68
68
|
export type motionSensorStatus = deviceStatus & {
|
|
69
|
-
battery: number
|
|
70
|
-
moveDetected: boolean
|
|
71
|
-
brightness: 'bright' | 'dim'
|
|
72
|
-
}
|
|
69
|
+
battery: number
|
|
70
|
+
moveDetected: boolean
|
|
71
|
+
brightness: 'bright' | 'dim'
|
|
72
|
+
}
|
|
73
73
|
|
|
74
74
|
export type contactSensorStatus = deviceStatus & {
|
|
75
|
-
battery: number
|
|
76
|
-
moveDetected: boolean
|
|
77
|
-
openState: 'open' | 'close' | 'timeOutNotClose'
|
|
78
|
-
brightness: 'bright' | 'dim'
|
|
79
|
-
}
|
|
75
|
+
battery: number
|
|
76
|
+
moveDetected: boolean
|
|
77
|
+
openState: 'open' | 'close' | 'timeOutNotClose'
|
|
78
|
+
brightness: 'bright' | 'dim'
|
|
79
|
+
}
|
|
80
80
|
|
|
81
81
|
export type waterLeakDetectorStatus = deviceStatus & {
|
|
82
|
-
battery: number
|
|
83
|
-
status: 0 /*dry*/ | 1 /*leak detected
|
|
84
|
-
}
|
|
82
|
+
battery: number
|
|
83
|
+
status: 0 /* dry */ | 1 /* leak detected */
|
|
84
|
+
}
|
|
85
85
|
|
|
86
86
|
export type ceilingLightStatus = deviceStatus & {
|
|
87
|
-
power: boolean
|
|
88
|
-
brightness: number
|
|
89
|
-
colorTemperature: number
|
|
90
|
-
}
|
|
87
|
+
power: boolean
|
|
88
|
+
brightness: number
|
|
89
|
+
colorTemperature: number
|
|
90
|
+
}
|
|
91
91
|
|
|
92
92
|
export type ceilingLightProStatus = deviceStatus & {
|
|
93
|
-
power: boolean
|
|
94
|
-
brightness: number
|
|
95
|
-
colorTemperature: number
|
|
96
|
-
}
|
|
93
|
+
power: boolean
|
|
94
|
+
brightness: number
|
|
95
|
+
colorTemperature: number
|
|
96
|
+
}
|
|
97
97
|
|
|
98
98
|
export type plugStatus = deviceStatus & {
|
|
99
|
-
power: string
|
|
100
|
-
version: string
|
|
101
|
-
}
|
|
99
|
+
power: string
|
|
100
|
+
version: string
|
|
101
|
+
}
|
|
102
102
|
|
|
103
103
|
export type plugMiniStatus = deviceStatus & {
|
|
104
|
-
voltage: Float64Array
|
|
105
|
-
weight: Float64Array
|
|
106
|
-
electricityOfDay: number
|
|
107
|
-
electricCurrent: Float64Array
|
|
108
|
-
power: string
|
|
109
|
-
}
|
|
104
|
+
voltage: Float64Array
|
|
105
|
+
weight: Float64Array
|
|
106
|
+
electricityOfDay: number
|
|
107
|
+
electricCurrent: Float64Array
|
|
108
|
+
power: string
|
|
109
|
+
}
|
|
110
110
|
|
|
111
111
|
export type stripLightStatus = deviceStatus & {
|
|
112
|
-
power: string
|
|
113
|
-
brightness: number
|
|
114
|
-
color: string
|
|
115
|
-
}
|
|
112
|
+
power: string
|
|
113
|
+
brightness: number
|
|
114
|
+
color: string
|
|
115
|
+
}
|
|
116
116
|
|
|
117
117
|
export type colorBulbStatus = deviceStatus & {
|
|
118
|
-
power: string
|
|
119
|
-
brightness: number
|
|
120
|
-
color: string
|
|
121
|
-
colorTemperature: number
|
|
122
|
-
}
|
|
118
|
+
power: string
|
|
119
|
+
brightness: number
|
|
120
|
+
color: string
|
|
121
|
+
colorTemperature: number
|
|
122
|
+
}
|
|
123
123
|
|
|
124
124
|
export type robotVacuumCleanerS1Status = deviceStatus & {
|
|
125
|
-
workingStatus: string
|
|
126
|
-
onlineStatus: string
|
|
127
|
-
battery: number
|
|
128
|
-
}
|
|
125
|
+
workingStatus: string
|
|
126
|
+
onlineStatus: string
|
|
127
|
+
battery: number
|
|
128
|
+
}
|
|
129
129
|
|
|
130
130
|
export type robotVacuumCleanerS1PlusStatus = deviceStatus & {
|
|
131
|
-
workingStatus: string
|
|
132
|
-
onlineStatus: string
|
|
133
|
-
battery: number
|
|
134
|
-
}
|
|
131
|
+
workingStatus: string
|
|
132
|
+
onlineStatus: string
|
|
133
|
+
battery: number
|
|
134
|
+
}
|
|
135
135
|
|
|
136
136
|
export type floorCleaningRobotS10Status = deviceStatus & {
|
|
137
|
-
workingStatus: string
|
|
138
|
-
onlineStatus: string
|
|
139
|
-
battery: number
|
|
140
|
-
waterBaseBattery: number
|
|
141
|
-
taskType: string
|
|
142
|
-
}
|
|
137
|
+
workingStatus: string
|
|
138
|
+
onlineStatus: string
|
|
139
|
+
battery: number
|
|
140
|
+
waterBaseBattery: number
|
|
141
|
+
taskType: string
|
|
142
|
+
}
|
|
143
143
|
|
|
144
144
|
export type humidifierStatus = deviceStatus & {
|
|
145
|
-
power: string
|
|
146
|
-
humidity: number
|
|
147
|
-
temperature: number
|
|
148
|
-
nebulizationEfficiency: number
|
|
149
|
-
auto: boolean
|
|
150
|
-
childLock: boolean
|
|
151
|
-
sound: boolean
|
|
152
|
-
lackWater: boolean
|
|
153
|
-
}
|
|
145
|
+
power: string
|
|
146
|
+
humidity: number
|
|
147
|
+
temperature: number
|
|
148
|
+
nebulizationEfficiency: number
|
|
149
|
+
auto: boolean
|
|
150
|
+
childLock: boolean
|
|
151
|
+
sound: boolean
|
|
152
|
+
lackWater: boolean
|
|
153
|
+
}
|
|
154
154
|
|
|
155
155
|
export type blindTiltStatus = deviceStatus & {
|
|
156
|
-
calibrate: boolean
|
|
157
|
-
battery: number
|
|
158
|
-
direction: string
|
|
159
|
-
slidePosition: string
|
|
160
|
-
lightLevel?: 'bright' | 'dim'
|
|
161
|
-
}
|
|
156
|
+
calibrate: boolean
|
|
157
|
+
battery: number
|
|
158
|
+
direction: string
|
|
159
|
+
slidePosition: string
|
|
160
|
+
lightLevel?: 'bright' | 'dim'
|
|
161
|
+
}
|
|
162
162
|
|
|
163
163
|
export type hub2Status = deviceStatus & {
|
|
164
|
-
temperature: number
|
|
165
|
-
lightLevel: number
|
|
166
|
-
humidity: number
|
|
167
|
-
}
|
|
164
|
+
temperature: number
|
|
165
|
+
lightLevel: number
|
|
166
|
+
humidity: number
|
|
167
|
+
}
|
|
168
168
|
|
|
169
169
|
export type batteryCirculatorFanStatus = deviceStatus & {
|
|
170
|
-
mode: 'direct' | 'natural' | 'sleep' | 'baby'
|
|
171
|
-
battery: number
|
|
172
|
-
power: string
|
|
173
|
-
nightStatus: number
|
|
174
|
-
oscillation: string
|
|
175
|
-
verticalOscillation: string
|
|
176
|
-
chargingStatus: string
|
|
177
|
-
fanSpeed: number
|
|
178
|
-
}
|
|
170
|
+
mode: 'direct' | 'natural' | 'sleep' | 'baby'
|
|
171
|
+
battery: number
|
|
172
|
+
power: string
|
|
173
|
+
nightStatus: number
|
|
174
|
+
oscillation: string
|
|
175
|
+
verticalOscillation: string
|
|
176
|
+
chargingStatus: string
|
|
177
|
+
fanSpeed: number
|
|
178
|
+
}
|