homebridge-tsvesync 1.0.67 → 1.0.69
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/.clinerules +135 -0
- package/CHANGELOG.md +49 -27
- package/config.schema.json +91 -150
- package/dist/accessories/base.accessory.d.ts +3 -0
- package/dist/accessories/base.accessory.d.ts.map +1 -1
- package/dist/accessories/base.accessory.js +69 -5
- package/dist/accessories/base.accessory.js.map +1 -1
- package/dist/accessories/humidifier.accessory.d.ts +39 -1
- package/dist/accessories/humidifier.accessory.d.ts.map +1 -1
- package/dist/accessories/humidifier.accessory.js +631 -95
- package/dist/accessories/humidifier.accessory.js.map +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +27 -10
- package/dist/platform.js.map +1 -1
- package/dist/types/device.types.d.ts +5 -0
- package/dist/types/device.types.d.ts.map +1 -1
- package/dist/utils/api-proxy.d.ts +7 -1
- package/dist/utils/api-proxy.d.ts.map +1 -1
- package/dist/utils/api-proxy.js +84 -5
- package/dist/utils/api-proxy.js.map +1 -1
- package/dist/utils/quota-manager.d.ts +67 -0
- package/dist/utils/quota-manager.d.ts.map +1 -0
- package/dist/utils/quota-manager.js +154 -0
- package/dist/utils/quota-manager.js.map +1 -0
- package/package.json +2 -2
- package/src/accessories/base.accessory.ts +70 -3
- package/src/accessories/humidifier.accessory.ts +797 -91
- package/src/platform.ts +33 -14
- package/src/types/device.types.ts +6 -1
- package/src/utils/api-proxy.ts +121 -8
- package/src/utils/quota-manager.ts +175 -0
package/.clinerules
ADDED
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
# Cline Rules for homebridge-tsvesync
|
|
2
|
+
|
|
3
|
+
## Project Patterns
|
|
4
|
+
|
|
5
|
+
### Code Organization
|
|
6
|
+
- TypeScript files use `.ts` extension
|
|
7
|
+
- Test files are placed in `__tests__` directory with `.test.ts` extension
|
|
8
|
+
- Device-specific accessories are in `accessories/` directory with `.accessory.ts` suffix
|
|
9
|
+
- Type definitions are in `types/` directory
|
|
10
|
+
- Utility functions are in `utils/` directory
|
|
11
|
+
|
|
12
|
+
### Naming Conventions
|
|
13
|
+
- Classes use PascalCase (e.g., `BaseAccessory`, `HumidifierAccessory`)
|
|
14
|
+
- Interfaces use PascalCase with descriptive names (e.g., `DeviceCapabilities`)
|
|
15
|
+
- Methods and variables use camelCase
|
|
16
|
+
- Constants use UPPER_SNAKE_CASE for truly constant values
|
|
17
|
+
- File names use kebab-case for general files, but camelCase for class files
|
|
18
|
+
|
|
19
|
+
### Code Style
|
|
20
|
+
- Use 2-space indentation
|
|
21
|
+
- Prefer single quotes for strings
|
|
22
|
+
- Use semicolons at the end of statements
|
|
23
|
+
- Use explicit type annotations for function parameters and return types
|
|
24
|
+
- Use async/await for asynchronous operations
|
|
25
|
+
- Prefer interfaces over type aliases for object types
|
|
26
|
+
- Use optional chaining and nullish coalescing when appropriate
|
|
27
|
+
|
|
28
|
+
### Error Handling
|
|
29
|
+
- Use try/catch blocks for API operations
|
|
30
|
+
- Log errors with appropriate context
|
|
31
|
+
- Implement retry mechanisms with exponential backoff
|
|
32
|
+
- Provide meaningful error messages for debugging
|
|
33
|
+
- Handle specific error types differently (network errors, auth errors, etc.)
|
|
34
|
+
|
|
35
|
+
### Logging
|
|
36
|
+
- Use the plugin's logger instance, not console.log
|
|
37
|
+
- Include device context in log messages
|
|
38
|
+
- Use appropriate log levels (debug, info, warn, error)
|
|
39
|
+
- Redact sensitive information in logs
|
|
40
|
+
- Include operation context in log messages
|
|
41
|
+
|
|
42
|
+
## Implementation Patterns
|
|
43
|
+
|
|
44
|
+
### Device Handling
|
|
45
|
+
- All device accessories extend `BaseAccessory`
|
|
46
|
+
- Device-specific logic is implemented in subclasses
|
|
47
|
+
- Common functionality is in the base class
|
|
48
|
+
- Use composition of interfaces for device capabilities
|
|
49
|
+
- Map device states to HomeKit characteristics
|
|
50
|
+
|
|
51
|
+
### API Communication
|
|
52
|
+
- Use the tsvesync library for API calls
|
|
53
|
+
- Implement rate limiting for API requests
|
|
54
|
+
- Handle authentication token refresh
|
|
55
|
+
- Use exponential backoff for failed requests
|
|
56
|
+
- Cache device states to reduce API calls
|
|
57
|
+
|
|
58
|
+
### State Management
|
|
59
|
+
- Update device states periodically based on configuration
|
|
60
|
+
- Persist device state in accessory context
|
|
61
|
+
- Update HomeKit characteristics when device state changes
|
|
62
|
+
- Handle state synchronization between HomeKit and VeSync
|
|
63
|
+
|
|
64
|
+
### Testing
|
|
65
|
+
- Use Jest for unit tests
|
|
66
|
+
- Mock external dependencies
|
|
67
|
+
- Test error handling paths
|
|
68
|
+
- Use descriptive test names
|
|
69
|
+
- Group related tests in describe blocks
|
|
70
|
+
|
|
71
|
+
## Development Workflow
|
|
72
|
+
|
|
73
|
+
### Building
|
|
74
|
+
- Run `npm run build` to compile TypeScript to JavaScript
|
|
75
|
+
- Output goes to `dist/` directory
|
|
76
|
+
- Clean build directory before compilation
|
|
77
|
+
|
|
78
|
+
### Testing
|
|
79
|
+
- Run `npm test` to execute all tests
|
|
80
|
+
- Run `npm run test:watch` for development
|
|
81
|
+
- Run `npm run test:coverage` to check test coverage
|
|
82
|
+
|
|
83
|
+
### Debugging
|
|
84
|
+
- Enable debug mode in plugin configuration
|
|
85
|
+
- Check Homebridge logs for detailed information
|
|
86
|
+
- Use VS Code debugger with appropriate launch configuration
|
|
87
|
+
- Test with real devices when possible
|
|
88
|
+
|
|
89
|
+
### Deployment
|
|
90
|
+
- Update version in package.json
|
|
91
|
+
- Update CHANGELOG.md with version changes
|
|
92
|
+
- Run tests before publishing
|
|
93
|
+
- Use `npm publish` to publish to npm registry
|
|
94
|
+
|
|
95
|
+
## User Support Patterns
|
|
96
|
+
|
|
97
|
+
### Configuration Help
|
|
98
|
+
- Guide users through config.json setup
|
|
99
|
+
- Provide examples for different device types
|
|
100
|
+
- Explain exclusion options clearly
|
|
101
|
+
- Document all configuration parameters
|
|
102
|
+
|
|
103
|
+
### Troubleshooting
|
|
104
|
+
- Ask for debug logs when helping users
|
|
105
|
+
- Check for common configuration issues first
|
|
106
|
+
- Verify device compatibility
|
|
107
|
+
- Check for network/connectivity issues
|
|
108
|
+
- Verify VeSync account credentials
|
|
109
|
+
|
|
110
|
+
### Feature Requests
|
|
111
|
+
- Evaluate feasibility based on API capabilities
|
|
112
|
+
- Consider HomeKit limitations
|
|
113
|
+
- Prioritize based on user impact
|
|
114
|
+
- Document in GitHub issues
|
|
115
|
+
|
|
116
|
+
## Project-Specific Notes
|
|
117
|
+
|
|
118
|
+
### VeSync API Quirks
|
|
119
|
+
- Different device models have inconsistent API implementations
|
|
120
|
+
- Some devices require specific mode settings before other operations
|
|
121
|
+
- API rate limiting can be unpredictable
|
|
122
|
+
- Authentication tokens expire after 1 hour
|
|
123
|
+
- Some device features are not exposed via the API
|
|
124
|
+
|
|
125
|
+
### HomeKit Limitations
|
|
126
|
+
- Limited set of predefined accessory types
|
|
127
|
+
- Restricted characteristic value ranges
|
|
128
|
+
- No custom characteristics without using HAP-NodeJS directly
|
|
129
|
+
- Limited support for complex device features
|
|
130
|
+
|
|
131
|
+
### Common Issues
|
|
132
|
+
- Rate limiting during device discovery with many devices
|
|
133
|
+
- State synchronization delays during high activity
|
|
134
|
+
- Token refresh failures during network interruptions
|
|
135
|
+
- Mapping complex device modes to HomeKit characteristics
|
package/CHANGELOG.md
CHANGED
|
@@ -1,37 +1,59 @@
|
|
|
1
|
-
#
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.68 (2025-02-28)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- API quota management system to prevent exceeding VeSync's daily request limits
|
|
7
|
+
- Configurable quota buffer percentage and priority methods in config.schema.json
|
|
8
|
+
- Automatic device count detection for quota calculation
|
|
9
|
+
- Graceful degradation when quota limits are reached
|
|
10
|
+
- High-priority methods that will still work even when quota is exceeded
|
|
11
|
+
|
|
12
|
+
### Changed
|
|
13
|
+
- Improved error handling for API quota errors
|
|
14
|
+
- Limited device state sync retries to 3 attempts to avoid excessive API calls
|
|
15
|
+
- Enhanced logging for quota-related issues
|
|
16
|
+
- Updated config schema with new quota management options
|
|
2
17
|
|
|
3
|
-
# 1.0.33 (2025-01-04)
|
|
4
18
|
### Fixed
|
|
5
|
-
- Fixed issue
|
|
19
|
+
- Fixed issue with API quota errors causing plugin instability
|
|
20
|
+
- Improved handling of null responses from API calls due to quota limits
|
|
21
|
+
|
|
22
|
+
## 1.0.67 (2025-01-15)
|
|
23
|
+
|
|
24
|
+
### Added
|
|
25
|
+
- Support for OasisMist1000S humidifier
|
|
26
|
+
|
|
27
|
+
### Changed
|
|
28
|
+
- Improved error handling for API rate limiting
|
|
29
|
+
- Enhanced token refresh mechanism
|
|
6
30
|
|
|
7
|
-
# 1.0.31 (2025-01-04)
|
|
8
31
|
### Fixed
|
|
9
|
-
- Fixed issue
|
|
32
|
+
- Fixed issue with fan speed control on certain models
|
|
33
|
+
- Improved logging for troubleshooting
|
|
34
|
+
|
|
35
|
+
## 1.0.66 (2024-12-10)
|
|
36
|
+
|
|
37
|
+
### Added
|
|
38
|
+
- Support for Superior6000S humidifier
|
|
39
|
+
|
|
40
|
+
### Changed
|
|
41
|
+
- Improved device exclusion logic
|
|
42
|
+
- Enhanced error recovery for network failures
|
|
43
|
+
- Updated tsvesync dependency to v1.0.64
|
|
10
44
|
|
|
11
|
-
# 1.0.27 (2025-01-02)
|
|
12
45
|
### Fixed
|
|
13
|
-
- Fixed
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
- Humidifiers now correctly map HomeKit's 0-100% to device speeds 1-9
|
|
46
|
+
- Fixed connection stability issues
|
|
47
|
+
|
|
48
|
+
## 1.0.65 (2024-11-05)
|
|
17
49
|
|
|
18
50
|
### Added
|
|
19
|
-
-
|
|
20
|
-
- Power state changes
|
|
21
|
-
- Speed/level adjustments
|
|
22
|
-
- Mode changes
|
|
23
|
-
- Child lock toggles
|
|
24
|
-
- Swing mode changes
|
|
25
|
-
- Rotation direction changes
|
|
26
|
-
- Target humidity adjustments
|
|
27
|
-
- Added support for ESO15-TB dual outdoor outlets
|
|
28
|
-
- Power state control for both outlets
|
|
29
|
-
- Energy monitoring capabilities
|
|
30
|
-
- Power consumption tracking
|
|
31
|
-
- Voltage monitoring
|
|
32
|
-
- Added support for ESWL01, ESWL03, and ESWD16 wall switches
|
|
51
|
+
- Support for EverestAir air purifier
|
|
33
52
|
|
|
34
53
|
### Changed
|
|
35
|
-
- Improved
|
|
36
|
-
- Enhanced
|
|
37
|
-
-
|
|
54
|
+
- Improved handling of device reconnection
|
|
55
|
+
- Enhanced logging for API communication
|
|
56
|
+
- Optimized polling frequency
|
|
57
|
+
|
|
58
|
+
### Fixed
|
|
59
|
+
- Fixed issues with characteristic updates
|
package/config.schema.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"pluginAlias": "TSVESyncPlatform",
|
|
3
3
|
"pluginType": "platform",
|
|
4
4
|
"singular": true,
|
|
5
|
-
"headerDisplay": "Homebridge plugin for VeSync devices including Levoit air purifiers
|
|
5
|
+
"headerDisplay": "Homebridge plugin for VeSync devices including Levoit air purifiers humidifiers and Etekcity smart outlets.",
|
|
6
6
|
"footerDisplay": "For help please visit the [GitHub repository](https://github.com/mickgiles/homebridge-tsvesync).",
|
|
7
7
|
"schema": {
|
|
8
8
|
"type": "object",
|
|
@@ -10,229 +10,170 @@
|
|
|
10
10
|
"name": {
|
|
11
11
|
"title": "Name",
|
|
12
12
|
"type": "string",
|
|
13
|
-
"
|
|
14
|
-
"
|
|
13
|
+
"default": "TSVESync",
|
|
14
|
+
"required": true
|
|
15
15
|
},
|
|
16
16
|
"username": {
|
|
17
|
-
"title": "
|
|
17
|
+
"title": "VeSync Username",
|
|
18
18
|
"type": "string",
|
|
19
19
|
"required": true,
|
|
20
20
|
"description": "Your VeSync account email address"
|
|
21
21
|
},
|
|
22
22
|
"password": {
|
|
23
|
-
"title": "Password",
|
|
23
|
+
"title": "VeSync Password",
|
|
24
24
|
"type": "string",
|
|
25
25
|
"required": true,
|
|
26
|
-
"description": "Your VeSync account password"
|
|
27
|
-
"typeahead": {
|
|
28
|
-
"source": []
|
|
29
|
-
}
|
|
26
|
+
"description": "Your VeSync account password"
|
|
30
27
|
},
|
|
31
28
|
"updateInterval": {
|
|
32
29
|
"title": "Update Interval",
|
|
33
30
|
"type": "integer",
|
|
34
|
-
"
|
|
35
|
-
"
|
|
36
|
-
"
|
|
37
|
-
"
|
|
38
|
-
"description": "How often to update device states (in seconds). Default is 300 seconds (5 minutes). Minimum is 60 seconds to avoid API rate limits."
|
|
31
|
+
"default": 30,
|
|
32
|
+
"minimum": 10,
|
|
33
|
+
"maximum": 600,
|
|
34
|
+
"description": "How often to update device status (in seconds)"
|
|
39
35
|
},
|
|
40
36
|
"debug": {
|
|
41
|
-
"title": "Debug
|
|
37
|
+
"title": "Debug Mode",
|
|
42
38
|
"type": "boolean",
|
|
43
|
-
"required": false,
|
|
44
39
|
"default": false,
|
|
45
|
-
"description": "Enable debug logging
|
|
40
|
+
"description": "Enable debug logging"
|
|
41
|
+
},
|
|
42
|
+
"apiUrl": {
|
|
43
|
+
"title": "API URL",
|
|
44
|
+
"type": "string",
|
|
45
|
+
"description": "Custom VeSync API URL (advanced users only)"
|
|
46
46
|
},
|
|
47
47
|
"exclude": {
|
|
48
|
-
"title": "
|
|
48
|
+
"title": "Exclude Devices",
|
|
49
49
|
"type": "object",
|
|
50
|
-
"required": false,
|
|
51
|
-
"description": "Configure which devices to exclude from HomeKit",
|
|
52
50
|
"properties": {
|
|
53
51
|
"type": {
|
|
54
|
-
"title": "Exclude
|
|
52
|
+
"title": "Exclude by Type",
|
|
55
53
|
"type": "array",
|
|
56
54
|
"items": {
|
|
57
|
-
"title": "Device Type",
|
|
58
55
|
"type": "string",
|
|
59
|
-
"enum": [
|
|
56
|
+
"enum": [
|
|
57
|
+
"fan",
|
|
58
|
+
"outlet",
|
|
59
|
+
"switch",
|
|
60
|
+
"bulb",
|
|
61
|
+
"humidifier",
|
|
62
|
+
"purifier"
|
|
63
|
+
]
|
|
60
64
|
},
|
|
61
65
|
"uniqueItems": true,
|
|
62
|
-
"description": "
|
|
63
|
-
"default": []
|
|
66
|
+
"description": "Exclude devices by type"
|
|
64
67
|
},
|
|
65
68
|
"model": {
|
|
66
|
-
"title": "Exclude
|
|
69
|
+
"title": "Exclude by Model",
|
|
67
70
|
"type": "array",
|
|
68
71
|
"items": {
|
|
69
|
-
"
|
|
70
|
-
"type": "string",
|
|
71
|
-
"placeholder": "Core300S"
|
|
72
|
+
"type": "string"
|
|
72
73
|
},
|
|
73
74
|
"uniqueItems": true,
|
|
74
|
-
"description": "
|
|
75
|
-
"default": []
|
|
75
|
+
"description": "Exclude devices by model (e.g., 'Core300S', 'LV600S')"
|
|
76
76
|
},
|
|
77
77
|
"name": {
|
|
78
78
|
"title": "Exclude by Name",
|
|
79
79
|
"type": "array",
|
|
80
80
|
"items": {
|
|
81
|
-
"
|
|
82
|
-
"type": "string",
|
|
83
|
-
"placeholder": "Living Room Light"
|
|
81
|
+
"type": "string"
|
|
84
82
|
},
|
|
85
83
|
"uniqueItems": true,
|
|
86
|
-
"description": "
|
|
87
|
-
"default": []
|
|
84
|
+
"description": "Exclude devices by exact name match"
|
|
88
85
|
},
|
|
89
86
|
"namePattern": {
|
|
90
87
|
"title": "Exclude by Name Pattern",
|
|
91
88
|
"type": "array",
|
|
92
89
|
"items": {
|
|
93
|
-
"
|
|
94
|
-
"type": "string",
|
|
95
|
-
"placeholder": "Bedroom.*"
|
|
90
|
+
"type": "string"
|
|
96
91
|
},
|
|
97
92
|
"uniqueItems": true,
|
|
98
|
-
"description": "
|
|
99
|
-
"default": []
|
|
93
|
+
"description": "Exclude devices by name pattern (regex)"
|
|
100
94
|
},
|
|
101
95
|
"id": {
|
|
102
|
-
"title": "Exclude by
|
|
96
|
+
"title": "Exclude by ID",
|
|
103
97
|
"type": "array",
|
|
104
98
|
"items": {
|
|
105
|
-
"
|
|
106
|
-
"type": "string",
|
|
107
|
-
"placeholder": "cid123456"
|
|
99
|
+
"type": "string"
|
|
108
100
|
},
|
|
109
101
|
"uniqueItems": true,
|
|
110
|
-
"description": "
|
|
111
|
-
"default": []
|
|
102
|
+
"description": "Exclude devices by ID (cid/uuid)"
|
|
112
103
|
}
|
|
113
104
|
}
|
|
114
105
|
},
|
|
115
106
|
"retry": {
|
|
116
|
-
"title": "
|
|
107
|
+
"title": "Retry Configuration",
|
|
117
108
|
"type": "object",
|
|
118
|
-
"required": false,
|
|
119
|
-
"description": "Configure retry behavior for API calls",
|
|
120
109
|
"properties": {
|
|
121
110
|
"maxRetries": {
|
|
122
111
|
"title": "Maximum Retries",
|
|
123
112
|
"type": "integer",
|
|
113
|
+
"default": 3,
|
|
124
114
|
"minimum": 1,
|
|
125
115
|
"maximum": 10,
|
|
126
|
-
"
|
|
127
|
-
"description": "Maximum number of retry attempts for failed API calls"
|
|
116
|
+
"description": "Maximum number of retry attempts for failed operations"
|
|
128
117
|
},
|
|
129
118
|
"initialDelay": {
|
|
130
|
-
"title": "Initial
|
|
119
|
+
"title": "Initial Delay",
|
|
131
120
|
"type": "integer",
|
|
132
|
-
"minimum": 1000,
|
|
133
|
-
"maximum": 10000,
|
|
134
121
|
"default": 2000,
|
|
135
|
-
"
|
|
122
|
+
"minimum": 500,
|
|
123
|
+
"maximum": 10000,
|
|
124
|
+
"description": "Initial delay before first retry (in milliseconds)"
|
|
136
125
|
},
|
|
137
126
|
"maxDelay": {
|
|
138
|
-
"title": "Maximum
|
|
127
|
+
"title": "Maximum Delay",
|
|
139
128
|
"type": "integer",
|
|
140
|
-
"minimum": 5000,
|
|
141
|
-
"maximum": 30000,
|
|
142
129
|
"default": 10000,
|
|
143
|
-
"
|
|
130
|
+
"minimum": 1000,
|
|
131
|
+
"maximum": 60000,
|
|
132
|
+
"description": "Maximum delay between retries (in milliseconds)"
|
|
144
133
|
}
|
|
145
134
|
}
|
|
146
|
-
}
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
"
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
{
|
|
170
|
-
"key": "exclude.type[]",
|
|
171
|
-
"type": "select"
|
|
172
|
-
}
|
|
173
|
-
]
|
|
174
|
-
},
|
|
175
|
-
{
|
|
176
|
-
"key": "exclude.model",
|
|
177
|
-
"type": "array",
|
|
178
|
-
"title": "Device Models to Exclude",
|
|
179
|
-
"buttonText": "Add Device Model",
|
|
180
|
-
"items": [
|
|
181
|
-
{
|
|
182
|
-
"key": "exclude.model[]",
|
|
183
|
-
"type": "string"
|
|
184
|
-
}
|
|
185
|
-
]
|
|
186
|
-
},
|
|
187
|
-
{
|
|
188
|
-
"key": "exclude.name",
|
|
189
|
-
"type": "array",
|
|
190
|
-
"title": "Device Names to Exclude",
|
|
191
|
-
"buttonText": "Add Device Name",
|
|
192
|
-
"items": [
|
|
193
|
-
{
|
|
194
|
-
"key": "exclude.name[]",
|
|
195
|
-
"type": "string"
|
|
196
|
-
}
|
|
197
|
-
]
|
|
198
|
-
},
|
|
199
|
-
{
|
|
200
|
-
"key": "exclude.namePattern",
|
|
201
|
-
"type": "array",
|
|
202
|
-
"title": "Name Patterns to Exclude",
|
|
203
|
-
"buttonText": "Add Name Pattern",
|
|
204
|
-
"items": [
|
|
205
|
-
{
|
|
206
|
-
"key": "exclude.namePattern[]",
|
|
207
|
-
"type": "string"
|
|
208
|
-
}
|
|
209
|
-
]
|
|
210
|
-
},
|
|
211
|
-
{
|
|
212
|
-
"key": "exclude.id",
|
|
213
|
-
"type": "array",
|
|
214
|
-
"title": "Device IDs to Exclude",
|
|
215
|
-
"buttonText": "Add Device ID",
|
|
216
|
-
"items": [
|
|
217
|
-
{
|
|
218
|
-
"key": "exclude.id[]",
|
|
135
|
+
},
|
|
136
|
+
"quotaManagement": {
|
|
137
|
+
"title": "API Quota Management",
|
|
138
|
+
"type": "object",
|
|
139
|
+
"properties": {
|
|
140
|
+
"enabled": {
|
|
141
|
+
"title": "Enable Quota Management",
|
|
142
|
+
"type": "boolean",
|
|
143
|
+
"default": true,
|
|
144
|
+
"description": "Enable API quota management to prevent exceeding VeSync's daily limits"
|
|
145
|
+
},
|
|
146
|
+
"bufferPercentage": {
|
|
147
|
+
"title": "Buffer Percentage",
|
|
148
|
+
"type": "integer",
|
|
149
|
+
"default": 95,
|
|
150
|
+
"minimum": 50,
|
|
151
|
+
"maximum": 100,
|
|
152
|
+
"description": "Percentage of the calculated quota to use (lower values provide more safety margin)"
|
|
153
|
+
},
|
|
154
|
+
"priorityMethods": {
|
|
155
|
+
"title": "Priority Methods",
|
|
156
|
+
"type": "array",
|
|
157
|
+
"items": {
|
|
219
158
|
"type": "string"
|
|
220
|
-
}
|
|
221
|
-
|
|
159
|
+
},
|
|
160
|
+
"default": [
|
|
161
|
+
"turnOn",
|
|
162
|
+
"turnOff",
|
|
163
|
+
"setMode",
|
|
164
|
+
"setTargetHumidity",
|
|
165
|
+
"setBrightness",
|
|
166
|
+
"setColorTemperature",
|
|
167
|
+
"setColor",
|
|
168
|
+
"changeFanSpeed",
|
|
169
|
+
"setOscillation",
|
|
170
|
+
"setChildLock"
|
|
171
|
+
],
|
|
172
|
+
"uniqueItems": true,
|
|
173
|
+
"description": "API methods that will be allowed even when quota is exceeded"
|
|
174
|
+
}
|
|
222
175
|
}
|
|
223
|
-
|
|
224
|
-
},
|
|
225
|
-
{
|
|
226
|
-
"key": "retry",
|
|
227
|
-
"type": "section",
|
|
228
|
-
"title": "API Retry Settings",
|
|
229
|
-
"expandable": true,
|
|
230
|
-
"expanded": false,
|
|
231
|
-
"items": [
|
|
232
|
-
"retry.maxRetries",
|
|
233
|
-
"retry.initialDelay",
|
|
234
|
-
"retry.maxD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