homebridge-solaxcloud-api 2.4.2 → 2.5.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 (56) hide show
  1. package/CHANGELOG.md +164 -156
  2. package/LICENSE +175 -175
  3. package/README.md +196 -196
  4. package/config.sample +15 -15
  5. package/config.schema.json +113 -113
  6. package/dist/batteryAccessory.d.ts +1 -1
  7. package/dist/batteryAccessory.d.ts.map +1 -1
  8. package/dist/batteryAccessory.js +17 -17
  9. package/dist/batteryAccessory.js.map +1 -1
  10. package/dist/index.d.ts +2 -2
  11. package/dist/index.d.ts.map +1 -1
  12. package/dist/index.js +7 -5
  13. package/dist/index.js.map +1 -1
  14. package/dist/lightSensorAccessory.d.ts +23 -16
  15. package/dist/lightSensorAccessory.d.ts.map +1 -1
  16. package/dist/lightSensorAccessory.js +109 -32
  17. package/dist/lightSensorAccessory.js.map +1 -1
  18. package/dist/motionAccessory.d.ts +1 -2
  19. package/dist/motionAccessory.d.ts.map +1 -1
  20. package/dist/motionAccessory.js +17 -20
  21. package/dist/motionAccessory.js.map +1 -1
  22. package/dist/outletAccessory.d.ts +1 -1
  23. package/dist/outletAccessory.d.ts.map +1 -1
  24. package/dist/outletAccessory.js +47 -33
  25. package/dist/outletAccessory.js.map +1 -1
  26. package/dist/platform.d.ts +1 -1
  27. package/dist/platform.d.ts.map +1 -1
  28. package/dist/platform.js +30 -27
  29. package/dist/platform.js.map +1 -1
  30. package/dist/platformAccessory.d.ts.map +1 -1
  31. package/dist/platformAccessory.js +40 -18
  32. package/dist/platformAccessory.js.map +1 -1
  33. package/dist/platformInverter.d.ts.map +1 -1
  34. package/dist/platformInverter.js +129 -69
  35. package/dist/platformInverter.js.map +1 -1
  36. package/dist/platformMeters.d.ts +2 -2
  37. package/dist/platformMeters.d.ts.map +1 -1
  38. package/dist/platformMeters.js +1 -2
  39. package/dist/settings.js +2 -5
  40. package/dist/settings.js.map +1 -1
  41. package/dist/solaxcloudfetch.js +14 -19
  42. package/dist/solaxcloudfetch.js.map +1 -1
  43. package/dist/statistics.js +1 -5
  44. package/dist/statistics.js.map +1 -1
  45. package/dist/util.js +1 -5
  46. package/dist/util.js.map +1 -1
  47. package/package.json +59 -55
  48. package/test/batteryAccessory.test.ts +16 -16
  49. package/test/helpers.ts +80 -36
  50. package/test/lightSensorAccessory.test.ts +73 -28
  51. package/test/motionAccessory.test.ts +36 -36
  52. package/test/outletAccessory.test.ts +75 -75
  53. package/test/platformAccessory.test.ts +24 -24
  54. package/test/platformConfig.test.ts +188 -188
  55. package/test/platformTotalizer.test.ts +123 -97
  56. package/test/statistics.test.ts +50 -50
package/CHANGELOG.md CHANGED
@@ -1,156 +1,164 @@
1
- # Changelog
2
-
3
- All notable changes to this project will be documented in this file.
4
-
5
- ## [v2.4.2] - 2026-06-03
6
- ### Changed
7
- * Bumped Homebridge Lib dependency.
8
- ### Fixed
9
- * Updated Eve HomeKit type loading for Homebridge Lib v8.
10
-
11
- ## [v2.4.1] - 2026-06-03
12
- ### Added
13
- * Added unit coverage for all accessory types, platform config validation, and totalizer inverter creation.
14
- * Added `enableHistory` config option to disable Eve/fakegato history services.
15
- ### Changed
16
- * Bumped Fakegato dependency.
17
- * Updated the test command to exit cleanly after running Mocha.
18
- ### Fixed
19
- * Handled malformed inverter entries cleanly during platform config validation.
20
-
21
- ## [v2.4.0] - 2026-06-03
22
- ### Changed
23
- * Replaced the local Solax Cloud API implementation with the external `solax-cloud-api` package.
24
- * Bumped Mocha test dependency.
25
- ### Fixed
26
- * Kept battery charge state reads in sync after updates.
27
- * Rejected polling frequencies that would break meter smoothing.
28
- * Prevented the multi-inverter totalizer from making cloud requests without real inverter credentials.
29
-
30
- ## [v2.3.3] - 2024-08-02
31
- ### Fixed
32
- * Updated URL for Solax cloud API fetches.
33
-
34
- ## [v2.3.2] - 2024-07-04
35
- ### Fixed
36
- * Updated README with fixed image logos.
37
- ### Changes
38
- * Bumped dependencies.
39
-
40
- ## [v2.3.1] - 2024-04-08
41
- ### Fixed
42
- * Changed max TokenID size to 24 ([#08](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/8)).
43
-
44
- ## [v2.3.0] - 2024-03-14
45
- ### Changes
46
- * Added support for inverters from QCells through the QCells cloud API.
47
- * **Breaking change** - plug-in configuration must be re-done to support inverters from multiple brands.
48
- * Bumped dependencies.
49
-
50
- ## [v2.1.12] - 2023-05-31
51
- ### Changes
52
- * Bumped dependencies.
53
-
54
- ## [v2.1.11] - 2023-03-14
55
- ### Changes
56
- * Bumped dependencies.
57
-
58
- ## [v2.1.10] - 2022-12-13
59
- ### Changes
60
- * Bumped dependencies.
61
-
62
- ## [v2.1.9] - 2022-11-16
63
- ### Changes
64
- * Bumped dependencies.
65
-
66
- ## [v2.1.8] - 2022-07-20
67
- ### Changes
68
- * Bumped dependencies.
69
- ### Fixed
70
- * Update on polling logic to prevent event memory leak issue ([#04](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/4)).
71
-
72
- ## [v2.1.7] - 2022-05-03
73
- ### Changes
74
- * Bumped dependencies.
75
- * Unit testing for multiple inverters.
76
- ### Fixed
77
- * Documentation updates.
78
-
79
- ## [v2.1.6] - 2022-04-07
80
- ### Changes
81
- * Battery totals SoC updated to "All inverters".
82
- ### Fixed
83
- * Compressed image size for README information.
84
-
85
- ## [v2.1.5] - 2022-04-07
86
- ### Changed
87
- * New inverter accessory **Battery** for State of Charge (SoC) information.
88
- * Support for battery charge level, charge state and low battery handler (<10%).
89
-
90
- ## [v2.1.4] - 2022-04-06
91
- ### Changed
92
- * Added "All inverters" virtual inverter for totalizing inverter figures for all sensors.
93
- * Preliminary battery support with **From Battery** and **To Battery** charge power ([#02](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/2)).
94
-
95
- ## [v2.1.2] - 2022-03-31
96
- ### Fixed
97
- * Bumped dependencies to latest versions.
98
- ### Changed
99
- * Initial support for multiple inverters.
100
-
101
- ## [v2.0.3] - 2022-01-25
102
- ### Fixed
103
- * Fixed dependabot detected vulnerabilities.
104
-
105
- ## [v2.0.2] - 2022-01-24
106
- ### Changed
107
- * Added support for "pure" Home app accessories (power consumption displayed as Ambient Light Sensors) ([#01](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/1)).
108
- * Created optional accessories to display smooth value from raw API data (minimizing sporadic events like a cloud passing).
109
-
110
- ## [v1.5.1] - 2022-01-08
111
- ### Fixed
112
- * Disabled repeat last data for history (connection problems may lead to strange values).
113
-
114
- ## [v1.5.0] - 2021-12-31
115
- ### Changed
116
- * Homebridge certified!
117
-
118
- ## [v1.4.6] - 2021-12-28
119
- ### Fixed
120
- * Added extended parameter check (including Solax Cloud limits).
121
-
122
- ## [v1.4.5] - 2021-12-27
123
- ### Fixed
124
- * Sanity checks for mandatory config parameters.
125
-
126
- ## [v1.4.4] - 2021-12-22
127
- ### Fixed
128
- * Automation example added to documentation.
129
-
130
- ## [v1.4.3] - 2021-12-21
131
- ### Fixed
132
- * Code cleanup and optimizations.
133
-
134
- ## [v1.4.1] - 2021-12-21
135
- ### Fixed
136
- * First working version with fakegato-history for Eve.
137
-
138
- ## [v1.4.0] - 2021-12-20
139
- ### Changed
140
- * Initial fakegato-history release for Eve.
141
-
142
- ## [v1.3.1] - 2021-12-14
143
- ### Fixed
144
- * Documentation updated to reflect new **Total Energy** characteristic on Inverter AC.
145
-
146
- ## [v1.3.0] - 2021-12-14
147
- ### Changed
148
- * Added support for total energy consumption.
149
-
150
- ## [v1.2.1] - 2021-12-14
151
- ### Fixed
152
- * Updates to the official documentation.
153
-
154
- ## [v1.2.0] - 2021-12-13
155
- ### Changed
156
- * First official release.
1
+ # Changelog
2
+
3
+ All notable changes to this project will be documented in this file.
4
+
5
+ ## [v2.5.0] - 2026-10-27
6
+ ### Added
7
+ * Added Matter electrical sensor support for power and cumulative energy in Apple Home.
8
+ ### Changed
9
+ * Updated the project for Homebridge 2.4, modern Node.js, TypeScript, and ESM compatibility.
10
+ ### Fixed
11
+ * Corrected Matter device registration, measurement schemas, unit conversions, and accessory deduplication.
12
+
13
+ ## [v2.4.2] - 2026-06-03
14
+ ### Changed
15
+ * Bumped Homebridge Lib dependency.
16
+ ### Fixed
17
+ * Updated Eve HomeKit type loading for Homebridge Lib v8.
18
+
19
+ ## [v2.4.1] - 2026-06-03
20
+ ### Added
21
+ * Added unit coverage for all accessory types, platform config validation, and totalizer inverter creation.
22
+ * Added `enableHistory` config option to disable Eve/fakegato history services.
23
+ ### Changed
24
+ * Bumped Fakegato dependency.
25
+ * Updated the test command to exit cleanly after running Mocha.
26
+ ### Fixed
27
+ * Handled malformed inverter entries cleanly during platform config validation.
28
+
29
+ ## [v2.4.0] - 2026-06-03
30
+ ### Changed
31
+ * Replaced the local Solax Cloud API implementation with the external `solax-cloud-api` package.
32
+ * Bumped Mocha test dependency.
33
+ ### Fixed
34
+ * Kept battery charge state reads in sync after updates.
35
+ * Rejected polling frequencies that would break meter smoothing.
36
+ * Prevented the multi-inverter totalizer from making cloud requests without real inverter credentials.
37
+
38
+ ## [v2.3.3] - 2024-08-02
39
+ ### Fixed
40
+ * Updated URL for Solax cloud API fetches.
41
+
42
+ ## [v2.3.2] - 2024-07-04
43
+ ### Fixed
44
+ * Updated README with fixed image logos.
45
+ ### Changes
46
+ * Bumped dependencies.
47
+
48
+ ## [v2.3.1] - 2024-04-08
49
+ ### Fixed
50
+ * Changed max TokenID size to 24 ([#08](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/8)).
51
+
52
+ ## [v2.3.0] - 2024-03-14
53
+ ### Changes
54
+ * Added support for inverters from QCells through the QCells cloud API.
55
+ * **Breaking change** - plug-in configuration must be re-done to support inverters from multiple brands.
56
+ * Bumped dependencies.
57
+
58
+ ## [v2.1.12] - 2023-05-31
59
+ ### Changes
60
+ * Bumped dependencies.
61
+
62
+ ## [v2.1.11] - 2023-03-14
63
+ ### Changes
64
+ * Bumped dependencies.
65
+
66
+ ## [v2.1.10] - 2022-12-13
67
+ ### Changes
68
+ * Bumped dependencies.
69
+
70
+ ## [v2.1.9] - 2022-11-16
71
+ ### Changes
72
+ * Bumped dependencies.
73
+
74
+ ## [v2.1.8] - 2022-07-20
75
+ ### Changes
76
+ * Bumped dependencies.
77
+ ### Fixed
78
+ * Update on polling logic to prevent event memory leak issue ([#04](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/4)).
79
+
80
+ ## [v2.1.7] - 2022-05-03
81
+ ### Changes
82
+ * Bumped dependencies.
83
+ * Unit testing for multiple inverters.
84
+ ### Fixed
85
+ * Documentation updates.
86
+
87
+ ## [v2.1.6] - 2022-04-07
88
+ ### Changes
89
+ * Battery totals SoC updated to "All inverters".
90
+ ### Fixed
91
+ * Compressed image size for README information.
92
+
93
+ ## [v2.1.5] - 2022-04-07
94
+ ### Changed
95
+ * New inverter accessory **Battery** for State of Charge (SoC) information.
96
+ * Support for battery charge level, charge state and low battery handler (<10%).
97
+
98
+ ## [v2.1.4] - 2022-04-06
99
+ ### Changed
100
+ * Added "All inverters" virtual inverter for totalizing inverter figures for all sensors.
101
+ * Preliminary battery support with **From Battery** and **To Battery** charge power ([#02](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/2)).
102
+
103
+ ## [v2.1.2] - 2022-03-31
104
+ ### Fixed
105
+ * Bumped dependencies to latest versions.
106
+ ### Changed
107
+ * Initial support for multiple inverters.
108
+
109
+ ## [v2.0.3] - 2022-01-25
110
+ ### Fixed
111
+ * Fixed dependabot detected vulnerabilities.
112
+
113
+ ## [v2.0.2] - 2022-01-24
114
+ ### Changed
115
+ * Added support for "pure" Home app accessories (power consumption displayed as Ambient Light Sensors) ([#01](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/1)).
116
+ * Created optional accessories to display smooth value from raw API data (minimizing sporadic events like a cloud passing).
117
+
118
+ ## [v1.5.1] - 2022-01-08
119
+ ### Fixed
120
+ * Disabled repeat last data for history (connection problems may lead to strange values).
121
+
122
+ ## [v1.5.0] - 2021-12-31
123
+ ### Changed
124
+ * Homebridge certified!
125
+
126
+ ## [v1.4.6] - 2021-12-28
127
+ ### Fixed
128
+ * Added extended parameter check (including Solax Cloud limits).
129
+
130
+ ## [v1.4.5] - 2021-12-27
131
+ ### Fixed
132
+ * Sanity checks for mandatory config parameters.
133
+
134
+ ## [v1.4.4] - 2021-12-22
135
+ ### Fixed
136
+ * Automation example added to documentation.
137
+
138
+ ## [v1.4.3] - 2021-12-21
139
+ ### Fixed
140
+ * Code cleanup and optimizations.
141
+
142
+ ## [v1.4.1] - 2021-12-21
143
+ ### Fixed
144
+ * First working version with fakegato-history for Eve.
145
+
146
+ ## [v1.4.0] - 2021-12-20
147
+ ### Changed
148
+ * Initial fakegato-history release for Eve.
149
+
150
+ ## [v1.3.1] - 2021-12-14
151
+ ### Fixed
152
+ * Documentation updated to reflect new **Total Energy** characteristic on Inverter AC.
153
+
154
+ ## [v1.3.0] - 2021-12-14
155
+ ### Changed
156
+ * Added support for total energy consumption.
157
+
158
+ ## [v1.2.1] - 2021-12-14
159
+ ### Fixed
160
+ * Updates to the official documentation.
161
+
162
+ ## [v1.2.0] - 2021-12-13
163
+ ### Changed
164
+ * First official release.