homebridge-tsvesync 1.0.96 → 1.0.97
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 +30 -0
- package/README.md +48 -4
- package/package.json +2 -2
- package/scripts/README.md +65 -0
- package/scripts/vesync-auth-test.sh +770 -0
- package/scripts/vesync-debug.sh +0 -423
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## 1.0.97 (2025-08-16)
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
- **Enhanced Authentication Reliability**: Updated to tsvesync v1.0.97 with improved authentication system
|
|
7
|
+
- Automatic support for new two-step VeSync authentication flow with legacy fallback
|
|
8
|
+
- Enhanced cross-region authentication support for international users
|
|
9
|
+
- Improved authentication error recovery and retry mechanisms
|
|
10
|
+
- **Regional API Support**: Automatic detection and routing for global VeSync API endpoints
|
|
11
|
+
- Enhanced support for EU users with automatic endpoint switching
|
|
12
|
+
- Improved authentication reliability for users in different geographical regions
|
|
13
|
+
- Better handling of cross-region authentication errors and automatic fallback
|
|
14
|
+
|
|
15
|
+
### Fixed
|
|
16
|
+
- **Authentication Issues**: Resolved authentication problems affecting international users
|
|
17
|
+
- Fixed "app version is too low" errors with updated VeSync API compatibility
|
|
18
|
+
- Improved authentication success rates for users in EU and other regions
|
|
19
|
+
- Enhanced token refresh and session management reliability
|
|
20
|
+
- **API Compatibility**: Updated VeSync API version support for improved stability
|
|
21
|
+
- Better handling of VeSync API changes and authentication protocol updates
|
|
22
|
+
- Improved compatibility with latest VeSync mobile app authentication methods
|
|
23
|
+
|
|
24
|
+
### Dependencies
|
|
25
|
+
- Updated tsvesync from 1.0.96 to 1.0.97 for enhanced authentication and regional support
|
|
26
|
+
|
|
27
|
+
### Migration Notes
|
|
28
|
+
- No configuration changes required - authentication improvements are automatic
|
|
29
|
+
- Enhanced authentication reliability should improve connection stability for all users
|
|
30
|
+
- International users should experience better authentication success rates
|
|
31
|
+
- Existing device functionality remains unchanged with improved underlying reliability
|
|
32
|
+
|
|
3
33
|
## 1.0.96 (2025-08-09)
|
|
4
34
|
|
|
5
35
|
### Changed
|
package/README.md
CHANGED
|
@@ -2,6 +2,12 @@
|
|
|
2
2
|
|
|
3
3
|
This is a Homebridge plugin that allows you to control your VeSync/Levoit/Etekcity devices through HomeKit. It provides native HomeKit integration for a wide range of VeSync-enabled devices.
|
|
4
4
|
|
|
5
|
+
## 🆕 Recent Updates
|
|
6
|
+
|
|
7
|
+
- **Enhanced Authentication Support**: Now supports the new VeSync authentication flow (pyvesync PR #340) with automatic fallback to legacy authentication
|
|
8
|
+
- **Regional API Support**: Automatic detection and routing for US and EU regional endpoints
|
|
9
|
+
- **Improved Compatibility**: Better error handling and automatic recovery for API changes
|
|
10
|
+
|
|
5
11
|
## Supported Devices
|
|
6
12
|
|
|
7
13
|
### Air Purifiers
|
|
@@ -223,10 +229,48 @@ Example configuration with all exclusion options:
|
|
|
223
229
|
|
|
224
230
|
## Troubleshooting
|
|
225
231
|
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
232
|
+
### Authentication Issues
|
|
233
|
+
|
|
234
|
+
If you're experiencing authentication problems, you can test your credentials and determine your authentication type using the included test script:
|
|
235
|
+
|
|
236
|
+
```bash
|
|
237
|
+
# Test your VeSync authentication
|
|
238
|
+
./scripts/vesync-auth-test.sh
|
|
239
|
+
|
|
240
|
+
# Or provide credentials directly
|
|
241
|
+
./scripts/vesync-auth-test.sh user@example.com password
|
|
242
|
+
|
|
243
|
+
# For detailed output
|
|
244
|
+
./scripts/vesync-auth-test.sh -v
|
|
245
|
+
```
|
|
246
|
+
|
|
247
|
+
The script will:
|
|
248
|
+
- Test both NEW and LEGACY authentication methods
|
|
249
|
+
- Detect your account's regional endpoint (US/EU)
|
|
250
|
+
- Provide clear recommendations for configuration
|
|
251
|
+
- Show any error codes with explanations
|
|
252
|
+
|
|
253
|
+
### Common Issues
|
|
254
|
+
|
|
255
|
+
1. **Authentication Failed**
|
|
256
|
+
- Verify your VeSync credentials are correct
|
|
257
|
+
- Try logging into the VeSync app to confirm they work
|
|
258
|
+
- Run the authentication test script to diagnose issues
|
|
259
|
+
|
|
260
|
+
2. **Devices Not Appearing**
|
|
261
|
+
- Check the Homebridge logs for any error messages
|
|
262
|
+
- Ensure your devices are properly set up in the VeSync app
|
|
263
|
+
- Verify your devices are running the latest firmware
|
|
264
|
+
|
|
265
|
+
3. **Regional Issues (EU Users)**
|
|
266
|
+
- The plugin automatically detects and uses the correct regional endpoint
|
|
267
|
+
- EU accounts will automatically use `smartapi.vesync.eu`
|
|
268
|
+
- US/CA/MX/JP accounts use `smartapi.vesync.com`
|
|
269
|
+
|
|
270
|
+
4. **API Rate Limiting**
|
|
271
|
+
- The plugin includes automatic rate limiting
|
|
272
|
+
- If you see quota errors, increase the `updateInterval` in your config
|
|
273
|
+
- Premium accounts have higher quotas than free accounts
|
|
230
274
|
5. Check that your devices are online in the VeSync app
|
|
231
275
|
|
|
232
276
|
## Development
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "homebridge-tsvesync",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.97",
|
|
4
4
|
"description": "Homebridge plugin for VeSync devices including Levoit air purifiers, humidifiers, and Etekcity smart outlets",
|
|
5
5
|
"main": "dist/index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -98,7 +98,7 @@
|
|
|
98
98
|
"axios": "^1.6.5",
|
|
99
99
|
"dotenv": "^16.3.1",
|
|
100
100
|
"js-yaml": "^4.1.0",
|
|
101
|
-
"tsvesync": "1.0.
|
|
101
|
+
"tsvesync": "1.0.97"
|
|
102
102
|
},
|
|
103
103
|
"devDependencies": {
|
|
104
104
|
"@types/jest": "^29.5.11",
|
|
@@ -0,0 +1,65 @@
|
|
|
1
|
+
# VeSync Authentication Testing Scripts
|
|
2
|
+
|
|
3
|
+
This directory contains scripts for testing and validating VeSync authentication flows.
|
|
4
|
+
|
|
5
|
+
## Files
|
|
6
|
+
|
|
7
|
+
### test-auth-type.sh
|
|
8
|
+
Comprehensive script to test both NEW (PR #340) and LEGACY VeSync authentication flows.
|
|
9
|
+
|
|
10
|
+
**Features:**
|
|
11
|
+
- Tests both NEW two-step authentication and LEGACY single-step authentication
|
|
12
|
+
- Regional endpoint detection (US, EU, Global)
|
|
13
|
+
- PII redaction for security
|
|
14
|
+
- Comprehensive error code explanations
|
|
15
|
+
- Network connectivity testing
|
|
16
|
+
- Detailed recommendations based on results
|
|
17
|
+
|
|
18
|
+
**Usage:**
|
|
19
|
+
```bash
|
|
20
|
+
# Using environment variables from .env
|
|
21
|
+
scripts/run-auth-test.sh
|
|
22
|
+
|
|
23
|
+
# Direct usage with credentials
|
|
24
|
+
scripts/test-auth-type.sh user@example.com password
|
|
25
|
+
|
|
26
|
+
# With verbose output
|
|
27
|
+
scripts/test-auth-type.sh -v user@example.com password
|
|
28
|
+
|
|
29
|
+
# With debug mode (saves API responses)
|
|
30
|
+
scripts/test-auth-type.sh -d user@example.com password
|
|
31
|
+
```
|
|
32
|
+
|
|
33
|
+
### run-auth-test.sh
|
|
34
|
+
Helper script that loads environment variables from .env file and runs the authentication test.
|
|
35
|
+
|
|
36
|
+
**Usage:**
|
|
37
|
+
```bash
|
|
38
|
+
# Ensure .env file exists with VESYNC_USERNAME and VESYNC_PASSWORD
|
|
39
|
+
scripts/run-auth-test.sh [options]
|
|
40
|
+
```
|
|
41
|
+
|
|
42
|
+
## Environment Variables
|
|
43
|
+
|
|
44
|
+
Create a `.env` file in the project root with:
|
|
45
|
+
```env
|
|
46
|
+
VESYNC_USERNAME=your-email@example.com
|
|
47
|
+
VESYNC_PASSWORD=your-password
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
## Recent Fixes
|
|
51
|
+
|
|
52
|
+
- **Fixed JSON payload construction**: Replaced problematic here-doc syntax with printf-based JSON construction to prevent script hanging
|
|
53
|
+
- **Improved environment variable loading**: Added proper .env file loading support
|
|
54
|
+
- **Enhanced error handling**: Better error codes and explanations
|
|
55
|
+
- **Added PII redaction**: Safely masks sensitive information in output
|
|
56
|
+
|
|
57
|
+
## Authentication Flow Detection
|
|
58
|
+
|
|
59
|
+
The script will determine:
|
|
60
|
+
1. **NEW Authentication (PR #340)**: Two-step flow using authorize codes
|
|
61
|
+
2. **LEGACY Authentication**: Traditional single-step login flow
|
|
62
|
+
3. **Regional Issues**: Cross-region authentication problems
|
|
63
|
+
4. **API Changes**: Detection of new error codes or API changes
|
|
64
|
+
|
|
65
|
+
Results include specific recommendations for which authentication method to use in your implementation.
|