@mp-consulting/homebridge-daikin-cloud 1.0.0

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 (202) hide show
  1. package/.claude/settings.json +3 -0
  2. package/.claude/settings.local.json +8 -0
  3. package/CLAUDE.md +34 -0
  4. package/LICENSE +176 -0
  5. package/README.md +180 -0
  6. package/changelog.md +217 -0
  7. package/config.md +2 -0
  8. package/config.schema.json +146 -0
  9. package/dist/src/accessories/air-conditioning-accessory.d.ts +9 -0
  10. package/dist/src/accessories/air-conditioning-accessory.d.ts.map +1 -0
  11. package/dist/src/accessories/air-conditioning-accessory.js +19 -0
  12. package/dist/src/accessories/air-conditioning-accessory.js.map +1 -0
  13. package/dist/src/accessories/altherma-accessory.d.ts +11 -0
  14. package/dist/src/accessories/altherma-accessory.d.ts.map +1 -0
  15. package/dist/src/accessories/altherma-accessory.js +31 -0
  16. package/dist/src/accessories/altherma-accessory.js.map +1 -0
  17. package/dist/src/accessories/base-accessory.d.ts +16 -0
  18. package/dist/src/accessories/base-accessory.d.ts.map +1 -0
  19. package/dist/src/accessories/base-accessory.js +56 -0
  20. package/dist/src/accessories/base-accessory.js.map +1 -0
  21. package/dist/src/accessories/index.d.ts +4 -0
  22. package/dist/src/accessories/index.d.ts.map +1 -0
  23. package/dist/src/accessories/index.js +20 -0
  24. package/dist/src/accessories/index.js.map +1 -0
  25. package/dist/src/api/daikin-cloud.repository.d.ts +4 -0
  26. package/dist/src/api/daikin-cloud.repository.d.ts.map +1 -0
  27. package/dist/src/api/daikin-cloud.repository.js +31 -0
  28. package/dist/src/api/daikin-cloud.repository.js.map +1 -0
  29. package/dist/src/api/index.d.ts +2 -0
  30. package/dist/src/api/index.d.ts.map +1 -0
  31. package/dist/src/api/index.js +18 -0
  32. package/dist/src/api/index.js.map +1 -0
  33. package/dist/src/device/accessory-factory.d.ts +36 -0
  34. package/dist/src/device/accessory-factory.d.ts.map +1 -0
  35. package/dist/src/device/accessory-factory.js +61 -0
  36. package/dist/src/device/accessory-factory.js.map +1 -0
  37. package/dist/src/device/capability-detector.d.ts +36 -0
  38. package/dist/src/device/capability-detector.d.ts.map +1 -0
  39. package/dist/src/device/capability-detector.js +130 -0
  40. package/dist/src/device/capability-detector.js.map +1 -0
  41. package/dist/src/device/capability-docs.d.ts +20 -0
  42. package/dist/src/device/capability-docs.d.ts.map +1 -0
  43. package/dist/src/device/capability-docs.js +98 -0
  44. package/dist/src/device/capability-docs.js.map +1 -0
  45. package/dist/src/device/index.d.ts +5 -0
  46. package/dist/src/device/index.d.ts.map +1 -0
  47. package/dist/src/device/index.js +21 -0
  48. package/dist/src/device/index.js.map +1 -0
  49. package/dist/src/device/profiles/device-profile.d.ts +42 -0
  50. package/dist/src/device/profiles/device-profile.d.ts.map +1 -0
  51. package/dist/src/device/profiles/device-profile.js +103 -0
  52. package/dist/src/device/profiles/device-profile.js.map +1 -0
  53. package/dist/src/device/profiles/index.d.ts +2 -0
  54. package/dist/src/device/profiles/index.d.ts.map +1 -0
  55. package/dist/src/device/profiles/index.js +18 -0
  56. package/dist/src/device/profiles/index.js.map +1 -0
  57. package/dist/src/features/base-feature.d.ts +65 -0
  58. package/dist/src/features/base-feature.d.ts.map +1 -0
  59. package/dist/src/features/base-feature.js +99 -0
  60. package/dist/src/features/base-feature.js.map +1 -0
  61. package/dist/src/features/feature-manager.d.ts +37 -0
  62. package/dist/src/features/feature-manager.d.ts.map +1 -0
  63. package/dist/src/features/feature-manager.js +68 -0
  64. package/dist/src/features/feature-manager.js.map +1 -0
  65. package/dist/src/features/index.d.ts +4 -0
  66. package/dist/src/features/index.d.ts.map +1 -0
  67. package/dist/src/features/index.js +20 -0
  68. package/dist/src/features/index.js.map +1 -0
  69. package/dist/src/features/modes/dry-operation-mode.feature.d.ts +16 -0
  70. package/dist/src/features/modes/dry-operation-mode.feature.d.ts.map +1 -0
  71. package/dist/src/features/modes/dry-operation-mode.feature.js +40 -0
  72. package/dist/src/features/modes/dry-operation-mode.feature.js.map +1 -0
  73. package/dist/src/features/modes/econo-mode.feature.d.ts +15 -0
  74. package/dist/src/features/modes/econo-mode.feature.d.ts.map +1 -0
  75. package/dist/src/features/modes/econo-mode.feature.js +37 -0
  76. package/dist/src/features/modes/econo-mode.feature.js.map +1 -0
  77. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts +16 -0
  78. package/dist/src/features/modes/fan-only-operation-mode.feature.d.ts.map +1 -0
  79. package/dist/src/features/modes/fan-only-operation-mode.feature.js +40 -0
  80. package/dist/src/features/modes/fan-only-operation-mode.feature.js.map +1 -0
  81. package/dist/src/features/modes/index.d.ts +8 -0
  82. package/dist/src/features/modes/index.d.ts.map +1 -0
  83. package/dist/src/features/modes/index.js +24 -0
  84. package/dist/src/features/modes/index.js.map +1 -0
  85. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts +17 -0
  86. package/dist/src/features/modes/indoor-silent-mode.feature.d.ts.map +1 -0
  87. package/dist/src/features/modes/indoor-silent-mode.feature.js +47 -0
  88. package/dist/src/features/modes/indoor-silent-mode.feature.js.map +1 -0
  89. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts +15 -0
  90. package/dist/src/features/modes/outdoor-silent-mode.feature.d.ts.map +1 -0
  91. package/dist/src/features/modes/outdoor-silent-mode.feature.js +37 -0
  92. package/dist/src/features/modes/outdoor-silent-mode.feature.js.map +1 -0
  93. package/dist/src/features/modes/powerful-mode.feature.d.ts +15 -0
  94. package/dist/src/features/modes/powerful-mode.feature.d.ts.map +1 -0
  95. package/dist/src/features/modes/powerful-mode.feature.js +37 -0
  96. package/dist/src/features/modes/powerful-mode.feature.js.map +1 -0
  97. package/dist/src/features/modes/streamer-mode.feature.d.ts +15 -0
  98. package/dist/src/features/modes/streamer-mode.feature.d.ts.map +1 -0
  99. package/dist/src/features/modes/streamer-mode.feature.js +37 -0
  100. package/dist/src/features/modes/streamer-mode.feature.js.map +1 -0
  101. package/dist/src/index.d.ts +7 -0
  102. package/dist/src/index.d.ts.map +1 -0
  103. package/dist/src/index.js +7 -0
  104. package/dist/src/index.js.map +1 -0
  105. package/dist/src/platform.d.ts +33 -0
  106. package/dist/src/platform.d.ts.map +1 -0
  107. package/dist/src/platform.js +209 -0
  108. package/dist/src/platform.js.map +1 -0
  109. package/dist/src/services/climate-control.service.d.ts +43 -0
  110. package/dist/src/services/climate-control.service.d.ts.map +1 -0
  111. package/dist/src/services/climate-control.service.js +366 -0
  112. package/dist/src/services/climate-control.service.js.map +1 -0
  113. package/dist/src/services/hot-water-tank.service.d.ts +23 -0
  114. package/dist/src/services/hot-water-tank.service.d.ts.map +1 -0
  115. package/dist/src/services/hot-water-tank.service.js +214 -0
  116. package/dist/src/services/hot-water-tank.service.js.map +1 -0
  117. package/dist/src/services/index.d.ts +3 -0
  118. package/dist/src/services/index.d.ts.map +1 -0
  119. package/dist/src/services/index.js +19 -0
  120. package/dist/src/services/index.js.map +1 -0
  121. package/dist/src/settings.d.ts +9 -0
  122. package/dist/src/settings.d.ts.map +1 -0
  123. package/dist/src/settings.js +12 -0
  124. package/dist/src/settings.js.map +1 -0
  125. package/dist/src/types/daikin-enums.d.ts +61 -0
  126. package/dist/src/types/daikin-enums.d.ts.map +1 -0
  127. package/dist/src/types/daikin-enums.js +76 -0
  128. package/dist/src/types/daikin-enums.js.map +1 -0
  129. package/dist/src/types/device-capabilities.d.ts +47 -0
  130. package/dist/src/types/device-capabilities.d.ts.map +1 -0
  131. package/dist/src/types/device-capabilities.js +7 -0
  132. package/dist/src/types/device-capabilities.js.map +1 -0
  133. package/dist/src/types/index.d.ts +3 -0
  134. package/dist/src/types/index.d.ts.map +1 -0
  135. package/dist/src/types/index.js +19 -0
  136. package/dist/src/types/index.js.map +1 -0
  137. package/dist/src/utils/strings.d.ts +5 -0
  138. package/dist/src/utils/strings.d.ts.map +1 -0
  139. package/dist/src/utils/strings.js +22 -0
  140. package/dist/src/utils/strings.js.map +1 -0
  141. package/docs/Screenshot 2024-07-04 at 18.41.28.png +0 -0
  142. package/docs/api-response-for-BRP069A8x.json +520 -0
  143. package/docs/api-response-for-BRP069C4x-2.json +881 -0
  144. package/docs/api-response-for-BRP069C4x.json +916 -0
  145. package/docs/api-response-for-altherma.json +759 -0
  146. package/docs/api-response-for-altherma2.json +2735 -0
  147. package/docs/api-response-with-multiple-devices-incl-heatpump.json +2544 -0
  148. package/docs/cr-insance-altherma-id-0.json +834 -0
  149. package/docs/mock-air-to-air-dx23.json +759 -0
  150. package/docs/mock-air-to-air-dx4.json +1134 -0
  151. package/docs/mock-airpurifier-with-humidifier.json +732 -0
  152. package/docs/mock-airpurifier.json +450 -0
  153. package/docs/mock-altherma-air-to-water-lan.json +845 -0
  154. package/docs/mock-altherma-air-to-water-wlan.json +845 -0
  155. package/docs/mock-d2cnd-gas-boiler.json +649 -0
  156. package/docs/setpointmode-vs-controlmode-vs-setpoints-vs-sensorydata.txt +6 -0
  157. package/homebridge-ui/README.md +35 -0
  158. package/homebridge-ui/public/index.html +222 -0
  159. package/homebridge-ui/public/script.js +796 -0
  160. package/homebridge-ui/public/styles.css +456 -0
  161. package/homebridge-ui/server.js +909 -0
  162. package/jest.config.ts +13 -0
  163. package/package.json +63 -0
  164. package/test/fixtures/altherma-crSense-2.ts +834 -0
  165. package/test/fixtures/altherma-fraction.ts +719 -0
  166. package/test/fixtures/altherma-heat-pump-2.ts +479 -0
  167. package/test/fixtures/altherma-heat-pump.ts +758 -0
  168. package/test/fixtures/altherma-miladcerkic-off.ts +524 -0
  169. package/test/fixtures/altherma-miladcerkic.ts +524 -0
  170. package/test/fixtures/altherma-v1ckoeln.ts +645 -0
  171. package/test/fixtures/altherma-with-embedded-id-zero.ts +834 -0
  172. package/test/fixtures/dx23-airco-2.ts +343 -0
  173. package/test/fixtures/dx23-airco.ts +519 -0
  174. package/test/fixtures/dx4-airco.ts +915 -0
  175. package/test/fixtures/unknown-jan.ts +489 -0
  176. package/test/fixtures/unknown-kitchen-guests.ts +489 -0
  177. package/test/hbConfig/.daikin-controller-cloud-tokenset +8 -0
  178. package/test/hbConfig/.uix-dashboard.json +1 -0
  179. package/test/hbConfig/.uix-secrets +1 -0
  180. package/test/hbConfig/accessories/.cachedAccessories.bak +1 -0
  181. package/test/hbConfig/accessories/cachedAccessories +1 -0
  182. package/test/hbConfig/accessories/uiAccessoriesLayout.json +1 -0
  183. package/test/hbConfig/auth.json +10 -0
  184. package/test/hbConfig/backups/config-backups/config.json.1767953686461 +25 -0
  185. package/test/hbConfig/backups/config-backups/config.json.1767953695236 +29 -0
  186. package/test/hbConfig/backups/config-backups/config.json.1767953814763 +29 -0
  187. package/test/hbConfig/backups/config-backups/config.json.1767953823101 +29 -0
  188. package/test/hbConfig/backups/config-backups/config.json.1767954822835 +29 -0
  189. package/test/hbConfig/backups/config-backups/config.json.1767954859218 +29 -0
  190. package/test/hbConfig/config.json +33 -0
  191. package/test/hbConfig/daikin-cloud-certs/server.crt +22 -0
  192. package/test/hbConfig/daikin-cloud-certs/server.key +28 -0
  193. package/test/hbConfig/persist/AccessoryInfo.1E4A432551BA.json +1 -0
  194. package/test/hbConfig/persist/IdentifierCache.1E4A432551BA.json +1 -0
  195. package/test/integration/air-conditioning.test.ts +396 -0
  196. package/test/integration/altherma.test.ts +288 -0
  197. package/test/integration/platform.test.ts +101 -0
  198. package/test/mocks/index.ts +27 -0
  199. package/test/unit/api/__snapshots__/daikinCloud.test.ts.snap +1323 -0
  200. package/test/unit/api/daikinCloud.test.ts +12 -0
  201. package/test/unit/device/daikin-device.test.ts +29 -0
  202. package/test/unit/services/hot-water-tank.service.test.ts +107 -0
@@ -0,0 +1,3 @@
1
+ {
2
+ "coAuthoredBy": false
3
+ }
@@ -0,0 +1,8 @@
1
+ {
2
+ "permissions": {
3
+ "allow": [
4
+ "Bash(npm test)",
5
+ "Bash(npm run lint)"
6
+ ]
7
+ }
8
+ }
package/CLAUDE.md ADDED
@@ -0,0 +1,34 @@
1
+ # Claude Code Settings
2
+
3
+ ## Git Settings
4
+
5
+ - `coAuthoredBy`: false
6
+
7
+ ## Git Commit Convention
8
+
9
+ Use conventional commits format for all commit messages:
10
+
11
+ ```
12
+ <type>(<scope>): <description>
13
+
14
+ [optional body]
15
+
16
+ [optional footer]
17
+ ```
18
+
19
+ ### Types
20
+ - `feat`: New feature
21
+ - `fix`: Bug fix
22
+ - `docs`: Documentation changes
23
+ - `style`: Code style changes (formatting, semicolons, etc.)
24
+ - `refactor`: Code refactoring (no functional changes)
25
+ - `test`: Adding or updating tests
26
+ - `chore`: Maintenance tasks, dependencies, build changes
27
+ - `perf`: Performance improvements
28
+ - `ci`: CI/CD changes
29
+
30
+ ### Examples
31
+ - `feat(api): add device capability detection`
32
+ - `fix(service): resolve temperature validation warning`
33
+ - `chore: update dependencies`
34
+ - `refactor(features): extract feature modules from service`
package/LICENSE ADDED
@@ -0,0 +1,176 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
package/README.md ADDED
@@ -0,0 +1,180 @@
1
+ # Homebridge Daikin Cloud plugin
2
+
3
+ This Homebrige plugin connects to the Daikin Cloud and loads all your devices to be controled via Homebridge and Homekit.
4
+
5
+ The plugin supports some basic Daikin airco settings:
6
+ - Current room temperature
7
+ - Set airco to cooling, heating or auto + the required temperature**
8
+ - Set the fan speed
9
+ - Swing mode (if supported by your device)
10
+ - Enable special modes (if supported by your device and enabled in config), UI in the Home App will be in the form of switches:
11
+ - powerful mode
12
+ - econo mode
13
+ - streamer mode
14
+ - outdoor silent mode
15
+ - indoor silent/quiet mode
16
+ - dry mode
17
+ - fan only mode
18
+
19
+ ** HomeKit does not support all operation modes of Daikin (for example dry and fan only).
20
+
21
+ ![IMG_7664](https://user-images.githubusercontent.com/657797/166705724-03255e67-252e-480e-9b4f-5cbc33aa9527.jpeg) ![IMG_7665](https://user-images.githubusercontent.com/657797/166705729-748e878a-dfd6-431a-923d-6287ce012bd8.jpeg)
22
+
23
+ ## Important: NEW Daikin API
24
+
25
+ Have a close look at the config section below, you need to create an App in the Daikin Europe Developer Portal and set up some required parameters.
26
+
27
+ If you are still having problems going through the authentication flow, check out related issues [https://github.com/mp-consulting/homebridge-daikin-cloud/issues?q=label%3A%22authorization+flow%22+](here).
28
+
29
+ Since 2.0.0 this plugin uses the new Daikin API, this comes with some challenges. The most important one: you can only do 200 calls per day.
30
+ We'll need to see how this plugin can help prevent hitting this limit and in the same time be accurate.
31
+
32
+ ### Polling for data
33
+
34
+ Due to the rate limits on the Daikin API, we need to manage our API calls carefully. Here's our current polling approach:
35
+
36
+ - By default, we check for new data every 15 minutes. This interval can be adjusted using the `updateIntervalInMinutes` configuration parameter.
37
+ - When you make changes, such as setting a new target temperature, we trigger an immediate update to ensure the new status is accurately reflected. We do
38
+ however wait doing this force update so the Daikin API can process the request.
39
+
40
+ ### Access token or Refresh token is revoked
41
+
42
+ If something is wrong with your access of refresh token you will need to authorise again. You can do this by deleting the `.
43
+ daikin-controller-cloud-tokenset` file from your Homebridge storage directory, you can find this path in the Homebridge UI System Information widget.
44
+
45
+ ## Config
46
+
47
+ Add config object to the platform array in your Homebridge `config.json`.
48
+
49
+ ```
50
+ {
51
+ "bridge": {
52
+ ...
53
+ },
54
+ "accessories": [],
55
+ "platforms": [
56
+ {
57
+ "platform": "DaikinCloud",
58
+ "clientId": "<clientId>",
59
+ "clientSecret": "<clientSecret>",
60
+ "oidcCallbackServerBindAddr": "<0.0.0.0>",
61
+ "callbackServerExternalAddress": "<redirectUri address>",
62
+ "callbackServerPort": "<redirectUri port>",
63
+ "showExtraFeatures": false, // boolean, default: false
64
+ "excludedDevicesByDeviceId": [], // array of strings, find you deviceId in the logs when homekit starts
65
+ "updateIntervalInMinutes": 15, // how fast do you want Daikin to poll for new Device data, default: 15
66
+ "forceUpdateDelay": 5 // how long to wait in ms before updating the device data again after a change (PATCH) has been made, default: 60000 (60
67
+ seconds)
68
+ }
69
+ ]
70
+ }
71
+ ```
72
+
73
+ ### Get config parameters
74
+
75
+ The following parameters are required:
76
+ - clientId
77
+ - clientSecret
78
+ - callbackServerExternalAddress
79
+ - callbackServerPort
80
+
81
+ First 2 values you will get when you set up your App in the Daikin Europe Developer Portal. The last 2 values make the Redirect URI where the Daikin
82
+ Cloud API will send the tokens to.
83
+
84
+ #### Create an App in the Daikin Europe Developer Portal
85
+
86
+ 1. Go to https://developer.cloud.daikineurope.com/
87
+ 2. In the upper right corner click your name and select "My Apps"
88
+ 3. Click "+ New App"
89
+ 4. Fill in your application name, auth strategy (Onecta OIDC) and redirect URI (see "callbackServerExternalAddress and callbackServerPort" below)
90
+ 5. Click create
91
+
92
+ You will receive a Client ID and Client Secret (keep it with you, you'll only see it once). The Redirect URI is the one you entered in step 4.
93
+
94
+ #### callbackServerExternalAddress and callbackServerPort
95
+
96
+ This plugin uses daikin-controller-cloud. This package will set up a small https server where the Authentication flow will finish, so it can get the
97
+ required tokens. Because the server is running in our Homebridge instance the callbackServerExternalAddress will match the one of your Homebridge instance, the port is any free port.
98
+
99
+ For example is you are running Homebridge on a Raspberry Pi with IP `192.168.0.160` and port `8581`, the callbackServerExternalAddress will be `192.168.0.160`.
100
+ The callbackServerPort can be `8582` (or any other free port). Once you have both you can also construct the Redirect URI you need to configure your Daikin
101
+ app: `https://<callbackServerExternalAddress>:<callbackServerPort>`. For this example: `https://192.168.0.160:8582`
102
+
103
+ #### oidcCallbackServerBindAddr
104
+
105
+ This is the address the http server binds to, this is often just localhost: `127.0.0.1`, if that does not work you can use `0.0.0.0` (be aware that this will
106
+ listen for all incoming connections from all over your network, and if your network allows from over the internet).
107
+
108
+ If you are still having problems going through the authentication flow, check out related issues [https://github.com/mp-consulting/homebridge-daikin-cloud/issues?q=label%3A%22authorization+flow%22+](here).
109
+
110
+ ## Fan speed
111
+
112
+ You can change the fan speed from the accessory settings screen.
113
+
114
+ Daikin fan speeds are expressed in a number from 1 to many, for example 1 to 5. In Home you need to express the fan speed in a percentage from 1% to 100%.
115
+
116
+ Example: if you have a Daikin airco with fan speed 1 to 5, you need to set the fan speed to 50% in Home to set the fan speed to 3 on your airco.
117
+
118
+ ![IMG_7678](https://user-images.githubusercontent.com/657797/166897048-2152619a-f270-4b64-9740-5bceac310f19.jpeg)
119
+
120
+ ## Swing mode
121
+
122
+ If your Daikin device support it you can enable swing mode from the accessory settings screen.
123
+
124
+ If your device supports vertical and horizontal swing both will be started and stopped. Via the Daikin app you can also have a silent swing, this is not yet supported because you can't select this from the Home app.
125
+
126
+ ![IMG_8954](https://user-images.githubusercontent.com/657797/175316496-a5338659-ecc1-4023-8a4b-2ec6b0adaf9b.PNG)
127
+
128
+ ## Control extra features (showExtraFeatures: true)
129
+
130
+ By default, this plugin creates a default [HeaterCooler Service](https://developers.homebridge.io/#/service/HeaterCooler) with the above possibilities. If you want you can add `showExtraFeatures: true` to the config. This will create extra switches to enable more special modes of your Daikin (if available).
131
+
132
+ Supported:
133
+ - Streamer mode
134
+ - Econo mode
135
+ - Powerful mode
136
+ - Outdoor silent mode
137
+ - Indoor silent/quiet mode
138
+ - Dry mode
139
+ - Fan only mode
140
+
141
+ Extra info and example: https://github.com/mp-consulting/homebridge-daikin-cloud/issues/8#issuecomment-1188128335
142
+
143
+
144
+ ## Install
145
+
146
+ Install from NPM: https://www.npmjs.com/package/homebridge-daikin-cloud
147
+
148
+ ## Tested with devices
149
+
150
+ Devices supported by Daikin Onecta app: https://www.daikin.eu/en_us/product-group/control-systems/onecta/connectable-units.html
151
+
152
+ - BRP069C4x
153
+ - BRP069A8x
154
+ - BRP069A78 - Altherma heatpump, we import this as a HeaterCooler [(to be validated)](https://github.com/mp-consulting/homebridge-daikin-cloud/issues/30)
155
+
156
+ ## Development
157
+
158
+ In HomeKit you expose an accessory which has one or more services, available services are:
159
+ - https://developer.apple.com/documentation/homekit/hmservice/accessory_service_types (HomeKit docs)
160
+ - https://developers.homebridge.io/#/service (Homebridge)
161
+
162
+ Each service has one or more characteristics, check both HomeKit and Homebridge docs to find out which are compatible.
163
+ A service can have multiple child services, for example a HeaterCooler service can also have multiple Switch services. But not all services can be combined.
164
+ Use HomeKit Accessory Simulator to find out which are compatible or via the HomeKit docs you can also find links from the service to other services.
165
+
166
+ ### Local
167
+
168
+ For running a local Homebridge setup: https://github.com/oznu/homebridge-config-ui-x#installation-instructions
169
+
170
+ ```
171
+ nvm use v18.19.1
172
+ sudo hb-service start
173
+ sudo hb-service stop
174
+ ```
175
+
176
+ UI: http://localhost:8581
177
+
178
+ ## Credits
179
+
180
+ Credits for the Daikin Cloud API goes to @Apollon77 for https://github.com/Apollon77/daikin-controller-cloud
package/changelog.md ADDED
@@ -0,0 +1,217 @@
1
+ # Changelog
2
+ All notable changes to this project will be documented in this file.
3
+
4
+ The format is based on [Keep a Changelog](http://keepachangelog.com/)
5
+ and this project adheres to [Semantic Versioning](http://semver.org/).
6
+
7
+
8
+ ## [2.9.0] - 2025-01-30
9
+
10
+ ### Added
11
+
12
+ - Added `CurrentHeatingCoolingState` characteristic for Hot Wat Tank
13
+ - Added Powerful mode switch for Hot Wat Tank (when using the `showExtraFeatures` option)
14
+ - Added a lot of "e2e" tests with device mocks shared in the issues so we can spot regressions more easily
15
+
16
+ ### Updated
17
+
18
+ - Improved the way we decide on which setpoint to use when getting and setting the `temperatureControl` (https://github.com/mp-consulting/homebridge-daikin-cloud/pull/100) (solves https://github.com/mp-consulting/homebridge-daikin-cloud/issues/98)
19
+ - `TargetHeatingCoolingState` will show `off` when onOffMode is `off`
20
+ - `TargetHeatingCoolingState` will set onOffMode to `off` when target `off` is picked
21
+ - `TargetHeatingCoolingState` only includes tha states (heating, cooling, auto, off) that are available in your device
22
+
23
+ ## [2.8.1] - 2025-01-23
24
+
25
+ ### Added
26
+
27
+ - Extra debugging information for when Hot Water Tank operations fail
28
+
29
+ ## [2.8.0] - 2025-01-23
30
+
31
+ In this update the plugin will remove the `.daikin-controller-cloud-tokenset` file containing your oauth credentials as soon as the refresh token is marked as invalidated. This prevents people having to manually remove the file when the refresh token is invalidated. A restart of Homebridge is required after the file is removed to restart the authorisation flow.
32
+
33
+ ### Added
34
+
35
+ - Remove TokenSet file when refresh token is invalidated
36
+
37
+ ## [2.7.0] - 2024-10-22
38
+
39
+ ### Added
40
+
41
+ - Update dependencies
42
+
43
+ ### Fixes
44
+
45
+ - Update Altherma support (fixes
46
+ https://github.com/mp-consulting/homebridge-daikin-cloud/issues/81)
47
+ - Fix for devices that don't have both horizontal and vertical swing (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/89)
48
+
49
+ ## [2.6.0] - 2024-08-11
50
+
51
+ ### Added
52
+
53
+ - Refactored the way accessories and services are used, so we can more easily support extra devices.
54
+
55
+ ### Fixes
56
+
57
+ - Optional add CoolingThresholdTemperature and heatingThresholdTemperature for devices that don't support roomTemperature temperature control (fixes
58
+ https://github.com/mp-consulting/homebridge-daikin-cloud/issues/81)
59
+
60
+ ## [2.5.0] - 2024-08-05
61
+
62
+ ### Added
63
+
64
+ - Extra switches for operation modes: dry and fan only, showExtraFeatures must be enabled as well. (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/57,
65
+ https://github.com/mp-consulting/homebridge-daikin-cloud/issues/45 and https://github.com/mp-consulting/homebridge-daikin-cloud/issues/25)
66
+ - Update Homebridge + add Homebridge 2.0 beta support
67
+
68
+ ### Fixed
69
+
70
+ - Some devices don't support heating, we now gracefully handle that (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/50)
71
+
72
+ ## [2.4.1] - 2024-07-30
73
+
74
+ ### Added
75
+
76
+ - Extra configuration `forceUpdateDelay`: The amount of time to wait before updating the device data again after a change (PATCH) has been made. This can be
77
+ useful if you have a device that is not updating correctly (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/55#issuecomment-2256455690)
78
+
79
+ ## [2.4.0] - 2024-07-09
80
+
81
+ ### Added
82
+
83
+ - Some extra documentation about the config parameter related to the authorisation flow
84
+
85
+ ### Fixed
86
+
87
+ - When operation mode is dry you should not be able to set or get the rotation speed because it is not a characteristics for dry mode (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/66)
88
+
89
+ ## [2.3.0] - 2024-07-02 - 2024-07-04
90
+
91
+ ### Added
92
+
93
+ - Update daikin-cloud-controller: the controller will now block communication to Daikin when it detects that you have hit your rate limit. If this is not
94
+ done you will start consuming calls from your next rate limit window. See: https://github.com/Apollon77/daikin-controller-cloud/pull/147
95
+
96
+ ## [2.2.0] - 2024-07-02 - 2024-07-04
97
+
98
+ ### Added
99
+
100
+ ### Changed
101
+
102
+ - Changed the way we poll the Daikin API, see readme for more details on the current logic
103
+
104
+ ### Fixed
105
+
106
+ ## [2.0.0 - 2.1.0] - 2024-07-02 - 2024-07-03
107
+
108
+ ### Added
109
+
110
+ - Switch to using the new Daikin Cloud API. (!) PLEASE READ THE README AND CHANGE YOUR CONFIG (!)
111
+
112
+ ### Changed
113
+
114
+ ### Fixed
115
+
116
+ ## [1.8.0-beta.0] - 2023-09-05
117
+
118
+ ### Added
119
+
120
+ - Support for Altherma (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/30)
121
+
122
+ ### Changed
123
+
124
+ ### Fixed
125
+
126
+ ## [1.7.3] - 2024-03-10
127
+
128
+ ### Added
129
+
130
+ - Warning about why login sometimes will fail (https://github.com/mp-consulting/homebridge-daikin-cloud/issues/51)
131
+
132
+ ## [1.7.0] - 2023-09-03
133
+
134
+ ### Added
135
+
136
+ - Switch for indoor silent/quiet fan speed mode (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/33)
137
+
138
+ ### Changed
139
+
140
+ ### Fixed
141
+
142
+ ## [1.6.0] - 2023-08-31
143
+
144
+ ### Added
145
+
146
+ - It is now possible, via the config, to exclude specific devices (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/31)
147
+
148
+ ### Changed
149
+
150
+ ### Fixed
151
+
152
+ ## [1.5.5] - 2023-08-31
153
+
154
+ ### Added
155
+
156
+ ### Changed
157
+
158
+ ### Fixed
159
+
160
+ - Fix crashing plugin because it was published before the final commit (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/38)
161
+
162
+ ## [1.5.3] - 2023-08-24
163
+
164
+ ### Added
165
+
166
+ ### Changed
167
+
168
+ - Moved detailed logging from the info level to debug. Enable Debug Mode to see the logging again (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/34)
169
+
170
+ ### Fixed
171
+
172
+ ## [1.5.2] - 2023-03-09
173
+
174
+ ### Added
175
+
176
+ ### Changed
177
+
178
+ ### Fixed
179
+
180
+ - The plugin crashed when it tries to convert a non-airco device to a HeaterCooler accessory (fixes https://github.com/mp-consulting/homebridge-daikin-cloud/issues/29)
181
+
182
+ ## [1.5.1] - 2023-02-28
183
+
184
+ Labels are back!
185
+
186
+ ### Added
187
+
188
+ - Add funding link to https://www.paypal.me/MickaelPalma
189
+
190
+ ### Changed
191
+
192
+ ### Fixed
193
+
194
+ ## [1.5.0] - 2023-02-28
195
+
196
+ Labels are back!
197
+
198
+ ### Added
199
+
200
+ ### Changed
201
+
202
+ ### Fixed
203
+
204
+ - Labels now have the correct label again. Restarting Homebridge and Home should bring back the labels (https://github.com/mp-consulting/homebridge-daikin-cloud/issues/27)
205
+
206
+ ## [1.4.0] - 2022-09-28
207
+
208
+ Here we would have the update steps for 1.2.4 for people to follow.
209
+
210
+ ### Added
211
+
212
+ ### Changed
213
+
214
+ ### Fixed
215
+
216
+ - Merged https://github.com/mp-consulting/homebridge-daikin-cloud/pull/16 which fixes an incompatibility for users using fahrenheit
217
+ - Extra services are now also removed after settings the showExtraFeatures option from true to false (https://github.com/mp-consulting/homebridge-daikin-cloud/commit/11ffb863ab7b99906a23e8ae816302bf47940f0a)
package/config.md ADDED
@@ -0,0 +1,2 @@
1
+
2
+