@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.
Files changed (234) hide show
  1. package/LICENSE +39 -1
  2. package/README.md +5 -3
  3. package/dist/src/accessories/air-conditioning-accessory.d.ts +2 -2
  4. package/dist/src/accessories/air-conditioning-accessory.d.ts.map +1 -1
  5. package/dist/src/accessories/air-conditioning-accessory.js.map +1 -1
  6. package/dist/src/accessories/altherma-accessory.d.ts +2 -2
  7. package/dist/src/accessories/altherma-accessory.d.ts.map +1 -1
  8. package/dist/src/accessories/altherma-accessory.js.map +1 -1
  9. package/dist/src/accessories/base-accessory.d.ts +6 -6
  10. package/dist/src/accessories/base-accessory.d.ts.map +1 -1
  11. package/dist/src/accessories/base-accessory.js +15 -15
  12. package/dist/src/accessories/base-accessory.js.map +1 -1
  13. package/dist/src/api/daikin-api.d.ts +26 -26
  14. package/dist/src/api/daikin-api.d.ts.map +1 -1
  15. package/dist/src/api/daikin-api.js +68 -42
  16. package/dist/src/api/daikin-api.js.map +1 -1
  17. package/dist/src/api/daikin-cloud.repository.d.ts.map +1 -1
  18. package/dist/src/api/daikin-cloud.repository.js +22 -14
  19. package/dist/src/api/daikin-cloud.repository.js.map +1 -1
  20. package/dist/src/api/daikin-controller.d.ts +41 -47
  21. package/dist/src/api/daikin-controller.d.ts.map +1 -1
  22. package/dist/src/api/daikin-controller.js +40 -64
  23. package/dist/src/api/daikin-controller.js.map +1 -1
  24. package/dist/src/api/daikin-device.d.ts +36 -31
  25. package/dist/src/api/daikin-device.d.ts.map +1 -1
  26. package/dist/src/api/daikin-device.js +45 -31
  27. package/dist/src/api/daikin-device.js.map +1 -1
  28. package/dist/src/api/daikin-mobile-oauth.d.ts +20 -20
  29. package/dist/src/api/daikin-mobile-oauth.d.ts.map +1 -1
  30. package/dist/src/api/daikin-mobile-oauth.js +49 -44
  31. package/dist/src/api/daikin-mobile-oauth.js.map +1 -1
  32. package/dist/src/api/daikin-oauth.d.ts +32 -32
  33. package/dist/src/api/daikin-oauth.d.ts.map +1 -1
  34. package/dist/src/api/daikin-oauth.js +64 -56
  35. package/dist/src/api/daikin-oauth.js.map +1 -1
  36. package/dist/src/api/daikin-schemas.d.ts +476 -351
  37. package/dist/src/api/daikin-schemas.d.ts.map +1 -1
  38. package/dist/src/api/daikin-schemas.js +11 -42
  39. package/dist/src/api/daikin-schemas.js.map +1 -1
  40. package/dist/src/api/daikin-types.d.ts +5 -1
  41. package/dist/src/api/daikin-types.d.ts.map +1 -1
  42. package/dist/src/api/daikin-types.js.map +1 -1
  43. package/dist/src/api/daikin-websocket.d.ts +31 -32
  44. package/dist/src/api/daikin-websocket.d.ts.map +1 -1
  45. package/dist/src/api/daikin-websocket.js +55 -35
  46. package/dist/src/api/daikin-websocket.js.map +1 -1
  47. package/dist/src/api/index.d.ts +2 -1
  48. package/dist/src/api/index.d.ts.map +1 -1
  49. package/dist/src/api/index.js +3 -1
  50. package/dist/src/api/index.js.map +1 -1
  51. package/dist/src/api/token-storage.d.ts +21 -0
  52. package/dist/src/api/token-storage.d.ts.map +1 -0
  53. package/dist/src/api/token-storage.js +90 -0
  54. package/dist/src/api/token-storage.js.map +1 -0
  55. package/dist/src/config/config-manager.d.ts +33 -33
  56. package/dist/src/config/config-manager.d.ts.map +1 -1
  57. package/dist/src/config/config-manager.js +33 -33
  58. package/dist/src/config/config-manager.js.map +1 -1
  59. package/dist/src/constants/api.constants.d.ts +4 -0
  60. package/dist/src/constants/api.constants.d.ts.map +1 -1
  61. package/dist/src/constants/api.constants.js +5 -1
  62. package/dist/src/constants/api.constants.js.map +1 -1
  63. package/dist/src/constants/device.constants.d.ts +4 -0
  64. package/dist/src/constants/device.constants.d.ts.map +1 -1
  65. package/dist/src/constants/device.constants.js +5 -1
  66. package/dist/src/constants/device.constants.js.map +1 -1
  67. package/dist/src/device/accessory-factory.d.ts +10 -10
  68. package/dist/src/device/accessory-factory.d.ts.map +1 -1
  69. package/dist/src/device/accessory-factory.js +7 -7
  70. package/dist/src/device/accessory-factory.js.map +1 -1
  71. package/dist/src/device/capability-detector.d.ts +8 -8
  72. package/dist/src/device/capability-detector.d.ts.map +1 -1
  73. package/dist/src/device/capability-detector.js +6 -6
  74. package/dist/src/device/capability-detector.js.map +1 -1
  75. package/dist/src/device/capability-docs.d.ts +1 -9
  76. package/dist/src/device/capability-docs.d.ts.map +1 -1
  77. package/dist/src/device/capability-docs.js +19 -73
  78. package/dist/src/device/capability-docs.js.map +1 -1
  79. package/dist/src/device/profiles/device-profile.d.ts +1 -1
  80. package/dist/src/device/profiles/device-profile.d.ts.map +1 -1
  81. package/dist/src/device/profiles/device-profile.js +4 -4
  82. package/dist/src/device/profiles/device-profile.js.map +1 -1
  83. package/dist/src/features/base-feature.d.ts +2 -2
  84. package/dist/src/features/base-feature.d.ts.map +1 -1
  85. package/dist/src/features/base-feature.js +2 -3
  86. package/dist/src/features/base-feature.js.map +1 -1
  87. package/dist/src/features/feature-manager.d.ts +8 -16
  88. package/dist/src/features/feature-manager.d.ts.map +1 -1
  89. package/dist/src/features/feature-manager.js +5 -17
  90. package/dist/src/features/feature-manager.js.map +1 -1
  91. package/dist/src/features/modes/dry-operation-mode.feature.d.ts +1 -1
  92. package/dist/src/features/modes/dry-operation-mode.feature.d.ts.map +1 -1
  93. package/dist/src/features/modes/dry-operation-mode.feature.js.map +1 -1
  94. package/dist/src/features/modes/econo-mode.feature.d.ts +1 -1
  95. package/dist/src/features/modes/econo-mode.feature.d.ts.map +1 -1
  96. package/dist/src/features/modes/econo-mode.feature.js.map +1 -1
  97. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts +1 -1
  98. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts.map +1 -1
  99. package/dist/src/features/modes/fan-only-operation-mode.feature.js.map +1 -1
  100. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts +1 -1
  101. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts.map +1 -1
  102. package/dist/src/features/modes/indoor-silent-mode.feature.js.map +1 -1
  103. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts +1 -1
  104. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts.map +1 -1
  105. package/dist/src/features/modes/outdoor-silent-mode.feature.js.map +1 -1
  106. package/dist/src/features/modes/powerful-mode.feature.d.ts +1 -1
  107. package/dist/src/features/modes/powerful-mode.feature.d.ts.map +1 -1
  108. package/dist/src/features/modes/powerful-mode.feature.js.map +1 -1
  109. package/dist/src/features/modes/streamer-mode.feature.d.ts +1 -1
  110. package/dist/src/features/modes/streamer-mode.feature.d.ts.map +1 -1
  111. package/dist/src/features/modes/streamer-mode.feature.js.map +1 -1
  112. package/dist/src/index.d.ts +1 -1
  113. package/dist/src/index.d.ts.map +1 -1
  114. package/dist/src/index.js.map +1 -1
  115. package/dist/src/platform.d.ts +11 -8
  116. package/dist/src/platform.d.ts.map +1 -1
  117. package/dist/src/platform.js +64 -15
  118. package/dist/src/platform.js.map +1 -1
  119. package/dist/src/services/climate-control.service.d.ts +8 -2
  120. package/dist/src/services/climate-control.service.d.ts.map +1 -1
  121. package/dist/src/services/climate-control.service.js +59 -58
  122. package/dist/src/services/climate-control.service.js.map +1 -1
  123. package/dist/src/services/hot-water-tank.service.d.ts +6 -2
  124. package/dist/src/services/hot-water-tank.service.d.ts.map +1 -1
  125. package/dist/src/services/hot-water-tank.service.js +33 -31
  126. package/dist/src/services/hot-water-tank.service.js.map +1 -1
  127. package/dist/src/types/daikin-enums.js +12 -12
  128. package/dist/src/types/daikin-enums.js.map +1 -1
  129. package/dist/src/types/device-capabilities.d.ts +1 -1
  130. package/dist/src/types/device-capabilities.d.ts.map +1 -1
  131. package/dist/src/utils/log-context.d.ts +23 -23
  132. package/dist/src/utils/log-context.d.ts.map +1 -1
  133. package/dist/src/utils/log-context.js +28 -28
  134. package/dist/src/utils/log-context.js.map +1 -1
  135. package/dist/src/utils/strings.d.ts.map +1 -1
  136. package/dist/src/utils/strings.js.map +1 -1
  137. package/dist/src/utils/update-mapper.d.ts +16 -16
  138. package/dist/src/utils/update-mapper.d.ts.map +1 -1
  139. package/dist/src/utils/update-mapper.js +14 -14
  140. package/dist/src/utils/update-mapper.js.map +1 -1
  141. package/homebridge-ui/public/index.html +2 -2
  142. package/homebridge-ui/public/script.js +957 -898
  143. package/homebridge-ui/server.js +746 -678
  144. package/package.json +29 -27
  145. package/.claude/settings.json +0 -3
  146. package/.claude/settings.local.json +0 -29
  147. package/CHANGELOG.md +0 -103
  148. package/CLAUDE.md +0 -269
  149. package/config.md +0 -2
  150. package/dist/src/api/daikin-device-tracker.d.ts +0 -97
  151. package/dist/src/api/daikin-device-tracker.d.ts.map +0 -1
  152. package/dist/src/api/daikin-device-tracker.js +0 -136
  153. package/dist/src/api/daikin-device-tracker.js.map +0 -1
  154. package/dist/src/api/http-interceptor.d.ts +0 -99
  155. package/dist/src/api/http-interceptor.d.ts.map +0 -1
  156. package/dist/src/api/http-interceptor.js +0 -177
  157. package/dist/src/api/http-interceptor.js.map +0 -1
  158. package/dist/src/di/service-container.d.ts +0 -92
  159. package/dist/src/di/service-container.d.ts.map +0 -1
  160. package/dist/src/di/service-container.js +0 -156
  161. package/dist/src/di/service-container.js.map +0 -1
  162. package/dist/src/features/feature-registry.d.ts +0 -100
  163. package/dist/src/features/feature-registry.d.ts.map +0 -1
  164. package/dist/src/features/feature-registry.js +0 -142
  165. package/dist/src/features/feature-registry.js.map +0 -1
  166. package/dist/src/services/service-factory.d.ts +0 -46
  167. package/dist/src/services/service-factory.d.ts.map +0 -1
  168. package/dist/src/services/service-factory.js +0 -72
  169. package/dist/src/services/service-factory.js.map +0 -1
  170. package/dist/src/utils/error-handler.d.ts +0 -101
  171. package/dist/src/utils/error-handler.d.ts.map +0 -1
  172. package/dist/src/utils/error-handler.js +0 -251
  173. package/dist/src/utils/error-handler.js.map +0 -1
  174. package/dist/src/utils/retry.d.ts +0 -42
  175. package/dist/src/utils/retry.d.ts.map +0 -1
  176. package/dist/src/utils/retry.js +0 -70
  177. package/dist/src/utils/retry.js.map +0 -1
  178. package/docs/ARCHITECTURE.md +0 -645
  179. package/docs/IMPLEMENTATION_GUIDE.md +0 -899
  180. package/docs/IMPROVEMENTS_SUMMARY.md +0 -415
  181. package/docs/NEXT_STEPS.md +0 -368
  182. package/docs/Screenshot 2024-07-04 at 18.41.28.png +0 -0
  183. package/docs/TROUBLESHOOTING.md +0 -475
  184. package/docs/api-response-for-BRP069A8x.json +0 -520
  185. package/docs/api-response-for-BRP069C4x-2.json +0 -881
  186. package/docs/api-response-for-BRP069C4x.json +0 -916
  187. package/docs/api-response-for-altherma.json +0 -759
  188. package/docs/api-response-for-altherma2.json +0 -2735
  189. package/docs/api-response-with-multiple-devices-incl-heatpump.json +0 -2544
  190. package/docs/cr-insance-altherma-id-0.json +0 -834
  191. package/docs/mock-air-to-air-dx23.json +0 -759
  192. package/docs/mock-air-to-air-dx4.json +0 -1134
  193. package/docs/mock-airpurifier-with-humidifier.json +0 -732
  194. package/docs/mock-airpurifier.json +0 -450
  195. package/docs/mock-altherma-air-to-water-lan.json +0 -845
  196. package/docs/mock-altherma-air-to-water-wlan.json +0 -845
  197. package/docs/mock-d2cnd-gas-boiler.json +0 -649
  198. package/docs/setpointmode-vs-controlmode-vs-setpoints-vs-sensorydata.txt +0 -6
  199. package/images/fan-speed.jpeg +0 -0
  200. package/images/homekit-controls.jpeg +0 -0
  201. package/images/homekit-settings.jpeg +0 -0
  202. package/images/swing-mode.png +0 -0
  203. package/jest.config.ts +0 -13
  204. package/test/fixtures/altherma-crSense-2.ts +0 -834
  205. package/test/fixtures/altherma-fraction.ts +0 -718
  206. package/test/fixtures/altherma-heat-pump-2.ts +0 -479
  207. package/test/fixtures/altherma-heat-pump.ts +0 -757
  208. package/test/fixtures/altherma-miladcerkic-off.ts +0 -524
  209. package/test/fixtures/altherma-miladcerkic.ts +0 -524
  210. package/test/fixtures/altherma-v1ckoeln.ts +0 -644
  211. package/test/fixtures/altherma-with-embedded-id-zero.ts +0 -834
  212. package/test/fixtures/dx23-airco-2.ts +0 -343
  213. package/test/fixtures/dx23-airco.ts +0 -518
  214. package/test/fixtures/dx4-airco.ts +0 -914
  215. package/test/fixtures/unknown-jan.ts +0 -488
  216. package/test/fixtures/unknown-kitchen-guests.ts +0 -488
  217. package/test/helpers/test-isolation.ts +0 -228
  218. package/test/integration/air-conditioning.test.ts +0 -410
  219. package/test/integration/altherma.test.ts +0 -289
  220. package/test/integration/platform.test.ts +0 -118
  221. package/test/mocks/index.ts +0 -27
  222. package/test/test-gigya-auth.js +0 -443
  223. package/test/test-mobile-oauth.js +0 -175
  224. package/test/test-websocket-mobile.js +0 -123
  225. package/test/test-websocket.js +0 -116
  226. package/test/unit/api/__snapshots__/daikinCloud.test.ts.snap +0 -1320
  227. package/test/unit/api/daikin-api.test.ts +0 -384
  228. package/test/unit/api/daikin-oauth.test.ts +0 -214
  229. package/test/unit/api/daikinCloud.test.ts +0 -12
  230. package/test/unit/config/config-manager.test.ts +0 -271
  231. package/test/unit/device/daikin-device.test.ts +0 -79
  232. package/test/unit/services/hot-water-tank.service.test.ts +0 -123
  233. package/test/unit/utils/error-handler.test.ts +0 -274
  234. package/test/unit/utils/log-context.test.ts +0 -271
@@ -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/)