tsvesync 1.0.11
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/LICENSE +21 -0
- package/README.md +227 -0
- package/api/vesync/VeSync.yaml +33 -0
- package/api/vesyncbulb/ESL100.yaml +74 -0
- package/api/vesyncbulb/ESL100CW.yaml +123 -0
- package/api/vesyncbulb/ESL100MC.yaml +169 -0
- package/api/vesyncbulb/XYD0001.yaml +193 -0
- package/api/vesyncfan/Classic200S.yaml +280 -0
- package/api/vesyncfan/Classic300S.yaml +278 -0
- package/api/vesyncfan/Core200S.yaml +256 -0
- package/api/vesyncfan/Core300S.yaml +281 -0
- package/api/vesyncfan/Core400S.yaml +281 -0
- package/api/vesyncfan/Core600S.yaml +281 -0
- package/api/vesyncfan/Dual200S.yaml +278 -0
- package/api/vesyncfan/LAP-C201S-AUSR.yaml +256 -0
- package/api/vesyncfan/LAP-C202S-WUSR.yaml +256 -0
- package/api/vesyncfan/LAP-C301S-WAAA.yaml +281 -0
- package/api/vesyncfan/LAP-C301S-WJP.yaml +281 -0
- package/api/vesyncfan/LAP-C302S-WUSB.yaml +281 -0
- package/api/vesyncfan/LAP-C401S-WAAA.yaml +281 -0
- package/api/vesyncfan/LAP-C401S-WJP.yaml +281 -0
- package/api/vesyncfan/LAP-C401S-WUSR.yaml +281 -0
- package/api/vesyncfan/LAP-C601S-WEU.yaml +281 -0
- package/api/vesyncfan/LAP-C601S-WUS.yaml +281 -0
- package/api/vesyncfan/LAP-C601S-WUSR.yaml +281 -0
- package/api/vesyncfan/LAP-EL551S-AEUR.yaml +167 -0
- package/api/vesyncfan/LAP-EL551S-AUS.yaml +167 -0
- package/api/vesyncfan/LAP-EL551S-WEU.yaml +167 -0
- package/api/vesyncfan/LAP-EL551S-WUS.yaml +167 -0
- package/api/vesyncfan/LAP-V102S-AASR.yaml +167 -0
- package/api/vesyncfan/LAP-V102S-AUSR.yaml +167 -0
- package/api/vesyncfan/LAP-V102S-WEU.yaml +167 -0
- package/api/vesyncfan/LAP-V102S-WJP.yaml +167 -0
- package/api/vesyncfan/LAP-V102S-WUS.yaml +167 -0
- package/api/vesyncfan/LAP-V201-AUSR.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-AASR.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-AEUR.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-AUSR.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-WEU.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-WJP.yaml +167 -0
- package/api/vesyncfan/LAP-V201S-WUS.yaml +167 -0
- package/api/vesyncfan/LEH-S601S-WUS.yaml +303 -0
- package/api/vesyncfan/LEH-S601S-WUSR.yaml +82 -0
- package/api/vesyncfan/LTF-F422S-KEU.yaml +165 -0
- package/api/vesyncfan/LTF-F422S-WUS.yaml +165 -0
- package/api/vesyncfan/LTF-F422S-WUSR.yaml +167 -0
- package/api/vesyncfan/LTF-F422_WJP.yaml +165 -0
- package/api/vesyncfan/LUH-A601S-AUSW.yaml +82 -0
- package/api/vesyncfan/LUH-A601S-WUSB.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WEU.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WEUR.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WJP.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WUS.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WUSC.yaml +305 -0
- package/api/vesyncfan/LUH-A602S-WUSR.yaml +305 -0
- package/api/vesyncfan/LUH-D301S-WEU.yaml +305 -0
- package/api/vesyncfan/LUH-D301S-WJP.yaml +305 -0
- package/api/vesyncfan/LUH-D301S-WUSR.yaml +305 -0
- package/api/vesyncfan/LUH-M101S-WUS.yaml +278 -0
- package/api/vesyncfan/LUH-O451S-WEU.yaml +278 -0
- package/api/vesyncfan/LUH-O451S-WUS.yaml +278 -0
- package/api/vesyncfan/LUH-O451S-WUSR.yaml +305 -0
- package/api/vesyncfan/LUH-O601S-KUS.yaml +305 -0
- package/api/vesyncfan/LUH-O601S-WUS.yaml +305 -0
- package/api/vesyncfan/LV-PUR131S.yaml +108 -0
- package/api/vesyncfan/LV-RH131S.yaml +108 -0
- package/api/vesyncoutlet/ESO15-TB.yaml +124 -0
- package/api/vesyncoutlet/ESW01-EU.yaml +122 -0
- package/api/vesyncoutlet/ESW03-USA.yaml +122 -0
- package/api/vesyncoutlet/ESW15-USA.yaml +156 -0
- package/api/vesyncoutlet/wifi-switch-1.3.yaml +60 -0
- package/api/vesyncswitch/ESWD16.yaml +128 -0
- package/api/vesyncswitch/ESWL01.yaml +56 -0
- package/api/vesyncswitch/ESWL03.yaml +56 -0
- package/dist/lib/helpers.d.ts +87 -0
- package/dist/lib/helpers.js +222 -0
- package/dist/lib/helpers.js.map +1 -0
- package/dist/lib/vesync.d.ts +47 -0
- package/dist/lib/vesync.js +309 -0
- package/dist/lib/vesync.js.map +1 -0
- package/dist/lib/vesyncBaseDevice.d.ts +68 -0
- package/dist/lib/vesyncBaseDevice.js +116 -0
- package/dist/lib/vesyncBaseDevice.js.map +1 -0
- package/dist/lib/vesyncBulb.d.ts +0 -0
- package/dist/lib/vesyncBulb.js +2 -0
- package/dist/lib/vesyncBulb.js.map +1 -0
- package/dist/lib/vesyncFan.d.ts +92 -0
- package/dist/lib/vesyncFan.js +265 -0
- package/dist/lib/vesyncFan.js.map +1 -0
- package/dist/lib/vesyncKitchen.d.ts +0 -0
- package/dist/lib/vesyncKitchen.js +2 -0
- package/dist/lib/vesyncKitchen.js.map +1 -0
- package/dist/lib/vesyncOutlet.d.ts +0 -0
- package/dist/lib/vesyncOutlet.js +2 -0
- package/dist/lib/vesyncOutlet.js.map +1 -0
- package/dist/lib/vesyncSwitch.d.ts +0 -0
- package/dist/lib/vesyncSwitch.js +2 -0
- package/dist/lib/vesyncSwitch.js.map +1 -0
- package/dist/src/lib/helpers.d.ts +88 -0
- package/dist/src/lib/helpers.js +244 -0
- package/dist/src/lib/vesync.d.ts +89 -0
- package/dist/src/lib/vesync.js +430 -0
- package/dist/src/lib/vesyncBaseDevice.d.ts +43 -0
- package/dist/src/lib/vesyncBaseDevice.js +87 -0
- package/dist/src/lib/vesyncBulb.d.ts +79 -0
- package/dist/src/lib/vesyncBulb.js +198 -0
- package/dist/src/lib/vesyncBulbImpl.d.ts +38 -0
- package/dist/src/lib/vesyncBulbImpl.js +161 -0
- package/dist/src/lib/vesyncFan.d.ts +80 -0
- package/dist/src/lib/vesyncFan.js +406 -0
- package/dist/src/lib/vesyncFanImpl.d.ts +137 -0
- package/dist/src/lib/vesyncFanImpl.js +643 -0
- package/dist/src/lib/vesyncOutlet.d.ts +53 -0
- package/dist/src/lib/vesyncOutlet.js +98 -0
- package/dist/src/lib/vesyncOutletImpl.d.ts +70 -0
- package/dist/src/lib/vesyncOutletImpl.js +206 -0
- package/dist/src/lib/vesyncSwitch.d.ts +169 -0
- package/dist/src/lib/vesyncSwitch.js +414 -0
- package/dist/src/lib/vesyncSwitchImpl.d.ts +82 -0
- package/dist/src/lib/vesyncSwitchImpl.js +290 -0
- package/dist/test/testFeatures.d.ts +4 -0
- package/dist/test/testFeatures.js +394 -0
- package/dist/test/testService.d.ts +62 -0
- package/dist/test/testService.js +540 -0
- package/dist/test/testSpecial.d.ts +5 -0
- package/dist/test/testSpecial.js +227 -0
- package/package.json +53 -0
- package/src/lib/helpers.ts +290 -0
- package/src/lib/vesync.ts +530 -0
- package/src/lib/vesyncBaseDevice.ts +114 -0
- package/src/lib/vesyncBulb.ts +252 -0
- package/src/lib/vesyncBulbImpl.ts +215 -0
- package/src/lib/vesyncFan.ts +447 -0
- package/src/lib/vesyncFanImpl.ts +848 -0
- package/src/lib/vesyncOutlet.ts +148 -0
- package/src/lib/vesyncOutletImpl.ts +284 -0
- package/src/lib/vesyncSwitch.ts +546 -0
- package/src/lib/vesyncSwitchImpl.ts +408 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2024 Mick Giles
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/README.md
ADDED
|
@@ -0,0 +1,227 @@
|
|
|
1
|
+
# TSVeSync
|
|
2
|
+
|
|
3
|
+
A TypeScript library for interacting with VeSync smart home devices. This library provides a modern, type-safe interface for controlling VeSync devices including air purifiers, outlets, and switches.
|
|
4
|
+
|
|
5
|
+
## Features
|
|
6
|
+
|
|
7
|
+
- Full TypeScript support with type definitions
|
|
8
|
+
- Support for multiple device types:
|
|
9
|
+
- Air Purifiers (Core200S, Core300S, Core400S, Core600S, LV-PUR131S, Vital100S, Vital200S, EverestAir)
|
|
10
|
+
- Humidifiers (Classic300S, Classic200S, Dual200S, LV600S, OasisMist series, Superior6000S)
|
|
11
|
+
- Smart Bulbs (ESL100, ESL100CW, ESL100MC, XYD0001)
|
|
12
|
+
- Outlets (15A, 10A, 7A models)
|
|
13
|
+
- Smart Tower Fans (LTF-F422S series)
|
|
14
|
+
- Real-time device status and control
|
|
15
|
+
- Energy monitoring for supported devices
|
|
16
|
+
- Air quality monitoring for supported purifiers
|
|
17
|
+
- Humidity control for supported humidifiers
|
|
18
|
+
- RGB and color temperature control for smart bulbs
|
|
19
|
+
- Fan speed and mode control
|
|
20
|
+
- Comprehensive error handling
|
|
21
|
+
- Modern async/await API
|
|
22
|
+
|
|
23
|
+
## Supported Devices
|
|
24
|
+
|
|
25
|
+
### Air Purifiers
|
|
26
|
+
- Core200S
|
|
27
|
+
- Features: Sleep mode, Manual mode, Filter life monitoring
|
|
28
|
+
- Fan speeds: 1-3
|
|
29
|
+
- Core300S
|
|
30
|
+
- Features: Auto mode, Sleep mode, Manual mode, Air quality monitoring
|
|
31
|
+
- Fan speeds: 1-4
|
|
32
|
+
- Core400S
|
|
33
|
+
- Features: Auto mode, Sleep mode, Manual mode, Air quality monitoring
|
|
34
|
+
- Fan speeds: 1-4
|
|
35
|
+
- Core600S
|
|
36
|
+
- Features: Auto mode, Sleep mode, Manual mode, Air quality monitoring
|
|
37
|
+
- Fan speeds: 1-4
|
|
38
|
+
- LV-PUR131S
|
|
39
|
+
- Features: Air quality monitoring
|
|
40
|
+
- Vital100S
|
|
41
|
+
- Features: Air quality monitoring, Pet mode
|
|
42
|
+
- Modes: Manual, Auto, Sleep, Pet
|
|
43
|
+
- Fan speeds: 1-4
|
|
44
|
+
- Vital200S
|
|
45
|
+
- Features: Air quality monitoring, Pet mode
|
|
46
|
+
- Modes: Manual, Auto, Sleep, Pet
|
|
47
|
+
- Fan speeds: 1-4
|
|
48
|
+
- EverestAir
|
|
49
|
+
- Features: Air quality monitoring, Fan rotation, Turbo mode
|
|
50
|
+
- Modes: Manual, Auto, Sleep, Turbo
|
|
51
|
+
- Fan speeds: 1-3
|
|
52
|
+
|
|
53
|
+
### Humidifiers
|
|
54
|
+
- Classic300S
|
|
55
|
+
- Features: Nightlight
|
|
56
|
+
- Modes: Auto, Sleep, Manual
|
|
57
|
+
- Mist levels: 1-9
|
|
58
|
+
- Classic200S
|
|
59
|
+
- Modes: Auto, Manual
|
|
60
|
+
- Mist levels: 1-9
|
|
61
|
+
- Dual200S
|
|
62
|
+
- Modes: Auto, Manual
|
|
63
|
+
- Mist levels: 1-2
|
|
64
|
+
- LV600S
|
|
65
|
+
- Features: Warm mist, Nightlight
|
|
66
|
+
- Modes: Humidity, Sleep, Manual
|
|
67
|
+
- Mist levels: 1-9
|
|
68
|
+
- Warm mist levels: 0-3
|
|
69
|
+
- OasisMist (EU)
|
|
70
|
+
- Features: Warm mist, Nightlight
|
|
71
|
+
- Modes: Auto, Manual
|
|
72
|
+
- Mist levels: 1-9
|
|
73
|
+
- Warm mist levels: 0-3
|
|
74
|
+
- OasisMist (US)
|
|
75
|
+
- Features: Warm mist
|
|
76
|
+
- Modes: Auto, Humidity, Sleep, Manual
|
|
77
|
+
- Mist levels: 1-9
|
|
78
|
+
- Warm mist levels: 0-3
|
|
79
|
+
- OasisMist1000S
|
|
80
|
+
- Modes: Auto, Sleep, Manual
|
|
81
|
+
- Mist levels: 1-9
|
|
82
|
+
- Superior6000S
|
|
83
|
+
- Modes: Auto, Humidity, Sleep, Manual
|
|
84
|
+
- Mist levels: 1-9
|
|
85
|
+
|
|
86
|
+
### Smart Bulbs
|
|
87
|
+
- ESL100
|
|
88
|
+
- Features: Basic white light
|
|
89
|
+
- Brightness control
|
|
90
|
+
- ESL100CW
|
|
91
|
+
- Features: Tunable white light
|
|
92
|
+
- Brightness control
|
|
93
|
+
- Color temperature control (warm to cool white)
|
|
94
|
+
- ESL100MC
|
|
95
|
+
- Features: Full RGB color
|
|
96
|
+
- White and color modes
|
|
97
|
+
- Brightness control
|
|
98
|
+
- RGB color control
|
|
99
|
+
- XYD0001
|
|
100
|
+
- Features: Full RGB color with HSV control
|
|
101
|
+
- White and color modes
|
|
102
|
+
- Brightness control
|
|
103
|
+
- Color temperature control
|
|
104
|
+
- HSV (Hue, Saturation, Value) color control
|
|
105
|
+
|
|
106
|
+
### Outlets
|
|
107
|
+
- 15A Outlet (ESO15-TB)
|
|
108
|
+
- Power monitoring
|
|
109
|
+
- Energy usage tracking (daily/weekly/monthly/yearly)
|
|
110
|
+
- Voltage monitoring
|
|
111
|
+
- Outdoor rated
|
|
112
|
+
- 15A Outlet (ESW15-USA)
|
|
113
|
+
- Power monitoring
|
|
114
|
+
- Energy usage tracking (daily/weekly/monthly/yearly)
|
|
115
|
+
- Voltage monitoring
|
|
116
|
+
- 10A Outlet (ESW03-USA)
|
|
117
|
+
- Power monitoring
|
|
118
|
+
- Energy usage tracking (daily/weekly/monthly/yearly)
|
|
119
|
+
- Voltage monitoring
|
|
120
|
+
- 10A Outlet (ESW01-EU)
|
|
121
|
+
- Power monitoring
|
|
122
|
+
- Energy usage tracking (daily/weekly/monthly/yearly)
|
|
123
|
+
- Voltage monitoring
|
|
124
|
+
- 7A Outlet (wifi-switch-1.3)
|
|
125
|
+
- Energy usage tracking (daily/weekly/monthly/yearly)
|
|
126
|
+
|
|
127
|
+
### Smart Tower Fan
|
|
128
|
+
- LTF-F422S Series
|
|
129
|
+
- Features: Fan speed control
|
|
130
|
+
- Modes: Normal, Auto, Advanced Sleep, Turbo
|
|
131
|
+
- Fan speeds: 1-12
|
|
132
|
+
|
|
133
|
+
## Installation
|
|
134
|
+
|
|
135
|
+
```bash
|
|
136
|
+
npm install tsvesync
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
## Usage
|
|
140
|
+
|
|
141
|
+
### Basic Setup
|
|
142
|
+
|
|
143
|
+
```typescript
|
|
144
|
+
import { VeSync } from 'tsvesync';
|
|
145
|
+
|
|
146
|
+
// Create a VeSync manager instance
|
|
147
|
+
const manager = new VeSync(username, password);
|
|
148
|
+
|
|
149
|
+
// Login
|
|
150
|
+
await manager.login();
|
|
151
|
+
|
|
152
|
+
// Get all devices
|
|
153
|
+
await manager.getDevices();
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Working with Devices
|
|
157
|
+
|
|
158
|
+
```typescript
|
|
159
|
+
// Get device status
|
|
160
|
+
for (const device of manager.devices) {
|
|
161
|
+
await device.update();
|
|
162
|
+
console.log(`${device.deviceName}: ${device.deviceStatus}`);
|
|
163
|
+
}
|
|
164
|
+
|
|
165
|
+
// Control an air purifier
|
|
166
|
+
const fan = manager.devices.find(d => d.deviceType === 'Core300S');
|
|
167
|
+
if (fan) {
|
|
168
|
+
await fan.setMode('auto'); // Available modes: auto, sleep, manual
|
|
169
|
+
await fan.setSpeed(2); // Speed range depends on model
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
// Control an outlet
|
|
173
|
+
const outlet = manager.devices.find(d => d.deviceType === 'ESO15-TB');
|
|
174
|
+
if (outlet) {
|
|
175
|
+
await outlet.turnOn();
|
|
176
|
+
const energy = await outlet.getEnergyUsage();
|
|
177
|
+
console.log('Current power usage:', energy.power, 'W');
|
|
178
|
+
}
|
|
179
|
+
```
|
|
180
|
+
|
|
181
|
+
## Environment Variables
|
|
182
|
+
|
|
183
|
+
The library supports configuration through environment variables:
|
|
184
|
+
|
|
185
|
+
```env
|
|
186
|
+
VESYNC_USERNAME=your_email@example.com
|
|
187
|
+
VESYNC_PASSWORD=your_password
|
|
188
|
+
VESYNC_API_URL=https://smartapi.vesync.com # Optional, defaults to standard API URL
|
|
189
|
+
```
|
|
190
|
+
|
|
191
|
+
## Testing
|
|
192
|
+
|
|
193
|
+
The project includes a comprehensive test suite:
|
|
194
|
+
|
|
195
|
+
```bash
|
|
196
|
+
# Run the standard test suite
|
|
197
|
+
npm test
|
|
198
|
+
|
|
199
|
+
# Run the special device test (requires .env configuration)
|
|
200
|
+
npx ts-node test/testSpecial.ts
|
|
201
|
+
```
|
|
202
|
+
|
|
203
|
+
## Development
|
|
204
|
+
|
|
205
|
+
### Building
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
npm run build
|
|
209
|
+
```
|
|
210
|
+
|
|
211
|
+
### Linting
|
|
212
|
+
|
|
213
|
+
```bash
|
|
214
|
+
npm run lint
|
|
215
|
+
```
|
|
216
|
+
|
|
217
|
+
## Contributing
|
|
218
|
+
|
|
219
|
+
Contributions are welcome! Please feel free to submit a Pull Request.
|
|
220
|
+
|
|
221
|
+
## License
|
|
222
|
+
|
|
223
|
+
MIT
|
|
224
|
+
|
|
225
|
+
## Acknowledgments
|
|
226
|
+
|
|
227
|
+
This project is inspired by the PyVeSync Python library and aims to provide similar functionality for TypeScript/JavaScript developers.
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
get_devices:
|
|
2
|
+
headers:
|
|
3
|
+
Content-Type: application/json; charset=UTF-8
|
|
4
|
+
User-Agent: okhttp/3.12.1
|
|
5
|
+
json_object:
|
|
6
|
+
acceptLanguage: en
|
|
7
|
+
accountID: sample_id
|
|
8
|
+
appVersion: 2.8.6
|
|
9
|
+
method: devices
|
|
10
|
+
pageNo: '1'
|
|
11
|
+
pageSize: '100'
|
|
12
|
+
phoneBrand: SM N9005
|
|
13
|
+
phoneOS: Android
|
|
14
|
+
timeZone: America/New_York
|
|
15
|
+
token: sample_tk
|
|
16
|
+
traceId: TRACE_ID
|
|
17
|
+
method: post
|
|
18
|
+
url: /cloud/v1/deviceManaged/devices
|
|
19
|
+
login:
|
|
20
|
+
json_object:
|
|
21
|
+
acceptLanguage: en
|
|
22
|
+
appVersion: 2.8.6
|
|
23
|
+
devToken: ''
|
|
24
|
+
email: EMAIL
|
|
25
|
+
method: login
|
|
26
|
+
password: PASSWORD
|
|
27
|
+
phoneBrand: SM N9005
|
|
28
|
+
phoneOS: Android
|
|
29
|
+
timeZone: America/New_York
|
|
30
|
+
traceId: TRACE_ID
|
|
31
|
+
userType: '1'
|
|
32
|
+
method: post
|
|
33
|
+
url: /cloud/v1/user/login
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
set_brightness:
|
|
2
|
+
headers:
|
|
3
|
+
accept-language: en
|
|
4
|
+
accountId: sample_id
|
|
5
|
+
appVersion: 2.8.6
|
|
6
|
+
content-type: application/json
|
|
7
|
+
tk: sample_tk
|
|
8
|
+
tz: America/New_York
|
|
9
|
+
json_object:
|
|
10
|
+
acceptLanguage: en
|
|
11
|
+
accountID: sample_id
|
|
12
|
+
brightNess: '50'
|
|
13
|
+
status: 'on'
|
|
14
|
+
timeZone: America/New_York
|
|
15
|
+
token: sample_tk
|
|
16
|
+
uuid: ESL100-UUID
|
|
17
|
+
method: put
|
|
18
|
+
url: /SmartBulb/v1/device/updateBrightness
|
|
19
|
+
turn_off:
|
|
20
|
+
headers:
|
|
21
|
+
accept-language: en
|
|
22
|
+
accountId: sample_id
|
|
23
|
+
appVersion: 2.8.6
|
|
24
|
+
content-type: application/json
|
|
25
|
+
tk: sample_tk
|
|
26
|
+
tz: America/New_York
|
|
27
|
+
json_object:
|
|
28
|
+
acceptLanguage: en
|
|
29
|
+
accountID: sample_id
|
|
30
|
+
status: 'off'
|
|
31
|
+
timeZone: America/New_York
|
|
32
|
+
token: sample_tk
|
|
33
|
+
uuid: ESL100-UUID
|
|
34
|
+
method: put
|
|
35
|
+
url: /SmartBulb/v1/device/devicestatus
|
|
36
|
+
turn_on:
|
|
37
|
+
headers:
|
|
38
|
+
accept-language: en
|
|
39
|
+
accountId: sample_id
|
|
40
|
+
appVersion: 2.8.6
|
|
41
|
+
content-type: application/json
|
|
42
|
+
tk: sample_tk
|
|
43
|
+
tz: America/New_York
|
|
44
|
+
json_object:
|
|
45
|
+
acceptLanguage: en
|
|
46
|
+
accountID: sample_id
|
|
47
|
+
status: 'on'
|
|
48
|
+
timeZone: America/New_York
|
|
49
|
+
token: sample_tk
|
|
50
|
+
uuid: ESL100-UUID
|
|
51
|
+
method: put
|
|
52
|
+
url: /SmartBulb/v1/device/devicestatus
|
|
53
|
+
update:
|
|
54
|
+
headers:
|
|
55
|
+
accept-language: en
|
|
56
|
+
accountId: sample_id
|
|
57
|
+
appVersion: 2.8.6
|
|
58
|
+
content-type: application/json
|
|
59
|
+
tk: sample_tk
|
|
60
|
+
tz: America/New_York
|
|
61
|
+
json_object:
|
|
62
|
+
acceptLanguage: en
|
|
63
|
+
accountID: sample_id
|
|
64
|
+
appVersion: 2.8.6
|
|
65
|
+
method: devicedetail
|
|
66
|
+
mobileId: '1234567890123456'
|
|
67
|
+
phoneBrand: SM N9005
|
|
68
|
+
phoneOS: Android
|
|
69
|
+
timeZone: America/New_York
|
|
70
|
+
token: sample_tk
|
|
71
|
+
traceId: TRACE_ID
|
|
72
|
+
uuid: ESL100-UUID
|
|
73
|
+
method: post
|
|
74
|
+
url: /SmartBulb/v1/device/devicedetail
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
set_brightness:
|
|
2
|
+
headers:
|
|
3
|
+
accept-language: en
|
|
4
|
+
accountId: sample_id
|
|
5
|
+
appVersion: 2.8.6
|
|
6
|
+
content-type: application/json
|
|
7
|
+
tk: sample_tk
|
|
8
|
+
tz: America/New_York
|
|
9
|
+
json_object:
|
|
10
|
+
acceptLanguage: en
|
|
11
|
+
accountID: sample_id
|
|
12
|
+
appVersion: 2.8.6
|
|
13
|
+
cid: ESL100CW-CID
|
|
14
|
+
configModule: ConfigModule
|
|
15
|
+
jsonCmd:
|
|
16
|
+
light:
|
|
17
|
+
brightness: 50
|
|
18
|
+
method: bypass
|
|
19
|
+
phoneBrand: SM N9005
|
|
20
|
+
phoneOS: Android
|
|
21
|
+
timeZone: America/New_York
|
|
22
|
+
token: sample_tk
|
|
23
|
+
traceId: TRACE_ID
|
|
24
|
+
method: post
|
|
25
|
+
url: /cloud/v1/deviceManaged/bypass
|
|
26
|
+
set_color_temp:
|
|
27
|
+
headers:
|
|
28
|
+
accept-language: en
|
|
29
|
+
accountId: sample_id
|
|
30
|
+
appVersion: 2.8.6
|
|
31
|
+
content-type: application/json
|
|
32
|
+
tk: sample_tk
|
|
33
|
+
tz: America/New_York
|
|
34
|
+
json_object:
|
|
35
|
+
acceptLanguage: en
|
|
36
|
+
accountID: sample_id
|
|
37
|
+
appVersion: 2.8.6
|
|
38
|
+
cid: ESL100CW-CID
|
|
39
|
+
jsonCmd:
|
|
40
|
+
light:
|
|
41
|
+
colorTempe: 50
|
|
42
|
+
method: bypass
|
|
43
|
+
phoneBrand: SM N9005
|
|
44
|
+
phoneOS: Android
|
|
45
|
+
timeZone: America/New_York
|
|
46
|
+
token: sample_tk
|
|
47
|
+
traceId: TRACE_ID
|
|
48
|
+
method: post
|
|
49
|
+
url: /cloud/v1/deviceManaged/bypass
|
|
50
|
+
turn_off:
|
|
51
|
+
headers:
|
|
52
|
+
accept-language: en
|
|
53
|
+
accountId: sample_id
|
|
54
|
+
appVersion: 2.8.6
|
|
55
|
+
content-type: application/json
|
|
56
|
+
tk: sample_tk
|
|
57
|
+
tz: America/New_York
|
|
58
|
+
json_object:
|
|
59
|
+
acceptLanguage: en
|
|
60
|
+
accountID: sample_id
|
|
61
|
+
appVersion: 2.8.6
|
|
62
|
+
cid: ESL100CW-CID
|
|
63
|
+
configModule: ConfigModule
|
|
64
|
+
jsonCmd:
|
|
65
|
+
light:
|
|
66
|
+
action: 'off'
|
|
67
|
+
method: bypass
|
|
68
|
+
phoneBrand: SM N9005
|
|
69
|
+
phoneOS: Android
|
|
70
|
+
timeZone: America/New_York
|
|
71
|
+
token: sample_tk
|
|
72
|
+
traceId: TRACE_ID
|
|
73
|
+
method: post
|
|
74
|
+
url: /cloud/v1/deviceManaged/bypass
|
|
75
|
+
turn_on:
|
|
76
|
+
headers:
|
|
77
|
+
accept-language: en
|
|
78
|
+
accountId: sample_id
|
|
79
|
+
appVersion: 2.8.6
|
|
80
|
+
content-type: application/json
|
|
81
|
+
tk: sample_tk
|
|
82
|
+
tz: America/New_York
|
|
83
|
+
json_object:
|
|
84
|
+
acceptLanguage: en
|
|
85
|
+
accountID: sample_id
|
|
86
|
+
appVersion: 2.8.6
|
|
87
|
+
cid: ESL100CW-CID
|
|
88
|
+
configModule: ConfigModule
|
|
89
|
+
jsonCmd:
|
|
90
|
+
light:
|
|
91
|
+
action: 'on'
|
|
92
|
+
method: bypass
|
|
93
|
+
phoneBrand: SM N9005
|
|
94
|
+
phoneOS: Android
|
|
95
|
+
timeZone: America/New_York
|
|
96
|
+
token: sample_tk
|
|
97
|
+
traceId: TRACE_ID
|
|
98
|
+
method: post
|
|
99
|
+
url: /cloud/v1/deviceManaged/bypass
|
|
100
|
+
update:
|
|
101
|
+
headers:
|
|
102
|
+
accept-language: en
|
|
103
|
+
accountId: sample_id
|
|
104
|
+
appVersion: 2.8.6
|
|
105
|
+
content-type: application/json
|
|
106
|
+
tk: sample_tk
|
|
107
|
+
tz: America/New_York
|
|
108
|
+
json_object:
|
|
109
|
+
acceptLanguage: en
|
|
110
|
+
accountID: sample_id
|
|
111
|
+
appVersion: 2.8.6
|
|
112
|
+
cid: ESL100CW-CID
|
|
113
|
+
configModule: ConfigModule
|
|
114
|
+
jsonCmd:
|
|
115
|
+
getLightStatus: get
|
|
116
|
+
method: bypass
|
|
117
|
+
phoneBrand: SM N9005
|
|
118
|
+
phoneOS: Android
|
|
119
|
+
timeZone: America/New_York
|
|
120
|
+
token: sample_tk
|
|
121
|
+
traceId: TRACE_ID
|
|
122
|
+
method: post
|
|
123
|
+
url: /cloud/v1/deviceManaged/bypass
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
enable_white_mode:
|
|
2
|
+
headers:
|
|
3
|
+
Content-Type: application/json; charset=UTF-8
|
|
4
|
+
User-Agent: okhttp/3.12.1
|
|
5
|
+
json_object:
|
|
6
|
+
acceptLanguage: en
|
|
7
|
+
accountID: sample_id
|
|
8
|
+
appVersion: 2.8.6
|
|
9
|
+
cid: ESL100MC-CID
|
|
10
|
+
configModule: ConfigModule
|
|
11
|
+
debugMode: false
|
|
12
|
+
deviceRegion: US
|
|
13
|
+
method: bypassV2
|
|
14
|
+
payload:
|
|
15
|
+
data:
|
|
16
|
+
action: 'on'
|
|
17
|
+
blue: 0
|
|
18
|
+
brightness: 100
|
|
19
|
+
colorMode: white
|
|
20
|
+
green: 0
|
|
21
|
+
red: 0
|
|
22
|
+
speed: 0
|
|
23
|
+
method: setLightStatus
|
|
24
|
+
source: APP
|
|
25
|
+
phoneBrand: SM N9005
|
|
26
|
+
phoneOS: Android
|
|
27
|
+
timeZone: America/New_York
|
|
28
|
+
token: sample_tk
|
|
29
|
+
traceId: TRACE_ID
|
|
30
|
+
method: post
|
|
31
|
+
url: /cloud/v2/deviceManaged/bypassV2
|
|
32
|
+
set_brightness:
|
|
33
|
+
headers:
|
|
34
|
+
Content-Type: application/json; charset=UTF-8
|
|
35
|
+
User-Agent: okhttp/3.12.1
|
|
36
|
+
json_object:
|
|
37
|
+
acceptLanguage: en
|
|
38
|
+
accountID: sample_id
|
|
39
|
+
appVersion: 2.8.6
|
|
40
|
+
cid: ESL100MC-CID
|
|
41
|
+
configModule: ConfigModule
|
|
42
|
+
debugMode: false
|
|
43
|
+
deviceRegion: US
|
|
44
|
+
method: bypassV2
|
|
45
|
+
payload:
|
|
46
|
+
data:
|
|
47
|
+
action: 'on'
|
|
48
|
+
blue: 0
|
|
49
|
+
brightness: 50
|
|
50
|
+
colorMode: white
|
|
51
|
+
green: 0
|
|
52
|
+
red: 0
|
|
53
|
+
speed: 0
|
|
54
|
+
method: setLightStatus
|
|
55
|
+
source: APP
|
|
56
|
+
phoneBrand: SM N9005
|
|
57
|
+
phoneOS: Android
|
|
58
|
+
timeZone: America/New_York
|
|
59
|
+
token: sample_tk
|
|
60
|
+
traceId: TRACE_ID
|
|
61
|
+
method: post
|
|
62
|
+
url: /cloud/v2/deviceManaged/bypassV2
|
|
63
|
+
set_rgb:
|
|
64
|
+
headers:
|
|
65
|
+
Content-Type: application/json; charset=UTF-8
|
|
66
|
+
User-Agent: okhttp/3.12.1
|
|
67
|
+
json_object:
|
|
68
|
+
acceptLanguage: en
|
|
69
|
+
accountID: sample_id
|
|
70
|
+
appVersion: 2.8.6
|
|
71
|
+
cid: ESL100MC-CID
|
|
72
|
+
configModule: ConfigModule
|
|
73
|
+
debugMode: false
|
|
74
|
+
deviceRegion: US
|
|
75
|
+
method: bypassV2
|
|
76
|
+
payload:
|
|
77
|
+
data:
|
|
78
|
+
action: 'on'
|
|
79
|
+
blue: 255
|
|
80
|
+
brightness: 100
|
|
81
|
+
colorMode: color
|
|
82
|
+
green: 200
|
|
83
|
+
red: 50
|
|
84
|
+
speed: 0
|
|
85
|
+
method: setLightStatus
|
|
86
|
+
source: APP
|
|
87
|
+
phoneBrand: SM N9005
|
|
88
|
+
phoneOS: Android
|
|
89
|
+
timeZone: America/New_York
|
|
90
|
+
token: sample_tk
|
|
91
|
+
traceId: TRACE_ID
|
|
92
|
+
method: post
|
|
93
|
+
url: /cloud/v2/deviceManaged/bypassV2
|
|
94
|
+
turn_off:
|
|
95
|
+
headers:
|
|
96
|
+
Content-Type: application/json; charset=UTF-8
|
|
97
|
+
User-Agent: okhttp/3.12.1
|
|
98
|
+
json_object:
|
|
99
|
+
acceptLanguage: en
|
|
100
|
+
accountID: sample_id
|
|
101
|
+
appVersion: 2.8.6
|
|
102
|
+
cid: ESL100MC-CID
|
|
103
|
+
configModule: ConfigModule
|
|
104
|
+
debugMode: false
|
|
105
|
+
deviceRegion: US
|
|
106
|
+
method: bypassV2
|
|
107
|
+
payload:
|
|
108
|
+
data:
|
|
109
|
+
enabled: false
|
|
110
|
+
id: 0
|
|
111
|
+
method: setSwitch
|
|
112
|
+
source: APP
|
|
113
|
+
phoneBrand: SM N9005
|
|
114
|
+
phoneOS: Android
|
|
115
|
+
timeZone: America/New_York
|
|
116
|
+
token: sample_tk
|
|
117
|
+
traceId: TRACE_ID
|
|
118
|
+
method: post
|
|
119
|
+
url: /cloud/v2/deviceManaged/bypassV2
|
|
120
|
+
turn_on:
|
|
121
|
+
headers:
|
|
122
|
+
Content-Type: application/json; charset=UTF-8
|
|
123
|
+
User-Agent: okhttp/3.12.1
|
|
124
|
+
json_object:
|
|
125
|
+
acceptLanguage: en
|
|
126
|
+
accountID: sample_id
|
|
127
|
+
appVersion: 2.8.6
|
|
128
|
+
cid: ESL100MC-CID
|
|
129
|
+
configModule: ConfigModule
|
|
130
|
+
debugMode: false
|
|
131
|
+
deviceRegion: US
|
|
132
|
+
method: bypassV2
|
|
133
|
+
payload:
|
|
134
|
+
data:
|
|
135
|
+
enabled: true
|
|
136
|
+
id: 0
|
|
137
|
+
method: setSwitch
|
|
138
|
+
source: APP
|
|
139
|
+
phoneBrand: SM N9005
|
|
140
|
+
phoneOS: Android
|
|
141
|
+
timeZone: America/New_York
|
|
142
|
+
token: sample_tk
|
|
143
|
+
traceId: TRACE_ID
|
|
144
|
+
method: post
|
|
145
|
+
url: /cloud/v2/deviceManaged/bypassV2
|
|
146
|
+
update:
|
|
147
|
+
headers:
|
|
148
|
+
Content-Type: application/json; charset=UTF-8
|
|
149
|
+
User-Agent: okhttp/3.12.1
|
|
150
|
+
json_object:
|
|
151
|
+
acceptLanguage: en
|
|
152
|
+
accountID: sample_id
|
|
153
|
+
appVersion: 2.8.6
|
|
154
|
+
cid: ESL100MC-CID
|
|
155
|
+
configModule: ConfigModule
|
|
156
|
+
debugMode: false
|
|
157
|
+
deviceRegion: US
|
|
158
|
+
method: bypassV2
|
|
159
|
+
payload:
|
|
160
|
+
data: {}
|
|
161
|
+
method: getLightStatus
|
|
162
|
+
source: APP
|
|
163
|
+
phoneBrand: SM N9005
|
|
164
|
+
phoneOS: Android
|
|
165
|
+
timeZone: America/New_York
|
|
166
|
+
token: sample_tk
|
|
167
|
+
traceId: TRACE_ID
|
|
168
|
+
method: post
|
|
169
|
+
url: /cloud/v2/deviceManaged/bypassV2
|