@mp-consulting/homebridge-daikin-cloud 1.3.5 → 1.3.7
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 +39 -1
- package/README.md +5 -3
- package/dist/src/accessories/air-conditioning-accessory.d.ts +2 -2
- package/dist/src/accessories/air-conditioning-accessory.d.ts.map +1 -1
- package/dist/src/accessories/air-conditioning-accessory.js.map +1 -1
- package/dist/src/accessories/altherma-accessory.d.ts +2 -2
- package/dist/src/accessories/altherma-accessory.d.ts.map +1 -1
- package/dist/src/accessories/altherma-accessory.js.map +1 -1
- package/dist/src/accessories/base-accessory.d.ts +6 -6
- package/dist/src/accessories/base-accessory.d.ts.map +1 -1
- package/dist/src/accessories/base-accessory.js +15 -15
- package/dist/src/accessories/base-accessory.js.map +1 -1
- package/dist/src/api/daikin-api.d.ts +26 -26
- package/dist/src/api/daikin-api.d.ts.map +1 -1
- package/dist/src/api/daikin-api.js +68 -42
- package/dist/src/api/daikin-api.js.map +1 -1
- package/dist/src/api/daikin-cloud.repository.d.ts.map +1 -1
- package/dist/src/api/daikin-cloud.repository.js +22 -14
- package/dist/src/api/daikin-cloud.repository.js.map +1 -1
- package/dist/src/api/daikin-controller.d.ts +41 -47
- package/dist/src/api/daikin-controller.d.ts.map +1 -1
- package/dist/src/api/daikin-controller.js +40 -64
- package/dist/src/api/daikin-controller.js.map +1 -1
- package/dist/src/api/daikin-device.d.ts +36 -31
- package/dist/src/api/daikin-device.d.ts.map +1 -1
- package/dist/src/api/daikin-device.js +45 -31
- package/dist/src/api/daikin-device.js.map +1 -1
- package/dist/src/api/daikin-mobile-oauth.d.ts +20 -20
- package/dist/src/api/daikin-mobile-oauth.d.ts.map +1 -1
- package/dist/src/api/daikin-mobile-oauth.js +49 -44
- package/dist/src/api/daikin-mobile-oauth.js.map +1 -1
- package/dist/src/api/daikin-oauth.d.ts +32 -32
- package/dist/src/api/daikin-oauth.d.ts.map +1 -1
- package/dist/src/api/daikin-oauth.js +64 -56
- package/dist/src/api/daikin-oauth.js.map +1 -1
- package/dist/src/api/daikin-schemas.d.ts +476 -351
- package/dist/src/api/daikin-schemas.d.ts.map +1 -1
- package/dist/src/api/daikin-schemas.js +11 -42
- package/dist/src/api/daikin-schemas.js.map +1 -1
- package/dist/src/api/daikin-types.d.ts +5 -1
- package/dist/src/api/daikin-types.d.ts.map +1 -1
- package/dist/src/api/daikin-types.js.map +1 -1
- package/dist/src/api/daikin-websocket.d.ts +31 -32
- package/dist/src/api/daikin-websocket.d.ts.map +1 -1
- package/dist/src/api/daikin-websocket.js +55 -35
- package/dist/src/api/daikin-websocket.js.map +1 -1
- package/dist/src/api/index.d.ts +2 -1
- package/dist/src/api/index.d.ts.map +1 -1
- package/dist/src/api/index.js +3 -1
- package/dist/src/api/index.js.map +1 -1
- package/dist/src/api/token-storage.d.ts +21 -0
- package/dist/src/api/token-storage.d.ts.map +1 -0
- package/dist/src/api/token-storage.js +90 -0
- package/dist/src/api/token-storage.js.map +1 -0
- package/dist/src/config/config-manager.d.ts +33 -33
- package/dist/src/config/config-manager.d.ts.map +1 -1
- package/dist/src/config/config-manager.js +33 -33
- package/dist/src/config/config-manager.js.map +1 -1
- package/dist/src/constants/api.constants.d.ts +4 -0
- package/dist/src/constants/api.constants.d.ts.map +1 -1
- package/dist/src/constants/api.constants.js +5 -1
- package/dist/src/constants/api.constants.js.map +1 -1
- package/dist/src/constants/device.constants.d.ts +4 -0
- package/dist/src/constants/device.constants.d.ts.map +1 -1
- package/dist/src/constants/device.constants.js +5 -1
- package/dist/src/constants/device.constants.js.map +1 -1
- package/dist/src/device/accessory-factory.d.ts +10 -10
- package/dist/src/device/accessory-factory.d.ts.map +1 -1
- package/dist/src/device/accessory-factory.js +7 -7
- package/dist/src/device/accessory-factory.js.map +1 -1
- package/dist/src/device/capability-detector.d.ts +8 -8
- package/dist/src/device/capability-detector.d.ts.map +1 -1
- package/dist/src/device/capability-detector.js +6 -6
- package/dist/src/device/capability-detector.js.map +1 -1
- package/dist/src/device/capability-docs.d.ts +1 -9
- package/dist/src/device/capability-docs.d.ts.map +1 -1
- package/dist/src/device/capability-docs.js +19 -73
- package/dist/src/device/capability-docs.js.map +1 -1
- package/dist/src/device/profiles/device-profile.d.ts +1 -1
- package/dist/src/device/profiles/device-profile.d.ts.map +1 -1
- package/dist/src/device/profiles/device-profile.js +4 -4
- package/dist/src/device/profiles/device-profile.js.map +1 -1
- package/dist/src/features/base-feature.d.ts +2 -2
- package/dist/src/features/base-feature.d.ts.map +1 -1
- package/dist/src/features/base-feature.js +2 -3
- package/dist/src/features/base-feature.js.map +1 -1
- package/dist/src/features/feature-manager.d.ts +8 -16
- package/dist/src/features/feature-manager.d.ts.map +1 -1
- package/dist/src/features/feature-manager.js +5 -17
- package/dist/src/features/feature-manager.js.map +1 -1
- package/dist/src/features/modes/dry-operation-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/dry-operation-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/dry-operation-mode.feature.js.map +1 -1
- package/dist/src/features/modes/econo-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/econo-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/econo-mode.feature.js.map +1 -1
- package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/fan-only-operation-mode.feature.js.map +1 -1
- package/dist/src/features/modes/indoor-silent-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/indoor-silent-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/indoor-silent-mode.feature.js.map +1 -1
- package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/outdoor-silent-mode.feature.js.map +1 -1
- package/dist/src/features/modes/powerful-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/powerful-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/powerful-mode.feature.js.map +1 -1
- package/dist/src/features/modes/streamer-mode.feature.d.ts +1 -1
- package/dist/src/features/modes/streamer-mode.feature.d.ts.map +1 -1
- package/dist/src/features/modes/streamer-mode.feature.js.map +1 -1
- package/dist/src/index.d.ts +1 -1
- package/dist/src/index.d.ts.map +1 -1
- package/dist/src/index.js.map +1 -1
- package/dist/src/platform.d.ts +11 -8
- package/dist/src/platform.d.ts.map +1 -1
- package/dist/src/platform.js +64 -15
- package/dist/src/platform.js.map +1 -1
- package/dist/src/services/climate-control.service.d.ts +8 -2
- package/dist/src/services/climate-control.service.d.ts.map +1 -1
- package/dist/src/services/climate-control.service.js +59 -58
- package/dist/src/services/climate-control.service.js.map +1 -1
- package/dist/src/services/hot-water-tank.service.d.ts +6 -2
- package/dist/src/services/hot-water-tank.service.d.ts.map +1 -1
- package/dist/src/services/hot-water-tank.service.js +33 -31
- package/dist/src/services/hot-water-tank.service.js.map +1 -1
- package/dist/src/types/daikin-enums.js +12 -12
- package/dist/src/types/daikin-enums.js.map +1 -1
- package/dist/src/types/device-capabilities.d.ts +1 -1
- package/dist/src/types/device-capabilities.d.ts.map +1 -1
- package/dist/src/utils/log-context.d.ts +23 -23
- package/dist/src/utils/log-context.d.ts.map +1 -1
- package/dist/src/utils/log-context.js +28 -28
- package/dist/src/utils/log-context.js.map +1 -1
- package/dist/src/utils/strings.d.ts.map +1 -1
- package/dist/src/utils/strings.js.map +1 -1
- package/dist/src/utils/update-mapper.d.ts +16 -16
- package/dist/src/utils/update-mapper.d.ts.map +1 -1
- package/dist/src/utils/update-mapper.js +14 -14
- package/dist/src/utils/update-mapper.js.map +1 -1
- package/homebridge-ui/public/index.html +2 -2
- package/homebridge-ui/public/script.js +957 -898
- package/homebridge-ui/server.js +746 -678
- package/package.json +29 -27
- package/.claude/settings.json +0 -3
- package/.claude/settings.local.json +0 -29
- package/CHANGELOG.md +0 -103
- package/CLAUDE.md +0 -269
- package/config.md +0 -2
- package/dist/src/api/daikin-device-tracker.d.ts +0 -97
- package/dist/src/api/daikin-device-tracker.d.ts.map +0 -1
- package/dist/src/api/daikin-device-tracker.js +0 -136
- package/dist/src/api/daikin-device-tracker.js.map +0 -1
- package/dist/src/api/http-interceptor.d.ts +0 -99
- package/dist/src/api/http-interceptor.d.ts.map +0 -1
- package/dist/src/api/http-interceptor.js +0 -177
- package/dist/src/api/http-interceptor.js.map +0 -1
- package/dist/src/di/service-container.d.ts +0 -92
- package/dist/src/di/service-container.d.ts.map +0 -1
- package/dist/src/di/service-container.js +0 -156
- package/dist/src/di/service-container.js.map +0 -1
- package/dist/src/features/feature-registry.d.ts +0 -100
- package/dist/src/features/feature-registry.d.ts.map +0 -1
- package/dist/src/features/feature-registry.js +0 -142
- package/dist/src/features/feature-registry.js.map +0 -1
- package/dist/src/services/service-factory.d.ts +0 -46
- package/dist/src/services/service-factory.d.ts.map +0 -1
- package/dist/src/services/service-factory.js +0 -72
- package/dist/src/services/service-factory.js.map +0 -1
- package/dist/src/utils/error-handler.d.ts +0 -101
- package/dist/src/utils/error-handler.d.ts.map +0 -1
- package/dist/src/utils/error-handler.js +0 -251
- package/dist/src/utils/error-handler.js.map +0 -1
- package/dist/src/utils/retry.d.ts +0 -42
- package/dist/src/utils/retry.d.ts.map +0 -1
- package/dist/src/utils/retry.js +0 -70
- package/dist/src/utils/retry.js.map +0 -1
- package/docs/ARCHITECTURE.md +0 -645
- package/docs/IMPLEMENTATION_GUIDE.md +0 -899
- package/docs/IMPROVEMENTS_SUMMARY.md +0 -415
- package/docs/NEXT_STEPS.md +0 -368
- package/docs/Screenshot 2024-07-04 at 18.41.28.png +0 -0
- package/docs/TROUBLESHOOTING.md +0 -475
- package/docs/api-response-for-BRP069A8x.json +0 -520
- package/docs/api-response-for-BRP069C4x-2.json +0 -881
- package/docs/api-response-for-BRP069C4x.json +0 -916
- package/docs/api-response-for-altherma.json +0 -759
- package/docs/api-response-for-altherma2.json +0 -2735
- package/docs/api-response-with-multiple-devices-incl-heatpump.json +0 -2544
- package/docs/cr-insance-altherma-id-0.json +0 -834
- package/docs/mock-air-to-air-dx23.json +0 -759
- package/docs/mock-air-to-air-dx4.json +0 -1134
- package/docs/mock-airpurifier-with-humidifier.json +0 -732
- package/docs/mock-airpurifier.json +0 -450
- package/docs/mock-altherma-air-to-water-lan.json +0 -845
- package/docs/mock-altherma-air-to-water-wlan.json +0 -845
- package/docs/mock-d2cnd-gas-boiler.json +0 -649
- package/docs/setpointmode-vs-controlmode-vs-setpoints-vs-sensorydata.txt +0 -6
- package/images/fan-speed.jpeg +0 -0
- package/images/homekit-controls.jpeg +0 -0
- package/images/homekit-settings.jpeg +0 -0
- package/images/swing-mode.png +0 -0
- package/jest.config.ts +0 -13
- package/test/fixtures/altherma-crSense-2.ts +0 -834
- package/test/fixtures/altherma-fraction.ts +0 -718
- package/test/fixtures/altherma-heat-pump-2.ts +0 -479
- package/test/fixtures/altherma-heat-pump.ts +0 -757
- package/test/fixtures/altherma-miladcerkic-off.ts +0 -524
- package/test/fixtures/altherma-miladcerkic.ts +0 -524
- package/test/fixtures/altherma-v1ckoeln.ts +0 -644
- package/test/fixtures/altherma-with-embedded-id-zero.ts +0 -834
- package/test/fixtures/dx23-airco-2.ts +0 -343
- package/test/fixtures/dx23-airco.ts +0 -518
- package/test/fixtures/dx4-airco.ts +0 -914
- package/test/fixtures/unknown-jan.ts +0 -488
- package/test/fixtures/unknown-kitchen-guests.ts +0 -488
- package/test/helpers/test-isolation.ts +0 -228
- package/test/integration/air-conditioning.test.ts +0 -410
- package/test/integration/altherma.test.ts +0 -289
- package/test/integration/platform.test.ts +0 -118
- package/test/mocks/index.ts +0 -27
- package/test/test-gigya-auth.js +0 -443
- package/test/test-mobile-oauth.js +0 -175
- package/test/test-websocket-mobile.js +0 -123
- package/test/test-websocket.js +0 -116
- package/test/unit/api/__snapshots__/daikinCloud.test.ts.snap +0 -1320
- package/test/unit/api/daikin-api.test.ts +0 -384
- package/test/unit/api/daikin-oauth.test.ts +0 -214
- package/test/unit/api/daikinCloud.test.ts +0 -12
- package/test/unit/config/config-manager.test.ts +0 -271
- package/test/unit/device/daikin-device.test.ts +0 -79
- package/test/unit/services/hot-water-tank.service.test.ts +0 -123
- package/test/unit/utils/error-handler.test.ts +0 -274
- package/test/unit/utils/log-context.test.ts +0 -271
package/docs/TROUBLESHOOTING.md
DELETED
|
@@ -1,475 +0,0 @@
|
|
|
1
|
-
# Troubleshooting Guide
|
|
2
|
-
|
|
3
|
-
This guide helps you diagnose and fix common issues with the Homebridge Daikin Cloud plugin.
|
|
4
|
-
|
|
5
|
-
## Table of Contents
|
|
6
|
-
|
|
7
|
-
- [Authentication Issues](#authentication-issues)
|
|
8
|
-
- [Device Not Appearing](#device-not-appearing)
|
|
9
|
-
- [Connection Problems](#connection-problems)
|
|
10
|
-
- [WebSocket Issues](#websocket-issues)
|
|
11
|
-
- [Rate Limiting](#rate-limiting)
|
|
12
|
-
- [Performance Issues](#performance-issues)
|
|
13
|
-
- [Configuration Errors](#configuration-errors)
|
|
14
|
-
|
|
15
|
-
---
|
|
16
|
-
|
|
17
|
-
## Authentication Issues
|
|
18
|
-
|
|
19
|
-
### Symptoms
|
|
20
|
-
- "Not authenticated" errors in logs
|
|
21
|
-
- Token expired messages
|
|
22
|
-
- Unable to see devices in Homebridge
|
|
23
|
-
|
|
24
|
-
### Solutions
|
|
25
|
-
|
|
26
|
-
#### Developer Portal Mode
|
|
27
|
-
|
|
28
|
-
1. **Check Credentials**
|
|
29
|
-
```bash
|
|
30
|
-
# Verify your credentials are correct
|
|
31
|
-
# Go to: https://developer.cloud.daikineurope.com/
|
|
32
|
-
```
|
|
33
|
-
|
|
34
|
-
2. **Verify Callback Server**
|
|
35
|
-
- Check firewall allows incoming connections on configured port (default: 8582)
|
|
36
|
-
- Ensure `callbackServerExternalAddress` is your external IP, not localhost
|
|
37
|
-
- Verify port forwarding is configured on your router
|
|
38
|
-
|
|
39
|
-
3. **Token File Location**
|
|
40
|
-
```bash
|
|
41
|
-
# Check if token file exists
|
|
42
|
-
ls -la ~/.homebridge/.daikin-controller-cloud-tokenset
|
|
43
|
-
|
|
44
|
-
# Check permissions (should be -rw------- / 600)
|
|
45
|
-
# If wrong, the plugin will fix it automatically on next save
|
|
46
|
-
```
|
|
47
|
-
|
|
48
|
-
4. **Re-authenticate**
|
|
49
|
-
- Go to Homebridge UI > Daikin Cloud plugin > Custom UI tab
|
|
50
|
-
- Click "Authenticate"
|
|
51
|
-
- Follow the OAuth flow
|
|
52
|
-
- Restart Homebridge
|
|
53
|
-
|
|
54
|
-
#### Mobile App Mode
|
|
55
|
-
|
|
56
|
-
1. **Verify Credentials**
|
|
57
|
-
- Use the same email/password as Daikin Onecta mobile app
|
|
58
|
-
- Try logging into the mobile app first to confirm credentials work
|
|
59
|
-
|
|
60
|
-
2. **Token File Location**
|
|
61
|
-
```bash
|
|
62
|
-
# Check if mobile token file exists
|
|
63
|
-
ls -la ~/.homebridge/.daikin-mobile-tokenset
|
|
64
|
-
```
|
|
65
|
-
|
|
66
|
-
3. **Re-authenticate**
|
|
67
|
-
- Go to Homebridge UI > Daikin Cloud plugin > Custom UI tab
|
|
68
|
-
- Click "Test & Save Credentials"
|
|
69
|
-
- Restart Homebridge
|
|
70
|
-
|
|
71
|
-
### Common Errors
|
|
72
|
-
|
|
73
|
-
**Error: `invalid_grant`**
|
|
74
|
-
- **Cause**: Token expired or credentials changed
|
|
75
|
-
- **Solution**: Delete token file and re-authenticate
|
|
76
|
-
```bash
|
|
77
|
-
rm ~/.homebridge/.daikin-controller-cloud-tokenset
|
|
78
|
-
# or for mobile:
|
|
79
|
-
rm ~/.homebridge/.daikin-mobile-tokenset
|
|
80
|
-
```
|
|
81
|
-
|
|
82
|
-
**Error: `Callback address cannot be localhost`**
|
|
83
|
-
- **Cause**: Using localhost/127.0.0.1 for callback server
|
|
84
|
-
- **Solution**: Use your external IP or domain name
|
|
85
|
-
|
|
86
|
-
---
|
|
87
|
-
|
|
88
|
-
## Device Not Appearing
|
|
89
|
-
|
|
90
|
-
### Diagnostic Steps
|
|
91
|
-
|
|
92
|
-
1. **Check Device in Daikin App**
|
|
93
|
-
- Verify device appears in Daikin Onecta mobile app
|
|
94
|
-
- Ensure device is online and connected to Wi-Fi
|
|
95
|
-
|
|
96
|
-
2. **Check Homebridge Logs**
|
|
97
|
-
```bash
|
|
98
|
-
# Enable debug mode in Homebridge settings
|
|
99
|
-
# Look for device discovery logs
|
|
100
|
-
grep "Daikin" ~/.homebridge/homebridge.log
|
|
101
|
-
```
|
|
102
|
-
|
|
103
|
-
3. **Check Device UUID**
|
|
104
|
-
- Each device gets a unique UUID based on device ID
|
|
105
|
-
- If UUID conflicts with another accessory, it won't appear
|
|
106
|
-
|
|
107
|
-
4. **Verify Device Not Excluded**
|
|
108
|
-
- Check `config.json` for `excludedDevicesByDeviceId`
|
|
109
|
-
- Device ID might be in exclusion list
|
|
110
|
-
|
|
111
|
-
### Solutions
|
|
112
|
-
|
|
113
|
-
**Device Shows in Logs But Not in HomeKit**
|
|
114
|
-
```bash
|
|
115
|
-
# Clear HomeKit cache
|
|
116
|
-
# WARNING: This will remove ALL accessories from HomeKit
|
|
117
|
-
rm -rf ~/.homebridge/accessories/cachedAccessories
|
|
118
|
-
|
|
119
|
-
# Restart Homebridge
|
|
120
|
-
sudo systemctl restart homebridge
|
|
121
|
-
```
|
|
122
|
-
|
|
123
|
-
**Device Model Not Supported**
|
|
124
|
-
- Check logs for "Failed to create accessory" errors
|
|
125
|
-
- File an issue on GitHub with device model info
|
|
126
|
-
|
|
127
|
-
**Device Excluded Accidentally**
|
|
128
|
-
1. Go to Homebridge UI > Daikin Cloud plugin > Settings tab
|
|
129
|
-
2. Check "Device Visibility" section
|
|
130
|
-
3. Toggle device back on
|
|
131
|
-
4. Restart Homebridge
|
|
132
|
-
|
|
133
|
-
---
|
|
134
|
-
|
|
135
|
-
## Connection Problems
|
|
136
|
-
|
|
137
|
-
### Network Connectivity
|
|
138
|
-
|
|
139
|
-
**Symptoms**: "Failed to get cloud devices", "ECONNREFUSED", "ETIMEDOUT"
|
|
140
|
-
|
|
141
|
-
**Solutions**:
|
|
142
|
-
|
|
143
|
-
1. **Check Internet Connection**
|
|
144
|
-
```bash
|
|
145
|
-
# Test connectivity to Daikin API
|
|
146
|
-
ping api.onecta.daikineurope.com
|
|
147
|
-
|
|
148
|
-
# Test HTTPS connectivity
|
|
149
|
-
curl -I https://api.onecta.daikineurope.com
|
|
150
|
-
```
|
|
151
|
-
|
|
152
|
-
2. **Check Firewall**
|
|
153
|
-
- Ensure outbound HTTPS (443) is allowed
|
|
154
|
-
- For WebSocket: Ensure wss:// connections allowed
|
|
155
|
-
|
|
156
|
-
3. **Proxy Configuration**
|
|
157
|
-
- If behind corporate proxy, set environment variables:
|
|
158
|
-
```bash
|
|
159
|
-
export HTTP_PROXY=http://proxy:8080
|
|
160
|
-
export HTTPS_PROXY=http://proxy:8080
|
|
161
|
-
```
|
|
162
|
-
|
|
163
|
-
### DNS Issues
|
|
164
|
-
|
|
165
|
-
**Error**: "getaddrinfo ENOTFOUND"
|
|
166
|
-
|
|
167
|
-
**Solution**:
|
|
168
|
-
```bash
|
|
169
|
-
# Check DNS resolution
|
|
170
|
-
nslookup api.onecta.daikineurope.com
|
|
171
|
-
|
|
172
|
-
# Try using different DNS (e.g., Google DNS)
|
|
173
|
-
# Edit /etc/resolv.conf:
|
|
174
|
-
nameserver 8.8.8.8
|
|
175
|
-
nameserver 8.8.4.4
|
|
176
|
-
```
|
|
177
|
-
|
|
178
|
-
---
|
|
179
|
-
|
|
180
|
-
## WebSocket Issues
|
|
181
|
-
|
|
182
|
-
### Symptoms
|
|
183
|
-
- Real-time updates not working
|
|
184
|
-
- Must manually refresh to see changes
|
|
185
|
-
- "WebSocket connection failed" in logs
|
|
186
|
-
|
|
187
|
-
### Diagnostic Steps
|
|
188
|
-
|
|
189
|
-
```bash
|
|
190
|
-
# Check WebSocket setting in config
|
|
191
|
-
cat ~/.homebridge/config.json | grep enableWebSocket
|
|
192
|
-
|
|
193
|
-
# Check logs for WebSocket errors
|
|
194
|
-
grep -i "websocket" ~/.homebridge/homebridge.log
|
|
195
|
-
```
|
|
196
|
-
|
|
197
|
-
### Solutions
|
|
198
|
-
|
|
199
|
-
**WebSocket Not Connecting**
|
|
200
|
-
|
|
201
|
-
1. **Enable WebSocket** (only works with Mobile App auth mode)
|
|
202
|
-
```json
|
|
203
|
-
{
|
|
204
|
-
"authMode": "mobile_app",
|
|
205
|
-
"enableWebSocket": true
|
|
206
|
-
}
|
|
207
|
-
```
|
|
208
|
-
|
|
209
|
-
2. **Check Firewall**
|
|
210
|
-
- Ensure outbound WSS connections allowed
|
|
211
|
-
- Port: 443 (wss://)
|
|
212
|
-
|
|
213
|
-
3. **Verify Mobile App Mode**
|
|
214
|
-
- WebSocket only available with mobile app authentication
|
|
215
|
-
- Developer Portal mode doesn't support WebSocket
|
|
216
|
-
|
|
217
|
-
**WebSocket Keeps Disconnecting**
|
|
218
|
-
|
|
219
|
-
- This is normal - plugin will automatically reconnect
|
|
220
|
-
- Check for network stability issues
|
|
221
|
-
- Reduce update interval to compensate
|
|
222
|
-
|
|
223
|
-
**Disable WebSocket**
|
|
224
|
-
```json
|
|
225
|
-
{
|
|
226
|
-
"enableWebSocket": false
|
|
227
|
-
}
|
|
228
|
-
```
|
|
229
|
-
|
|
230
|
-
---
|
|
231
|
-
|
|
232
|
-
## Rate Limiting
|
|
233
|
-
|
|
234
|
-
### Understanding Rate Limits
|
|
235
|
-
|
|
236
|
-
| Auth Mode | Rate Limit | Recommended Interval |
|
|
237
|
-
|-----------|------------|---------------------|
|
|
238
|
-
| Developer Portal | 200 calls/day | 15+ minutes |
|
|
239
|
-
| Mobile App | 5000 calls/day | 1-5 minutes |
|
|
240
|
-
|
|
241
|
-
### Symptoms
|
|
242
|
-
- "Rate limit exceeded" errors
|
|
243
|
-
- 429 HTTP status codes
|
|
244
|
-
- Devices stop updating
|
|
245
|
-
|
|
246
|
-
### Check Current Usage
|
|
247
|
-
|
|
248
|
-
Go to Homebridge UI > Daikin Cloud plugin > Authentication tab to see:
|
|
249
|
-
- Remaining calls today
|
|
250
|
-
- Rate limit details
|
|
251
|
-
|
|
252
|
-
### Solutions
|
|
253
|
-
|
|
254
|
-
**Reduce Update Frequency**
|
|
255
|
-
```json
|
|
256
|
-
{
|
|
257
|
-
"updateIntervalInMinutes": 30, // Increase this value
|
|
258
|
-
"forceUpdateDelay": 120000 // 120 seconds (in milliseconds)
|
|
259
|
-
}
|
|
260
|
-
```
|
|
261
|
-
|
|
262
|
-
**Switch to Mobile App Mode**
|
|
263
|
-
- 25x higher rate limit (5000 vs 200 calls/day)
|
|
264
|
-
- Enables WebSocket for real-time updates
|
|
265
|
-
- Reduces polling needs
|
|
266
|
-
|
|
267
|
-
**Enable WebSocket** (Mobile App mode only)
|
|
268
|
-
```json
|
|
269
|
-
{
|
|
270
|
-
"authMode": "mobile_app",
|
|
271
|
-
"enableWebSocket": true,
|
|
272
|
-
"updateIntervalInMinutes": 60 // Can be higher with WebSocket
|
|
273
|
-
}
|
|
274
|
-
```
|
|
275
|
-
|
|
276
|
-
---
|
|
277
|
-
|
|
278
|
-
## Performance Issues
|
|
279
|
-
|
|
280
|
-
### Slow Response Times
|
|
281
|
-
|
|
282
|
-
**Check Update Interval**
|
|
283
|
-
```json
|
|
284
|
-
{
|
|
285
|
-
"updateIntervalInMinutes": 5, // Faster updates = more API calls
|
|
286
|
-
"forceUpdateDelay": 10000 // 10 seconds
|
|
287
|
-
}
|
|
288
|
-
```
|
|
289
|
-
|
|
290
|
-
**Recommendations**:
|
|
291
|
-
- Developer Portal: 15-30 minutes
|
|
292
|
-
- Mobile App (no WebSocket): 5-15 minutes
|
|
293
|
-
- Mobile App (with WebSocket): 30-60 minutes (WebSocket handles real-time updates)
|
|
294
|
-
|
|
295
|
-
### High Memory Usage
|
|
296
|
-
|
|
297
|
-
1. **Check Number of Devices**
|
|
298
|
-
- Each device creates multiple HomeKit services
|
|
299
|
-
- 10+ devices can use significant memory
|
|
300
|
-
|
|
301
|
-
2. **Exclude Unused Devices**
|
|
302
|
-
- Go to Settings tab > Device Visibility
|
|
303
|
-
- Disable devices you don't need
|
|
304
|
-
|
|
305
|
-
3. **Disable Unused Features**
|
|
306
|
-
```json
|
|
307
|
-
{
|
|
308
|
-
"showPowerfulMode": false,
|
|
309
|
-
"showEconoMode": false,
|
|
310
|
-
"showStreamerMode": false
|
|
311
|
-
}
|
|
312
|
-
```
|
|
313
|
-
|
|
314
|
-
### Homebridge Hanging
|
|
315
|
-
|
|
316
|
-
```bash
|
|
317
|
-
# Check for event loop blocking
|
|
318
|
-
# Enable debug mode and check logs for long operations
|
|
319
|
-
|
|
320
|
-
# Restart Homebridge
|
|
321
|
-
sudo systemctl restart homebridge
|
|
322
|
-
```
|
|
323
|
-
|
|
324
|
-
---
|
|
325
|
-
|
|
326
|
-
## Configuration Errors
|
|
327
|
-
|
|
328
|
-
### Validation Errors
|
|
329
|
-
|
|
330
|
-
The plugin now validates configuration at runtime. Check logs for:
|
|
331
|
-
|
|
332
|
-
**Port Errors**
|
|
333
|
-
```
|
|
334
|
-
Invalid port number: 99999. Must be between 1 and 65535.
|
|
335
|
-
```
|
|
336
|
-
**Solution**: Use valid port (default: 8582)
|
|
337
|
-
|
|
338
|
-
**Update Interval Errors**
|
|
339
|
-
```
|
|
340
|
-
Update interval must be between 1 and 60 minutes, got: 120
|
|
341
|
-
```
|
|
342
|
-
**Solution**: Use value between 1-60 minutes
|
|
343
|
-
|
|
344
|
-
**Localhost Warning**
|
|
345
|
-
```
|
|
346
|
-
Callback address cannot be localhost. Use your external IP or domain.
|
|
347
|
-
```
|
|
348
|
-
**Solution**: Configure external IP address
|
|
349
|
-
|
|
350
|
-
### Config Schema Migration
|
|
351
|
-
|
|
352
|
-
**Old Config Format** (deprecated):
|
|
353
|
-
```json
|
|
354
|
-
{
|
|
355
|
-
"showExtraFeatures": true
|
|
356
|
-
}
|
|
357
|
-
```
|
|
358
|
-
|
|
359
|
-
**New Config Format**:
|
|
360
|
-
```json
|
|
361
|
-
{
|
|
362
|
-
"showPowerfulMode": true,
|
|
363
|
-
"showEconoMode": true,
|
|
364
|
-
"showStreamerMode": true,
|
|
365
|
-
"showOutdoorSilentMode": true,
|
|
366
|
-
"showIndoorSilentMode": true
|
|
367
|
-
}
|
|
368
|
-
```
|
|
369
|
-
|
|
370
|
-
---
|
|
371
|
-
|
|
372
|
-
## Getting Help
|
|
373
|
-
|
|
374
|
-
### Enable Debug Mode
|
|
375
|
-
|
|
376
|
-
1. Go to Homebridge Settings
|
|
377
|
-
2. Enable "Debug Mode"
|
|
378
|
-
3. Restart Homebridge
|
|
379
|
-
4. Check logs in Homebridge UI
|
|
380
|
-
|
|
381
|
-
### Collect Diagnostic Information
|
|
382
|
-
|
|
383
|
-
```bash
|
|
384
|
-
# System info
|
|
385
|
-
uname -a
|
|
386
|
-
node --version
|
|
387
|
-
npm --version
|
|
388
|
-
|
|
389
|
-
# Homebridge info
|
|
390
|
-
hb-service status
|
|
391
|
-
cat ~/.homebridge/config.json | grep -A 20 "DaikinCloud"
|
|
392
|
-
|
|
393
|
-
# Recent logs (last 100 lines)
|
|
394
|
-
tail -100 ~/.homebridge/homebridge.log
|
|
395
|
-
|
|
396
|
-
# Check token files
|
|
397
|
-
ls -la ~/.homebridge/.daikin-*
|
|
398
|
-
```
|
|
399
|
-
|
|
400
|
-
### Report an Issue
|
|
401
|
-
|
|
402
|
-
When reporting issues on GitHub, please include:
|
|
403
|
-
|
|
404
|
-
1. **Plugin Version**: Check in Homebridge UI
|
|
405
|
-
2. **Node.js Version**: `node --version`
|
|
406
|
-
3. **Auth Mode**: Developer Portal or Mobile App
|
|
407
|
-
4. **Error Messages**: Full error from logs
|
|
408
|
-
5. **Device Model**: From Daikin app
|
|
409
|
-
6. **Config** (sanitized): Remove credentials!
|
|
410
|
-
|
|
411
|
-
**Example Issue Report**:
|
|
412
|
-
```
|
|
413
|
-
**Environment**
|
|
414
|
-
- Plugin Version: 1.2.5
|
|
415
|
-
- Node.js: v20.19.6
|
|
416
|
-
- Homebridge: v1.8.0
|
|
417
|
-
- Auth Mode: mobile_app
|
|
418
|
-
|
|
419
|
-
**Problem**
|
|
420
|
-
Device not appearing in HomeKit after authentication.
|
|
421
|
-
|
|
422
|
-
**Logs**
|
|
423
|
-
[paste relevant log lines here]
|
|
424
|
-
|
|
425
|
-
**Config** (credentials removed)
|
|
426
|
-
[paste sanitized config here]
|
|
427
|
-
```
|
|
428
|
-
|
|
429
|
-
---
|
|
430
|
-
|
|
431
|
-
## Quick Reference
|
|
432
|
-
|
|
433
|
-
### Reset Everything
|
|
434
|
-
|
|
435
|
-
```bash
|
|
436
|
-
# 1. Remove token files
|
|
437
|
-
rm ~/.homebridge/.daikin-*
|
|
438
|
-
|
|
439
|
-
# 2. Clear cached accessories
|
|
440
|
-
rm -rf ~/.homebridge/accessories/cachedAccessories
|
|
441
|
-
|
|
442
|
-
# 3. Restart Homebridge
|
|
443
|
-
sudo systemctl restart homebridge
|
|
444
|
-
|
|
445
|
-
# 4. Re-authenticate in UI
|
|
446
|
-
```
|
|
447
|
-
|
|
448
|
-
### Check Plugin Health
|
|
449
|
-
|
|
450
|
-
```bash
|
|
451
|
-
# Check if plugin is loaded
|
|
452
|
-
hb-service logs | grep "Daikin"
|
|
453
|
-
|
|
454
|
-
# Check for errors
|
|
455
|
-
hb-service logs | grep -i "error"
|
|
456
|
-
|
|
457
|
-
# Check authentication status
|
|
458
|
-
cat ~/.homebridge/.daikin-controller-cloud-tokenset | jq .expires_at
|
|
459
|
-
```
|
|
460
|
-
|
|
461
|
-
### Test API Connectivity
|
|
462
|
-
|
|
463
|
-
```bash
|
|
464
|
-
# Test with curl (replace TOKEN with actual token)
|
|
465
|
-
curl -H "Authorization: Bearer TOKEN" \
|
|
466
|
-
https://api.onecta.daikineurope.com/v1/gateway-devices
|
|
467
|
-
```
|
|
468
|
-
|
|
469
|
-
---
|
|
470
|
-
|
|
471
|
-
## Additional Resources
|
|
472
|
-
|
|
473
|
-
- [GitHub Repository](https://github.com/mp-consulting/homebridge-daikin-cloud)
|
|
474
|
-
- [Homebridge Documentation](https://github.com/homebridge/homebridge/wiki)
|
|
475
|
-
- [Daikin Developer Portal](https://developer.cloud.daikineurope.com/)
|