homebridge-solaxcloud-api 2.2.1-beta.0 → 2.3.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.
- package/CHANGELOG.md +116 -110
- package/README.md +194 -193
- package/config.json +2 -3
- package/config.sample +2 -1
- package/config.schema.json +20 -20
- package/dist/platform.d.ts +1 -1
- package/dist/platform.d.ts.map +1 -1
- package/dist/platform.js +11 -40
- package/dist/platform.js.map +1 -1
- package/dist/platformInverter.d.ts +14 -1
- package/dist/platformInverter.d.ts.map +1 -1
- package/dist/platformInverter.js +25 -5
- package/dist/platformInverter.js.map +1 -1
- package/dist/solaxcloudapi.d.ts +2 -2
- package/dist/solaxcloudapi.d.ts.map +1 -1
- package/dist/solaxcloudapi.js +4 -4
- package/dist/solaxcloudapi.js.map +1 -1
- package/images/homebridge-ui.png +0 -0
- package/package.json +7 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,111 +1,117 @@
|
|
|
1
|
-
# Changelog
|
|
2
|
-
|
|
3
|
-
All notable changes to this project will be documented in this file.
|
|
4
|
-
|
|
5
|
-
## [v2.
|
|
6
|
-
### Changes
|
|
7
|
-
*
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
###
|
|
25
|
-
*
|
|
26
|
-
|
|
27
|
-
## [v2.1.
|
|
28
|
-
### Changes
|
|
29
|
-
* Bumped dependencies.
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
*
|
|
37
|
-
### Fixed
|
|
38
|
-
*
|
|
39
|
-
|
|
40
|
-
## [v2.1.
|
|
41
|
-
###
|
|
42
|
-
*
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
*
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
*
|
|
55
|
-
|
|
56
|
-
## [v2.
|
|
57
|
-
### Fixed
|
|
58
|
-
*
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
-
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
All notable changes to this project will be documented in this file.
|
|
4
|
+
|
|
5
|
+
## [v2.3.0] - 2024-03-14
|
|
6
|
+
### Changes
|
|
7
|
+
* Added support for inverters from QCells through the QCells cloud API.
|
|
8
|
+
* **Breaking change** - plug-in configuration must be re-done to support inverters from multiple brands.
|
|
9
|
+
* Bumped dependencies.
|
|
10
|
+
|
|
11
|
+
## [v2.1.12] - 2023-05-31
|
|
12
|
+
### Changes
|
|
13
|
+
* Bumped dependencies.
|
|
14
|
+
|
|
15
|
+
## [v2.1.11] - 2023-03-14
|
|
16
|
+
### Changes
|
|
17
|
+
* Bumped dependencies.
|
|
18
|
+
|
|
19
|
+
## [v2.1.10] - 2022-12-13
|
|
20
|
+
### Changes
|
|
21
|
+
* Bumped dependencies.
|
|
22
|
+
|
|
23
|
+
## [v2.1.9] - 2022-11-16
|
|
24
|
+
### Changes
|
|
25
|
+
* Bumped dependencies.
|
|
26
|
+
|
|
27
|
+
## [v2.1.8] - 2022-07-20
|
|
28
|
+
### Changes
|
|
29
|
+
* Bumped dependencies.
|
|
30
|
+
### Fixed
|
|
31
|
+
* Update on polling logic to prevent event memory leak issue ([#04](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/4)).
|
|
32
|
+
|
|
33
|
+
## [v2.1.7] - 2022-05-03
|
|
34
|
+
### Changes
|
|
35
|
+
* Bumped dependencies.
|
|
36
|
+
* Unit testing for multiple inverters.
|
|
37
|
+
### Fixed
|
|
38
|
+
* Documentation updates.
|
|
39
|
+
|
|
40
|
+
## [v2.1.6] - 2022-04-07
|
|
41
|
+
### Changes
|
|
42
|
+
* Battery totals SoC updated to "All inverters".
|
|
43
|
+
### Fixed
|
|
44
|
+
* Compressed image size for README information.
|
|
45
|
+
|
|
46
|
+
## [v2.1.5] - 2022-04-07
|
|
47
|
+
### Changed
|
|
48
|
+
* New inverter accessory **Battery** for State of Charge (SoC) information.
|
|
49
|
+
* Support for battery charge level, charge state and low battery handler (<10%).
|
|
50
|
+
|
|
51
|
+
## [v2.1.4] - 2022-04-06
|
|
52
|
+
### Changed
|
|
53
|
+
* Added "All inverters" virtual inverter for totalizing inverter figures for all sensors.
|
|
54
|
+
* Preliminary battery support with **From Battery** and **To Battery** charge power ([#02](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/2)).
|
|
55
|
+
|
|
56
|
+
## [v2.1.2] - 2022-03-31
|
|
57
|
+
### Fixed
|
|
58
|
+
* Bumped dependencies to latest versions.
|
|
59
|
+
### Changed
|
|
60
|
+
* Initial support for multiple inverters.
|
|
61
|
+
|
|
62
|
+
## [v2.0.3] - 2022-01-25
|
|
63
|
+
### Fixed
|
|
64
|
+
* Fixed dependabot detected vulnerabilities.
|
|
65
|
+
|
|
66
|
+
## [v2.0.2] - 2022-01-24
|
|
67
|
+
### Changed
|
|
68
|
+
* Added support for "pure" Home app accessories (power consumption displayed as Ambient Light Sensors) ([#01](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/1)).
|
|
69
|
+
* Created optional accessories to display smooth value from raw API data (minimizing sporadic events like a cloud passing).
|
|
70
|
+
|
|
71
|
+
## [v1.5.1] - 2022-01-08
|
|
72
|
+
### Fixed
|
|
73
|
+
* Disabled repeat last data for history (connection problems may lead to strange values).
|
|
74
|
+
|
|
75
|
+
## [v1.5.0] - 2021-12-31
|
|
76
|
+
### Changed
|
|
77
|
+
* Homebridge certified!
|
|
78
|
+
|
|
79
|
+
## [v1.4.6] - 2021-12-28
|
|
80
|
+
### Fixed
|
|
81
|
+
* Added extended parameter check (including Solax Cloud limits).
|
|
82
|
+
|
|
83
|
+
## [v1.4.5] - 2021-12-27
|
|
84
|
+
### Fixed
|
|
85
|
+
* Sanity checks for mandatory config parameters.
|
|
86
|
+
|
|
87
|
+
## [v1.4.4] - 2021-12-22
|
|
88
|
+
### Fixed
|
|
89
|
+
* Automation example added to documentation.
|
|
90
|
+
|
|
91
|
+
## [v1.4.3] - 2021-12-21
|
|
92
|
+
### Fixed
|
|
93
|
+
* Code cleanup and optimizations.
|
|
94
|
+
|
|
95
|
+
## [v1.4.1] - 2021-12-21
|
|
96
|
+
### Fixed
|
|
97
|
+
* First working version with fakegato-history for Eve.
|
|
98
|
+
|
|
99
|
+
## [v1.4.0] - 2021-12-20
|
|
100
|
+
### Changed
|
|
101
|
+
* Initial fakegato-history release for Eve.
|
|
102
|
+
|
|
103
|
+
## [v1.3.1] - 2021-12-14
|
|
104
|
+
### Fixed
|
|
105
|
+
* Documentation updated to reflect new **Total Energy** characteristic on Inverter AC.
|
|
106
|
+
|
|
107
|
+
## [v1.3.0] - 2021-12-14
|
|
108
|
+
### Changed
|
|
109
|
+
* Added support for total energy consumption.
|
|
110
|
+
|
|
111
|
+
## [v1.2.1] - 2021-12-14
|
|
112
|
+
### Fixed
|
|
113
|
+
* Updates to the official documentation.
|
|
114
|
+
|
|
115
|
+
## [v1.2.0] - 2021-12-13
|
|
116
|
+
### Changed
|
|
111
117
|
* First official release.
|
package/README.md
CHANGED
|
@@ -1,193 +1,194 @@
|
|
|
1
|
-
|
|
2
|
-
<table cellspacing="0" cellpadding="0">
|
|
3
|
-
<tr>
|
|
4
|
-
<td align="center"><img src="https://github.com/homebridge/branding/raw/master/logos/homebridge-wordmark-logo-vertical.png" width="150"></td>
|
|
5
|
-
<td align="center"><img src="https://www.solaxpower.com/wp-content/uploads/2020/03/weblogo5.png" width="300"></td>
|
|
6
|
-
<tr>
|
|
7
|
-
</table>
|
|
8
|
-
|
|
9
|
-
# Solax Cloud Plugin for Homebridge
|
|
10
|
-
|
|
11
|
-
  [](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
The Solax Cloud Plugin for [Homebridge](https://homebridge.io/) was created as a platform plugin to gather data exposed by Solax inverters to the cloud through the [Solax Cloud API](https://www.solaxcloud.com/phoebus/resource/files/userGuide/Solax_API.pdf).
|
|
15
|
-
|
|
16
|
-
Now with support for **multiple inverters**! Sensors will be created for each of the inverters present in the configuration. Additionally, a virtual inverter named "All inverters" will be created whenever a multiple inverters configuration is present. This inverter will present summarized power and consumption figures derived from data for all the physical inverters.
|
|
17
|
-
|
|
18
|
-
As HomeKit is still clueless about what a solar panel is, this plugin exposes a set of standard HomeKit accessories though Homebridge for each configured inverter that will allow interacting and automating your smart home based on the data made available from the Solax platform:
|
|
19
|
-
|
|
20
|
-
- **PV** (PV outlet with power consumption)
|
|
21
|
-
- **AC** (Inverter AC outlet with power and total energy consumptions)
|
|
22
|
-
- **To Grid** (Inverter to Grid outlet with power consumption)
|
|
23
|
-
- **To House** (Inverter to House outlet with power consumption)
|
|
24
|
-
- **From Grid** (Grid to House outlet with power consumption)
|
|
25
|
-
- **Update** (Motion sensor)
|
|
26
|
-
|
|
27
|
-
Battery information is also provided as Homekit accessories in case there are any batteries installed for any of the configured inverters:
|
|
28
|
-
|
|
29
|
-
- **To Battery** (Outlet with inverter power charging the battery)
|
|
30
|
-
- **From Battery** (Outlet with power drawn from the battery to the inverter)
|
|
31
|
-
- **Battery** (Battery with State of Charge information such as level or charge state)
|
|
32
|
-
|
|
33
|
-
<img src="images/plugin-accessories-home.png" width="50%" height="50%">
|
|
34
|
-
|
|
35
|
-
Please note that additional accessories are created by default with smooth power consumption curves (by applying either a simple or exponential moving average to the power series). This prevents sporadic events like a cloud passing by to have an immediate affect on provided meters.
|
|
36
|
-
|
|
37
|
-
## Required information
|
|
38
|
-
|
|
39
|
-
For this plugin to work, two critical pieces of information are required from Solax Cloud:
|
|
40
|
-
|
|
41
|
-
- **Token ID**: Solax users can get inverter information through the granted tokenID. You need to obtain your tokenID on the API page of
|
|
42
|
-
- **SN**: Registration No (communication module SN) for each desired inverter.
|
|
43
|
-
|
|
44
|
-
## Installation
|
|
45
|
-
|
|
46
|
-
This plugin is supported under Homebridge. It is highly recommended that you use Homebridge Config UI X to install and configure this plugin.
|
|
47
|
-
|
|
48
|
-
### Manual Installation
|
|
49
|
-
|
|
50
|
-
Install this plugin using: `sudo npm install -g homebridge-solaxcloud-api`.
|
|
51
|
-
Edit `config.json` manually to add your Solax inverters. See below for instructions on that.
|
|
52
|
-
|
|
53
|
-
## Platform configuration
|
|
54
|
-
|
|
55
|
-
Minimal platform configuration is depicted by the example configuration file below:
|
|
56
|
-
|
|
57
|
-
```json
|
|
58
|
-
{
|
|
59
|
-
"platforms": [
|
|
60
|
-
{
|
|
61
|
-
"platform": "SolaxCloudAPI",
|
|
62
|
-
"
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
"
|
|
66
|
-
"
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
|
77
|
-
|
|
|
78
|
-
| `
|
|
79
|
-
| `inverters` | array | Array of configured inverters as objects with `{ name: string, sn: string }`, where `name` is the inverter name, used as prefix for accessory naming
|
|
80
|
-
| `pollingFrequency` | number | Plugin data polling frequency from Solax Cloud (in seconds)
|
|
81
|
-
| `smoothingMeters` | boolean | Whether to create additional meters by smoothing raw values from Solax Cloud
|
|
82
|
-
| `smoothingMethod` | string | Statistical method to use for smoothing raw values from Solax Cloud (simple or exponential moving average - "sma" or "ema")
|
|
83
|
-
| `pureHomeApp` | boolean | Whether to create meters as standard accessories that can be used on the Home App (power will show as ambient light sensors)
|
|
84
|
-
|
|
85
|
-
**NOTE:** The `pollingFrequency` parameter defaults to 300 seconds, since Solax inverters update cloud data every 5 minutes.
|
|
86
|
-
|
|
87
|
-
Configuration through the the use of [Homebridge UI](https://github.com/oznu/homebridge-config-ui-x) plugin is also available and recommended:
|
|
88
|
-
|
|
89
|
-
<img src="images/homebridge-ui.png" width="100%" height="100%">
|
|
90
|
-
|
|
91
|
-
## Non-standard characteristics
|
|
92
|
-
|
|
93
|
-
Non-standard accessory characteristics are available through the use of [Eve for HomeKit app](https://apps.apple.com/us/app/eve-for-homekit/id917695792) you may download from the App Store.
|
|
94
|
-
|
|
95
|
-
This will allow some non-standard characteristics to be visible along with its historical data (like power or total energy consumption), as depicted in the image below:
|
|
96
|
-
|
|
97
|
-
<img src="images/plugin-outlet-consumption.png" width="50%" height="50%">
|
|
98
|
-
|
|
99
|
-
If you want to rely solely on the native Home App, please enable the `pureHomeApp` config setting. In this case, power consumption on each meter will be exposed as an Ambient Light Sensor, as shown below (minimum value for an Ambient Light Sensor is 0.1 lux):
|
|
100
|
-
|
|
101
|
-
<img src="images/plugin-accessories-home-pure.png" width="50%" height="50%">
|
|
102
|
-
|
|
103
|
-
# Automation
|
|
104
|
-
|
|
105
|
-
Automation can be achieved with the help of the virtual **Update** motion sensor that was specifically tailored for this effect and which is available for each inverter. This motion sensor will be triggered whenever inverter data gets updated from the Solax Cloud API (according to what is defined on the `pollingFrequency` configuration setting).
|
|
106
|
-
|
|
107
|
-
<img src="images/plugin-accessories-eve.png" width="50%" height="50%">
|
|
108
|
-
|
|
109
|
-
Motion is detected by the **Update** motion sensor whenever there is newly fetched inverter data from Solax Cloud. Using this sensor as a trigger combined with power and energy data from the virtual outlets enumerated above forms the basic building blocks for defining an automation.
|
|
110
|
-
|
|
111
|
-
## Automation example
|
|
112
|
-
|
|
113
|
-
Since automations are probably going to be dependent on the non-standard **Consumption** characteristics from the virtual outlets, these must created by using the Eve App.
|
|
114
|
-
|
|
115
|
-
As an automation example, let's imagine we want to turn a pool heater pump on whenever the inverter AC power is greater than a specific figure (in Watt):
|
|
116
|
-
|
|
117
|
-
<table cellspacing="0" cellpadding="0">
|
|
118
|
-
<tr>
|
|
119
|
-
<td width="50%">1. Under Automation, select <b>Rules</b></td>
|
|
120
|
-
<td width="50%">2. Click <b>Next</b></td>
|
|
121
|
-
</tr>
|
|
122
|
-
<tr>
|
|
123
|
-
<td><img src="images/automation/automation_1.png"></td>
|
|
124
|
-
<td><img src="images/automation/automation_2.png"></td>
|
|
125
|
-
</tr>
|
|
126
|
-
<tr>
|
|
127
|
-
<td>3. Click <b>Add Trigger</b></td>
|
|
128
|
-
<td>4. Select <b>Motion</b> as trigger type</td>
|
|
129
|
-
</tr>
|
|
130
|
-
<tr>
|
|
131
|
-
<td><img src="images/automation/automation_3.png"></td>
|
|
132
|
-
<td><img src="images/automation/automation_4.png"></td>
|
|
133
|
-
</tr>
|
|
134
|
-
<tr>
|
|
135
|
-
<td>5. Select the Solax <b>Update</b> motion detector and set <b>Motion</b> as trigger</td>
|
|
136
|
-
<td>6. Click <b>Next</b></td>
|
|
137
|
-
</tr>
|
|
138
|
-
<tr>
|
|
139
|
-
<td><img src="images/automation/automation_5.png"></td>
|
|
140
|
-
<td><img src="images/automation/automation_6.png"></td>
|
|
141
|
-
</tr>
|
|
142
|
-
<tr>
|
|
143
|
-
<td>7. Select <b>Add Value Condition</b></td>
|
|
144
|
-
<td>8. Choose <b>Inverter AC Consumption</b> as characteristic and elect <b>>=</b> a desired value</b></td>
|
|
145
|
-
</tr>
|
|
146
|
-
<tr>
|
|
147
|
-
<td><img src="images/automation/automation_7.png"></td>
|
|
148
|
-
<td><img src="images/automation/automation_8.png"></td>
|
|
149
|
-
</tr>
|
|
150
|
-
<tr>
|
|
151
|
-
<td>9. Click <b>Next</b></td>
|
|
152
|
-
<td>10. If no scene exists, click <b>Add Scene</b></td>
|
|
153
|
-
</tr>
|
|
154
|
-
<tr>
|
|
155
|
-
<td><img src="images/automation/automation_9.png"></td>
|
|
156
|
-
<td><img src="images/automation/automation_10.png"></td>
|
|
157
|
-
</tr>
|
|
158
|
-
<tr>
|
|
159
|
-
<td>11. Click <b>Add Actions</b></td>
|
|
160
|
-
<td>12. Select the accessory to be controlled (in this case <b>Garden Pool Outlet</b> will be turned <b>ON</b>)</td>
|
|
161
|
-
</tr>
|
|
162
|
-
<tr>
|
|
163
|
-
<td><img src="images/automation/automation_11.png"></td>
|
|
164
|
-
<td><img src="images/automation/automation_12.png"></td>
|
|
165
|
-
</tr>
|
|
166
|
-
<tr>
|
|
167
|
-
<td>13. Click <b>Next</b></td>
|
|
168
|
-
<td>14. Name your scene and click <b>Done</b></td>
|
|
169
|
-
</tr>
|
|
170
|
-
<tr>
|
|
171
|
-
<td><img src="images/automation/automation_13.png"></td>
|
|
172
|
-
<td><img src="images/automation/automation_14.png"></td>
|
|
173
|
-
</tr>
|
|
174
|
-
<tr>
|
|
175
|
-
<td>15. Click <b>Next</b></td>
|
|
176
|
-
<td>16. Name your rule and click <b>Done</b></td>
|
|
177
|
-
</tr>
|
|
178
|
-
<tr>
|
|
179
|
-
<td><img src="images/automation/automation_15.png"></td>
|
|
180
|
-
<td><img src="images/automation/automation_16.png"></td>
|
|
181
|
-
</tr>
|
|
182
|
-
</table>
|
|
183
|
-
|
|
184
|
-
# TO DO
|
|
185
|
-
|
|
186
|
-
Next planned plugin releases should include:
|
|
187
|
-
|
|
188
|
-
- [X] **Inverter AC** to include Total Yield Energy
|
|
189
|
-
- [X] Consumption history through the [fakegato-history](https://github.com/simont77/fakegato-history) module
|
|
190
|
-
- [x] Enable support for "pure" Home App accessories (power meters will be exposed as Ambient Light sensors)
|
|
191
|
-
- [x] Add "smooth" accessories for power meters (compensating for sporadic scenarios like cloud a passing)
|
|
192
|
-
- [x] Support for multiple inverters
|
|
193
|
-
- [x]
|
|
1
|
+
|
|
2
|
+
<table cellspacing="0" cellpadding="0">
|
|
3
|
+
<tr>
|
|
4
|
+
<td align="center"><img src="https://github.com/homebridge/branding/raw/master/logos/homebridge-wordmark-logo-vertical.png" width="150"></td>
|
|
5
|
+
<td align="center"><img src="https://www.solaxpower.com/wp-content/uploads/2020/03/weblogo5.png" width="300"></td>
|
|
6
|
+
<tr>
|
|
7
|
+
</table>
|
|
8
|
+
|
|
9
|
+
# Solax Cloud Plugin for Homebridge
|
|
10
|
+
|
|
11
|
+
  [](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
The Solax Cloud Plugin for [Homebridge](https://homebridge.io/) was created as a platform plugin to gather data exposed by **Solax inverters** to the cloud through the [Solax Cloud API](https://www.solaxcloud.com/phoebus/resource/files/userGuide/Solax_API.pdf). Please note that **QCells inverters** all also supported cloud requests sharea a similar approach.
|
|
15
|
+
|
|
16
|
+
Now with support for **multiple inverters**! Sensors will be created for each of the inverters present in the configuration. Additionally, a virtual inverter named "All inverters" will be created whenever a multiple inverters configuration is present. This inverter will present summarized power and consumption figures derived from data for all the physical inverters.
|
|
17
|
+
|
|
18
|
+
As HomeKit is still clueless about what a solar panel is, this plugin exposes a set of standard HomeKit accessories though Homebridge for each configured inverter that will allow interacting and automating your smart home based on the data made available from the Solax platform:
|
|
19
|
+
|
|
20
|
+
- **PV** (PV outlet with power consumption)
|
|
21
|
+
- **AC** (Inverter AC outlet with power and total energy consumptions)
|
|
22
|
+
- **To Grid** (Inverter to Grid outlet with power consumption)
|
|
23
|
+
- **To House** (Inverter to House outlet with power consumption)
|
|
24
|
+
- **From Grid** (Grid to House outlet with power consumption)
|
|
25
|
+
- **Update** (Motion sensor)
|
|
26
|
+
|
|
27
|
+
Battery information is also provided as Homekit accessories in case there are any batteries installed for any of the configured inverters:
|
|
28
|
+
|
|
29
|
+
- **To Battery** (Outlet with inverter power charging the battery)
|
|
30
|
+
- **From Battery** (Outlet with power drawn from the battery to the inverter)
|
|
31
|
+
- **Battery** (Battery with State of Charge information such as level or charge state)
|
|
32
|
+
|
|
33
|
+
<img src="images/plugin-accessories-home.png" width="50%" height="50%">
|
|
34
|
+
|
|
35
|
+
Please note that additional accessories are created by default with smooth power consumption curves (by applying either a simple or exponential moving average to the power series). This prevents sporadic events like a cloud passing by to have an immediate affect on provided meters.
|
|
36
|
+
|
|
37
|
+
## Required information
|
|
38
|
+
|
|
39
|
+
For this plugin to work, two critical pieces of information are required from Solax/QCells Cloud:
|
|
40
|
+
|
|
41
|
+
- **Token ID**: Solax/Qcells users can get inverter information through the granted tokenID. You need to obtain your tokenID on the API page of Solax/Qcells cloud.
|
|
42
|
+
- **SN**: Registration No (communication module SN) for each desired inverter.
|
|
43
|
+
|
|
44
|
+
## Installation
|
|
45
|
+
|
|
46
|
+
This plugin is supported under Homebridge. It is highly recommended that you use Homebridge Config UI X to install and configure this plugin.
|
|
47
|
+
|
|
48
|
+
### Manual Installation
|
|
49
|
+
|
|
50
|
+
Install this plugin using: `sudo npm install -g homebridge-solaxcloud-api`.
|
|
51
|
+
Edit `config.json` manually to add your Solax inverters. See below for instructions on that.
|
|
52
|
+
|
|
53
|
+
## Platform configuration
|
|
54
|
+
|
|
55
|
+
Minimal platform configuration is depicted by the example configuration file below:
|
|
56
|
+
|
|
57
|
+
```json
|
|
58
|
+
{
|
|
59
|
+
"platforms": [
|
|
60
|
+
{
|
|
61
|
+
"platform": "SolaxCloudAPI",
|
|
62
|
+
"inverters": [
|
|
63
|
+
{
|
|
64
|
+
"brand": "solax",
|
|
65
|
+
"tokenId": "20200722185111234567890",
|
|
66
|
+
"name": "Solax",
|
|
67
|
+
"sn": "ABCDEFGHIJ"
|
|
68
|
+
}
|
|
69
|
+
],
|
|
70
|
+
}
|
|
71
|
+
]
|
|
72
|
+
}
|
|
73
|
+
```
|
|
74
|
+
Configuration parameters are described on the table below:
|
|
75
|
+
|
|
76
|
+
| **Parameter** | **Type** | **Description** | **Default** | **Mandatory?** |
|
|
77
|
+
| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------:| :------------: |
|
|
78
|
+
| `platform` | string | Platform name (must be SolaxCloudAPI) | - | Y |
|
|
79
|
+
| `inverters` | array | Array of configured inverters as objects with `{ brand: string, tokenId: string, name: string, sn: string, hasBattery: boolean }`, where `brand` is "solax" or "qcells", `tokenID` is the access token retrieved from the API page of Solax/QCells Cloud, `name` is the inverter name, used as prefix for accessory naming, `sn` is the inverter registration no. (inverter module SN) and `hasBattery` indicates on whether this inverter is connected to a battery. | - | Y |
|
|
80
|
+
| `pollingFrequency` | number | Plugin data polling frequency from Solax Cloud (in seconds) | 300 | N |
|
|
81
|
+
| `smoothingMeters` | boolean | Whether to create additional meters by smoothing raw values from Solax Cloud | true | N |
|
|
82
|
+
| `smoothingMethod` | string | Statistical method to use for smoothing raw values from Solax Cloud (simple or exponential moving average - "sma" or "ema") | "sma" | N |
|
|
83
|
+
| `pureHomeApp` | boolean | Whether to create meters as standard accessories that can be used on the Home App (power will show as ambient light sensors) | false | N |
|
|
84
|
+
|
|
85
|
+
**NOTE:** The `pollingFrequency` parameter defaults to 300 seconds, since Solax/QCells inverters update cloud data every 5 minutes.
|
|
86
|
+
|
|
87
|
+
Configuration through the the use of [Homebridge UI](https://github.com/oznu/homebridge-config-ui-x) plugin is also available and recommended:
|
|
88
|
+
|
|
89
|
+
<img src="images/homebridge-ui.png" width="100%" height="100%">
|
|
90
|
+
|
|
91
|
+
## Non-standard characteristics
|
|
92
|
+
|
|
93
|
+
Non-standard accessory characteristics are available through the use of [Eve for HomeKit app](https://apps.apple.com/us/app/eve-for-homekit/id917695792) you may download from the App Store.
|
|
94
|
+
|
|
95
|
+
This will allow some non-standard characteristics to be visible along with its historical data (like power or total energy consumption), as depicted in the image below:
|
|
96
|
+
|
|
97
|
+
<img src="images/plugin-outlet-consumption.png" width="50%" height="50%">
|
|
98
|
+
|
|
99
|
+
If you want to rely solely on the native Home App, please enable the `pureHomeApp` config setting. In this case, power consumption on each meter will be exposed as an Ambient Light Sensor, as shown below (minimum value for an Ambient Light Sensor is 0.1 lux):
|
|
100
|
+
|
|
101
|
+
<img src="images/plugin-accessories-home-pure.png" width="50%" height="50%">
|
|
102
|
+
|
|
103
|
+
# Automation
|
|
104
|
+
|
|
105
|
+
Automation can be achieved with the help of the virtual **Update** motion sensor that was specifically tailored for this effect and which is available for each inverter. This motion sensor will be triggered whenever inverter data gets updated from the Solax Cloud API (according to what is defined on the `pollingFrequency` configuration setting).
|
|
106
|
+
|
|
107
|
+
<img src="images/plugin-accessories-eve.png" width="50%" height="50%">
|
|
108
|
+
|
|
109
|
+
Motion is detected by the **Update** motion sensor whenever there is newly fetched inverter data from Solax Cloud. Using this sensor as a trigger combined with power and energy data from the virtual outlets enumerated above forms the basic building blocks for defining an automation.
|
|
110
|
+
|
|
111
|
+
## Automation example
|
|
112
|
+
|
|
113
|
+
Since automations are probably going to be dependent on the non-standard **Consumption** characteristics from the virtual outlets, these must created by using the Eve App.
|
|
114
|
+
|
|
115
|
+
As an automation example, let's imagine we want to turn a pool heater pump on whenever the inverter AC power is greater than a specific figure (in Watt):
|
|
116
|
+
|
|
117
|
+
<table cellspacing="0" cellpadding="0">
|
|
118
|
+
<tr>
|
|
119
|
+
<td width="50%">1. Under Automation, select <b>Rules</b></td>
|
|
120
|
+
<td width="50%">2. Click <b>Next</b></td>
|
|
121
|
+
</tr>
|
|
122
|
+
<tr>
|
|
123
|
+
<td><img src="images/automation/automation_1.png"></td>
|
|
124
|
+
<td><img src="images/automation/automation_2.png"></td>
|
|
125
|
+
</tr>
|
|
126
|
+
<tr>
|
|
127
|
+
<td>3. Click <b>Add Trigger</b></td>
|
|
128
|
+
<td>4. Select <b>Motion</b> as trigger type</td>
|
|
129
|
+
</tr>
|
|
130
|
+
<tr>
|
|
131
|
+
<td><img src="images/automation/automation_3.png"></td>
|
|
132
|
+
<td><img src="images/automation/automation_4.png"></td>
|
|
133
|
+
</tr>
|
|
134
|
+
<tr>
|
|
135
|
+
<td>5. Select the Solax <b>Update</b> motion detector and set <b>Motion</b> as trigger</td>
|
|
136
|
+
<td>6. Click <b>Next</b></td>
|
|
137
|
+
</tr>
|
|
138
|
+
<tr>
|
|
139
|
+
<td><img src="images/automation/automation_5.png"></td>
|
|
140
|
+
<td><img src="images/automation/automation_6.png"></td>
|
|
141
|
+
</tr>
|
|
142
|
+
<tr>
|
|
143
|
+
<td>7. Select <b>Add Value Condition</b></td>
|
|
144
|
+
<td>8. Choose <b>Inverter AC Consumption</b> as characteristic and elect <b>>=</b> a desired value</b></td>
|
|
145
|
+
</tr>
|
|
146
|
+
<tr>
|
|
147
|
+
<td><img src="images/automation/automation_7.png"></td>
|
|
148
|
+
<td><img src="images/automation/automation_8.png"></td>
|
|
149
|
+
</tr>
|
|
150
|
+
<tr>
|
|
151
|
+
<td>9. Click <b>Next</b></td>
|
|
152
|
+
<td>10. If no scene exists, click <b>Add Scene</b></td>
|
|
153
|
+
</tr>
|
|
154
|
+
<tr>
|
|
155
|
+
<td><img src="images/automation/automation_9.png"></td>
|
|
156
|
+
<td><img src="images/automation/automation_10.png"></td>
|
|
157
|
+
</tr>
|
|
158
|
+
<tr>
|
|
159
|
+
<td>11. Click <b>Add Actions</b></td>
|
|
160
|
+
<td>12. Select the accessory to be controlled (in this case <b>Garden Pool Outlet</b> will be turned <b>ON</b>)</td>
|
|
161
|
+
</tr>
|
|
162
|
+
<tr>
|
|
163
|
+
<td><img src="images/automation/automation_11.png"></td>
|
|
164
|
+
<td><img src="images/automation/automation_12.png"></td>
|
|
165
|
+
</tr>
|
|
166
|
+
<tr>
|
|
167
|
+
<td>13. Click <b>Next</b></td>
|
|
168
|
+
<td>14. Name your scene and click <b>Done</b></td>
|
|
169
|
+
</tr>
|
|
170
|
+
<tr>
|
|
171
|
+
<td><img src="images/automation/automation_13.png"></td>
|
|
172
|
+
<td><img src="images/automation/automation_14.png"></td>
|
|
173
|
+
</tr>
|
|
174
|
+
<tr>
|
|
175
|
+
<td>15. Click <b>Next</b></td>
|
|
176
|
+
<td>16. Name your rule and click <b>Done</b></td>
|
|
177
|
+
</tr>
|
|
178
|
+
<tr>
|
|
179
|
+
<td><img src="images/automation/automation_15.png"></td>
|
|
180
|
+
<td><img src="images/automation/automation_16.png"></td>
|
|
181
|
+
</tr>
|
|
182
|
+
</table>
|
|
183
|
+
|
|
184
|
+
# TO DO
|
|
185
|
+
|
|
186
|
+
Next planned plugin releases should include:
|
|
187
|
+
|
|
188
|
+
- [X] **Inverter AC** to include Total Yield Energy
|
|
189
|
+
- [X] Consumption history through the [fakegato-history](https://github.com/simont77/fakegato-history) module
|
|
190
|
+
- [x] Enable support for "pure" Home App accessories (power meters will be exposed as Ambient Light sensors)
|
|
191
|
+
- [x] Add "smooth" accessories for power meters (compensating for sporadic scenarios like cloud a passing)
|
|
192
|
+
- [x] Support for multiple inverters
|
|
193
|
+
- [x] Support for multiple brands (between Solax and QCells)
|
|
194
|
+
- [x] Accessories for battery state and consumptions
|
package/config.json
CHANGED
|
@@ -2,11 +2,10 @@
|
|
|
2
2
|
"platforms": [
|
|
3
3
|
{
|
|
4
4
|
"platform": "SolaxCloudAPI",
|
|
5
|
-
"brand": 0,
|
|
6
|
-
"name": "My Solax",
|
|
7
|
-
"tokenId": "20211120033637006926905",
|
|
8
5
|
"inverters": [
|
|
9
6
|
{
|
|
7
|
+
"brand": "solax",
|
|
8
|
+
"tokenId": "20211120033637006926905",
|
|
10
9
|
"name": "My Solax",
|
|
11
10
|
"sn": "SWXGXCQJBT"
|
|
12
11
|
}
|
package/config.sample
CHANGED
package/config.schema.json
CHANGED
|
@@ -6,26 +6,6 @@
|
|
|
6
6
|
"schema": {
|
|
7
7
|
"type": "object",
|
|
8
8
|
"properties": {
|
|
9
|
-
"brand": {
|
|
10
|
-
"title": "Inverter Brand",
|
|
11
|
-
"type": "integer",
|
|
12
|
-
"required": true,
|
|
13
|
-
"default": 0,
|
|
14
|
-
"oneOf": [
|
|
15
|
-
{ "title": "Solax", "enum": [ 0 ] },
|
|
16
|
-
{ "title": "QCells", "enum": [ 1 ] }
|
|
17
|
-
],
|
|
18
|
-
"description": "Brand for list of inverters below (API data fetch URL is brand dependent)."
|
|
19
|
-
},
|
|
20
|
-
"tokenId": {
|
|
21
|
-
"title": "TokenID",
|
|
22
|
-
"type": "string",
|
|
23
|
-
"required": true,
|
|
24
|
-
"description": "Users get information from the cloud API through the granted tokenID. Please obtain your tokenID on the API page of Solax/QCells cloud.",
|
|
25
|
-
"default": "20200722185111234567890",
|
|
26
|
-
"minLength": 23,
|
|
27
|
-
"maxLength": 23
|
|
28
|
-
},
|
|
29
9
|
"inverters": {
|
|
30
10
|
"title": "Inverters",
|
|
31
11
|
"type": "array",
|
|
@@ -33,6 +13,26 @@
|
|
|
33
13
|
"title": "Inverter",
|
|
34
14
|
"type": "object",
|
|
35
15
|
"properties": {
|
|
16
|
+
"brand": {
|
|
17
|
+
"title": "Inverter Brand",
|
|
18
|
+
"type": "string",
|
|
19
|
+
"required": true,
|
|
20
|
+
"default": "solax",
|
|
21
|
+
"oneOf": [
|
|
22
|
+
{ "title": "Solax", "enum": [ "solax" ] },
|
|
23
|
+
{ "title": "QCells", "enum": [ "qcells" ] }
|
|
24
|
+
],
|
|
25
|
+
"description": "Brand for list of inverters below (API data fetch URL is brand dependent)."
|
|
26
|
+
},
|
|
27
|
+
"tokenId": {
|
|
28
|
+
"title": "TokenID",
|
|
29
|
+
"type": "string",
|
|
30
|
+
"required": true,
|
|
31
|
+
"description": "Users get information from the cloud API through the granted tokenID. Please obtain your tokenID on the API page of Solax/QCells cloud.",
|
|
32
|
+
"default": "20200722185111234567890",
|
|
33
|
+
"minLength": 23,
|
|
34
|
+
"maxLength": 23
|
|
35
|
+
},
|
|
36
36
|
"name": {
|
|
37
37
|
"title": "Inverter name (unique)",
|
|
38
38
|
"type": "string",
|
package/dist/platform.d.ts
CHANGED
|
@@ -29,7 +29,7 @@ export declare class SolaxCloudAPIPlatform implements StaticPlatformPlugin {
|
|
|
29
29
|
*/
|
|
30
30
|
constructor(log: Logging, config: PlatformConfig, api: API);
|
|
31
31
|
/**
|
|
32
|
-
* Check whether object implements interface InverterConfig.
|
|
32
|
+
* Check whether object implements interface InverterConfig and brand has a valid entry.
|
|
33
33
|
* @param obj Any object.
|
|
34
34
|
* @returns Whether object implements interface InverterConfig.
|
|
35
35
|
*/
|
package/dist/platform.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAY,MAAM,YAAY,CAAC;
|
|
1
|
+
{"version":3,"file":"platform.d.ts","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,oBAAoB,EAAE,OAAO,EAAE,cAAc,EAAY,MAAM,YAAY,CAAC;AAkD3G;;;;GAIG;AACH,qBAAa,qBAAsB,YAAW,oBAAoB;IAChE,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAE1B;;OAEG;IACH,OAAO,CAAC,eAAe,CAAK;IAE5B;;OAEG;IACH,OAAO,CAAC,SAAS,CAAuC;IAExD;;QAEI;IACJ,OAAO,CAAC,YAAY,CAAiC;IAErD;;;;;;OAMG;gBACU,GAAG,EAAE,OAAO,EAAE,MAAM,EAAE,cAAc,EAAE,GAAG,EAAE,GAAG;IAuD3D;;;;OAIG;IAEH,OAAO,CAAC,MAAM,CAAC,gBAAgB;IAI/B;;OAEG;IACH,OAAO,CAAC,sBAAsB;IAmC9B;;;OAGG;YACW,KAAK;IAInB;;OAEG;YACW,qBAAqB;IAoBnC;;;OAGG;IACH,OAAO,CAAC,WAAW;IA2GnB,WAAW,CAAC,QAAQ,EAAE,CAAC,gBAAgB,EAAE,eAAe,EAAE,KAAK,IAAI,GAAG,IAAI;CAa3E"}
|
package/dist/platform.js
CHANGED
|
@@ -3,6 +3,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.SolaxCloudAPIPlatform = void 0;
|
|
4
4
|
const util_1 = require("./util");
|
|
5
5
|
const platformInverter_1 = require("./platformInverter");
|
|
6
|
+
/**
|
|
7
|
+
* Valid inverter brands (Solax, QCells)
|
|
8
|
+
*/
|
|
9
|
+
const VALID_INVERTER_BRANDS = ['solax', 'qcells'];
|
|
6
10
|
/**
|
|
7
11
|
* Valid smoothing methods (Simple Moving Average, Exponential Moving Average).
|
|
8
12
|
*/
|
|
@@ -12,7 +16,7 @@ const VALID_SMOOTHING_METHODS = ['sma', 'ema'];
|
|
|
12
16
|
*/
|
|
13
17
|
const DEFAULT_SMOOTHING_METHOD = 'sma';
|
|
14
18
|
/**
|
|
15
|
-
* Default polling frequency from Solax Cloud (in seconds).
|
|
19
|
+
* Default polling frequency from Solax or QCells Cloud (in seconds).
|
|
16
20
|
*/
|
|
17
21
|
const DEFAULT_POLLING_FREQUENCY = 300;
|
|
18
22
|
/**
|
|
@@ -68,13 +72,13 @@ class SolaxCloudAPIPlatform {
|
|
|
68
72
|
// loop over configured inverters
|
|
69
73
|
this.config.inverters.forEach(inverter => {
|
|
70
74
|
// setup new inverter
|
|
71
|
-
const platformInverter = new platformInverter_1.SolaxCloudAPIPlatformInverter(log, config, api,
|
|
75
|
+
const platformInverter = new platformInverter_1.SolaxCloudAPIPlatformInverter(log, config, api, VALID_INVERTER_BRANDS.indexOf(inverter.brand), inverter.tokenId, inverter.sn, inverter.name, inverter.hasBattery, this.smoothingWindow);
|
|
72
76
|
// add new inverter to list
|
|
73
77
|
this.inverters.push(platformInverter);
|
|
74
78
|
});
|
|
75
|
-
// create inverter totalizers
|
|
79
|
+
// create inverter totalizers (pick first inverter as brand)
|
|
76
80
|
if (this.inverters.length > 1) {
|
|
77
|
-
this.allInverters = new platformInverter_1.SolaxCloudAPIPlatformInverter(log, config, api, this.config.brand, this.config.tokenId, 'total', 'All inverters', this.inverters.map(inverter => +inverter.hasBattery()).reduce((a, b) => a + b, 0) > 0, this.smoothingWindow);
|
|
81
|
+
this.allInverters = new platformInverter_1.SolaxCloudAPIPlatformInverter(log, config, api, VALID_INVERTER_BRANDS.indexOf(this.config.inverters[0].brand), this.config.tokenId, 'total', 'All inverters', this.inverters.map(inverter => +inverter.hasBattery()).reduce((a, b) => a + b, 0) > 0, this.smoothingWindow);
|
|
78
82
|
}
|
|
79
83
|
// start data fetching
|
|
80
84
|
this.fetchDataPeriodically();
|
|
@@ -89,13 +93,13 @@ class SolaxCloudAPIPlatform {
|
|
|
89
93
|
});
|
|
90
94
|
}
|
|
91
95
|
/**
|
|
92
|
-
* Check whether object implements interface InverterConfig.
|
|
96
|
+
* Check whether object implements interface InverterConfig and brand has a valid entry.
|
|
93
97
|
* @param obj Any object.
|
|
94
98
|
* @returns Whether object implements interface InverterConfig.
|
|
95
99
|
*/
|
|
96
100
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
101
|
static isInverterConfig(obj) {
|
|
98
|
-
return 'name' in obj && 'sn' in obj;
|
|
102
|
+
return 'name' in obj && 'sn' in obj && 'brand' in obj && 'tokenId' in obj && VALID_INVERTER_BRANDS.includes(obj.brand);
|
|
99
103
|
}
|
|
100
104
|
/**
|
|
101
105
|
* Update data for virtual inverter totalizer based on individual inverter data.
|
|
@@ -136,7 +140,7 @@ class SolaxCloudAPIPlatform {
|
|
|
136
140
|
for (;;) {
|
|
137
141
|
// update data for all configured inverters
|
|
138
142
|
this.inverters.forEach(inverter => inverter.updateInverterDataFromCloud());
|
|
139
|
-
this.log.info(`Updated data from
|
|
143
|
+
this.log.info(`Updated data from ${this.config.brand} Cloud API, sleeping for ${this.config.pollingFrequency} seconds.`);
|
|
140
144
|
// update inverter totalizers if needed
|
|
141
145
|
if (this.inverters.length > 1) {
|
|
142
146
|
this.log.info('Computing inverter totals...');
|
|
@@ -153,45 +157,12 @@ class SolaxCloudAPIPlatform {
|
|
|
153
157
|
checkConfig(config) {
|
|
154
158
|
let result = true;
|
|
155
159
|
this.log.debug(`Config read: ${JSON.stringify(config)}`);
|
|
156
|
-
// check for configuration conversion to new format if needed
|
|
157
|
-
if (!config.inverters) {
|
|
158
|
-
// check for "old" configuration settings
|
|
159
|
-
if (config.name && config.sn) {
|
|
160
|
-
this.log.info('Converting config file to new format (with multiple inverters support)...');
|
|
161
|
-
// setup new configuration settings (supporting multiple inverters) with single entry
|
|
162
|
-
config.inverters = [
|
|
163
|
-
{
|
|
164
|
-
name: config.name,
|
|
165
|
-
sn: config.sn,
|
|
166
|
-
},
|
|
167
|
-
];
|
|
168
|
-
// delete old configuration settings
|
|
169
|
-
delete config.name;
|
|
170
|
-
delete config.sn;
|
|
171
|
-
}
|
|
172
|
-
}
|
|
173
160
|
// check for mandatory parameters
|
|
174
|
-
if (!config.tokenId) {
|
|
175
|
-
this.log.error('Config check: Can\'t find mandatory parameter "tokenId" parameter in config file, aborting!');
|
|
176
|
-
result = false;
|
|
177
|
-
return result;
|
|
178
|
-
}
|
|
179
161
|
if (!config.inverters) {
|
|
180
162
|
this.log.error('Config check: Can\'t find mandatory parameter "inverters" parameter in config file, aborting!');
|
|
181
163
|
result = false;
|
|
182
164
|
return result;
|
|
183
165
|
}
|
|
184
|
-
// check for inverter brand
|
|
185
|
-
if (!config.brand) {
|
|
186
|
-
this.log.warn('Config check: Can\'t find parameter "brand" in config file (old format?), defaulting to Solax!');
|
|
187
|
-
config.brand = platformInverter_1.INVERTER_BRAND.SOLAX;
|
|
188
|
-
}
|
|
189
|
-
else {
|
|
190
|
-
if (config.brand !== platformInverter_1.INVERTER_BRAND.SOLAX && config.brand !== platformInverter_1.INVERTER_BRAND.QCELLS) {
|
|
191
|
-
this.log.warn('Config check: Invalid parameter "brand" in config file (old format?), defaulting to Solax!');
|
|
192
|
-
config.brand = platformInverter_1.INVERTER_BRAND.SOLAX;
|
|
193
|
-
}
|
|
194
|
-
}
|
|
195
166
|
// check for inverters type
|
|
196
167
|
if (Array.isArray(config.inverters)) {
|
|
197
168
|
// loop over inverters and check config type
|
package/dist/platform.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,iCAA8B;AAC9B,
|
|
1
|
+
{"version":3,"file":"platform.js","sourceRoot":"","sources":["../src/platform.ts"],"names":[],"mappings":";;;AAEA,iCAA8B;AAC9B,yDAAmF;AAEnF;;GAEG;AACH,MAAM,qBAAqB,GAAG,CAAC,OAAO,EAAE,QAAQ,CAAC,CAAC;AAElD;;GAEG;AACH,MAAM,uBAAuB,GAAG,CAAE,KAAK,EAAE,KAAK,CAAE,CAAC;AAEjD;;GAEG;AACH,MAAM,wBAAwB,GAAG,KAAK,CAAC;AAEvC;;GAEG;AACH,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAEtC;;GAEG;AACH,MAAM,aAAa,GAAG,EAAE,CAAC;AAEzB;;GAEG;AACH,MAAM,aAAa,GAAG,KAAK,CAAC;AAE5B;;GAEG;AACH,MAAM,qBAAqB,GAAG,IAAI,CAAC,GAAG,CAAC,EAAE,GAAG,aAAa,EAAE,CAAC,EAAE,GAAG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AAM,CAAC,EAAE,CAAC,CAAC;QAEzE,OAAO,MAAM,CAAC;IAChB,CAAC;IAED;;;;OAIG;IACH,WAAW,CAAC,QAAuD;QACjE,MAAM,WAAW,GAAsB,EAAE,CAAC;QAE1C,0CAA0C;QAC1C,IAAI,CAAC,SAAS,CAAC,OAAO,CAAC,QAAQ,CAAC,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,GAAG,QAAQ,CAAC,cAAc,EAAE,CAAC,CAAC,CAAC;QAEnF,+CAA+C;QAC/C,IAAI,IAAI,CAAC,SAAS,CAAC,MAAM,GAAG,CAAC,EAAE;YAC7B,WAAW,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,YAAY,CAAC,cAAc,EAAE,CAAC,CAAC;SACzD;QAED,QAAQ,CAAC,WAAW,CAAC,CAAC;IACxB,CAAC;CACF;AA7RD,sDA6RC"}
|
|
@@ -27,6 +27,10 @@ export declare class SolaxCloudAPIPlatformInverter {
|
|
|
27
27
|
private readonly log;
|
|
28
28
|
private readonly config;
|
|
29
29
|
private readonly api;
|
|
30
|
+
/**
|
|
31
|
+
* Inverter brand.
|
|
32
|
+
*/
|
|
33
|
+
private brand;
|
|
30
34
|
/**
|
|
31
35
|
* Inverter name.
|
|
32
36
|
*/
|
|
@@ -82,12 +86,21 @@ export declare class SolaxCloudAPIPlatformInverter {
|
|
|
82
86
|
* @param log
|
|
83
87
|
* @param config
|
|
84
88
|
* @param api
|
|
89
|
+
* @param brand
|
|
85
90
|
* @param tokenId
|
|
86
|
-
* @param
|
|
91
|
+
* @param sn
|
|
92
|
+
* @param name
|
|
93
|
+
* @param hasBattery
|
|
87
94
|
* @param smoothingWindow
|
|
88
95
|
* @returns
|
|
89
96
|
*/
|
|
90
97
|
constructor(log: Logging, config: PlatformConfig, api: API, brand: number, tokenId: string, sn: string, name: string, hasBattery: boolean, smoothingWindow: number);
|
|
98
|
+
/**
|
|
99
|
+
* Gets the inverter brand name.
|
|
100
|
+
* @param {number} brand Inverter brand type.
|
|
101
|
+
* @returns Inverter brand name.
|
|
102
|
+
*/
|
|
103
|
+
static getInverterBrandName(brand: number): string;
|
|
91
104
|
/**
|
|
92
105
|
* Update all platform accessory status based on the values read from the API.
|
|
93
106
|
* @param {SolaxCloudAPIResponse} apiData API data from Solax Cloud.
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformInverter.d.ts","sourceRoot":"","sources":["../src/platformInverter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,GAAG,EAAE,OAAO,EAAE,cAAc,EAAE,MAAM,YAAY,CAAC;AAY3E;;GAEG;AACH,eAAO,MAAM,cAAc;;;CAG1B,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,cAAc;;;;;;;;CAQ1B,CAAC;AA4BF;;;;GAIG;AACH,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAU;IAC9B,OAAO,CAAC,QAAQ,CAAC,MAAM,CAAiB;IACxC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAM;IAE1B;;OAEG;IACH,OAAO,CAAC,IAAI,CAAS;IAErB;;QAEI;IACJ,OAAO,CAAC,EAAE,CAAS;IAEnB;;QAEI;IACJ,OAAO,CAAC,gBAAgB,CAAU;IAElC;;OAEG;IACH,OAAO,CAAC,eAAe,CAAS;IAEhC;;OAEG;IACH,OAAO,CAAC,aAAa,CAAgB;IAErC;;OAEG;IACH,OAAO,CAAC,YAAY,CAAwB;IAE5C;;OAEG;IACH,OAAO,CAAC,OAAO,CAAyB;IAExC;;OAEG;IACH,OAAO,CAAC,UAAU,CAAwB;IAE1C;;;;QAII;IACJ,OAAO,CAAC,aAAa,CAAwB;IAE7C;;QAEI;IACJ,OAAO,CAAC,eAAe,CAA6B;IAEpD;;;;QAII;IACJ,OAAO,CAAC,kBAAkB,CAA6B;IAEvD,iCAAiC;IACjC,OAAO,CAAC,gBAAgB,CAAyB;IAEjD
|
|
1
|
+
{"version":3,"file":"platformInverter.d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,EAAE,MAAM;IAmLzB;;;;OAIG;WACW,oBAAoB,CAAC,KAAK,EAAE,MAAM,GAAG,MAAM;IASzD;;;QAGI;IACJ,OAAO,CAAC,iBAAiB;IAuCzB;;;OAGG;IACI,qBAAqB,CAAC,KAAK,EAAE,MAAM;IAI1C;;;OAGG;IACI,qBAAqB,IAAI,MAAM;IAItC;;;OAGG;IACI,eAAe,CAAC,UAAU,EAAE,MAAM;IAIzC;;;OAGG;IACI,eAAe,IAAI,MAAM;IAIhC;;OAEG;IACI,eAAe;IAItB;;;;OAIG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIvC;;;;OAIG;IACI,WAAW,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM;IAQ7C;;;;OAIG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM;IAIxC;;;;OAIG;IACI,YAAY,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM;IAI/C;;;OAGG;IACI,cAAc,CAAC,GAAG,EAAE,MAAM;IAUjC;;OAEG;IACI,2BAA2B;IAoBlC;;;OAGG;IACI,UAAU,IAAI,OAAO;IAI5B;;;OAGG;IACI,cAAc,IAAI,eAAe,EAAE;CAI3C"}
|
package/dist/platformInverter.js
CHANGED
|
@@ -60,8 +60,11 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
60
60
|
* @param log
|
|
61
61
|
* @param config
|
|
62
62
|
* @param api
|
|
63
|
+
* @param brand
|
|
63
64
|
* @param tokenId
|
|
64
|
-
* @param
|
|
65
|
+
* @param sn
|
|
66
|
+
* @param name
|
|
67
|
+
* @param hasBattery
|
|
65
68
|
* @param smoothingWindow
|
|
66
69
|
* @returns
|
|
67
70
|
*/
|
|
@@ -73,11 +76,12 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
73
76
|
this.config = config;
|
|
74
77
|
this.api = api;
|
|
75
78
|
// setup inverter data
|
|
79
|
+
this.brand = brand;
|
|
76
80
|
this.sn = sn.toLowerCase();
|
|
77
81
|
this.name = name;
|
|
78
82
|
this.smoothingWindow = smoothingWindow;
|
|
79
83
|
this.batteryInstalled = hasBattery;
|
|
80
|
-
this.log.info(`Initialing acessories for inverter "${name}" (SN="${sn}")...`);
|
|
84
|
+
this.log.info(`Initialing acessories for inverter "${name}" (SN="${sn}") from ${SolaxCloudAPIPlatformInverter.getInverterBrandName(brand)}...`);
|
|
81
85
|
// init new Solax Cloud API object with give tokenID and sn
|
|
82
86
|
this.solaxCloudAPI = new solaxcloudapi_1.SolaxCloudAPI(brand, tokenId, sn);
|
|
83
87
|
// initial data set
|
|
@@ -88,7 +92,8 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
88
92
|
inverterModel = solaxcloudapi_1.SolaxCloudAPI.getInverterType(apiData.result.inverterType);
|
|
89
93
|
}
|
|
90
94
|
else {
|
|
91
|
-
this.log.info(
|
|
95
|
+
this.log.info(`Could not retrieve initial values from ${SolaxCloudAPIPlatformInverter.getInverterBrandName(brand)} ` +
|
|
96
|
+
'Cloud, accessory Serial Number and Model properties deferred...');
|
|
92
97
|
inverterModel = 'Unknown';
|
|
93
98
|
}
|
|
94
99
|
// setup raw outlet accessories
|
|
@@ -164,6 +169,19 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
164
169
|
}
|
|
165
170
|
}
|
|
166
171
|
}
|
|
172
|
+
/**
|
|
173
|
+
* Gets the inverter brand name.
|
|
174
|
+
* @param {number} brand Inverter brand type.
|
|
175
|
+
* @returns Inverter brand name.
|
|
176
|
+
*/
|
|
177
|
+
static getInverterBrandName(brand) {
|
|
178
|
+
switch (brand) {
|
|
179
|
+
case exports.INVERTER_BRAND.QCELLS:
|
|
180
|
+
return 'QCells';
|
|
181
|
+
default:
|
|
182
|
+
return 'Solax';
|
|
183
|
+
}
|
|
184
|
+
}
|
|
167
185
|
/**
|
|
168
186
|
* Update all platform accessory status based on the values read from the API.
|
|
169
187
|
* @param {SolaxCloudAPIResponse} apiData API data from Solax Cloud.
|
|
@@ -291,7 +309,8 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
291
309
|
*/
|
|
292
310
|
updateInverterDataFromCloud() {
|
|
293
311
|
try {
|
|
294
|
-
this.log.info(`Retrieving data from
|
|
312
|
+
this.log.info(`Retrieving data from ${SolaxCloudAPIPlatformInverter.getInverterBrandName(this.brand)} ` +
|
|
313
|
+
`Cloud API for inverter "${this.name}" (SN="${this.sn}")`);
|
|
295
314
|
const apiData = this.solaxCloudAPI.getAPIData();
|
|
296
315
|
if (apiData.success) {
|
|
297
316
|
this.log.debug(`Retrieved inverter status: ${JSON.stringify(apiData.result)}`);
|
|
@@ -302,7 +321,8 @@ class SolaxCloudAPIPlatformInverter {
|
|
|
302
321
|
}
|
|
303
322
|
}
|
|
304
323
|
catch (error) {
|
|
305
|
-
this.log.error(`Failed to read from
|
|
324
|
+
this.log.error(`Failed to read from ${SolaxCloudAPIPlatformInverter.getInverterBrandName(this.brand)} ` +
|
|
325
|
+
`Cloud API for inverter "${this.name}" (SN="${this.sn})". Error: ${error}`);
|
|
306
326
|
}
|
|
307
327
|
}
|
|
308
328
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"platformInverter.js","sourceRoot":"","sources":["../src/platformInverter.ts"],"names":[],"mappings":";;;AAEA,mDAAuE;AAEvE,uDAAyD;AACzD,iEAAmE;AAInE,uDAAyD;AACzD,yDAAmF;AAEnF;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,EAAE,EAAE,IAAI;IACR,iBAAiB,EAAE,mBAAmB;IACtC,mBAAmB,EAAE,qBAAqB;IAC1C,UAAU,EAAE,YAAY;IACxB,cAAc,EAAE,gBAAgB;IAChC,eAAe,EAAE,iBAAiB;IAClC,WAAW,EAAE,aAAa;CAC3B,CAAC;AAEF;;GAEG;AACH,MAAM,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AA6B,CAAC,oBAAoB,CAAC,IAAI,CAAC,KAAK,CAAC,GAAG;gBACxF,2BAA2B,IAAI,CAAC,IAAI,UAAU,IAAI,CAAC,EAAE,cAAc,KAAK,EAAE,CAAC,CAAC;SAC5F;IACH,CAAC;IAED;;;OAGG;IACI,UAAU;QACf,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;IAED;;;OAGG;IACI,cAAc;QACnB,OAAO,IAAI,CAAC,gBAAgB,CAAC;IAC/B,CAAC;CAEF;AAxcD,sEAwcC"}
|
package/dist/solaxcloudapi.d.ts
CHANGED
|
@@ -59,7 +59,7 @@ export interface SolaxCloudAPIResponse {
|
|
|
59
59
|
/**
|
|
60
60
|
* Brand for cloud data fetching.
|
|
61
61
|
*/
|
|
62
|
-
export declare const
|
|
62
|
+
export declare const INVERTER_BRAND: {
|
|
63
63
|
SOLAX: number;
|
|
64
64
|
QCELLS: number;
|
|
65
65
|
};
|
|
@@ -72,7 +72,7 @@ export declare class SolaxCloudAPI {
|
|
|
72
72
|
readonly sn: string;
|
|
73
73
|
/**
|
|
74
74
|
* Class constructor.
|
|
75
|
-
* @param {number} brand
|
|
75
|
+
* @param {number} brand Inverter brand type.
|
|
76
76
|
* @param {string} tokenId Token ID to gather data from Solax Cloud API.
|
|
77
77
|
* @param {string} sn Unique identifier of inverter (Serial No).
|
|
78
78
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solaxcloudapi.d.ts","sourceRoot":"","sources":["../src/solaxcloudapi.ts"],"names":[],"mappings":"AAEA;;KAEK;AACL,MAAM,WAAW,mBAAmB;IAChC,gDAAgD;IAChD,UAAU,EAAE,MAAM,CAAC;IACnB,kEAAkE;IAClE,EAAE,EAAE,MAAM,CAAC;IACX,kCAAkC;IAClC,OAAO,EAAE,MAAM,CAAC;IAChB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,yCAAyC;IACzC,UAAU,EAAE,MAAM,CAAC;IACnB,0BA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Aa;aAQK,KAAK,EAAE,MAAM;aAAkB,OAAO,EAAE,MAAM;aAAkB,EAAE,EAAE,MAAM;IANvG;;;;;SAKK;gBACwB,KAAK,EAAE,MAAM,EAAkB,OAAO,EAAE,MAAM,EAAkB,EAAE,EAAE,MAAM;IAMvG;;;OAGG;IACH,OAAO,CAAC,WAAW;IAQnB;;;;SAIK;WACS,eAAe,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM;IAiCvD;;;;SAIK;WACS,iBAAiB,CAAC,UAAU,EAAE,MAAM,GAAG,MAAM;IAmC3D;;;;OAIG;WACW,UAAU,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI3D;;;;OAIG;WACW,kBAAkB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAInE;;;;OAIG;WACW,yBAAyB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI1E;;;;OAIG;WACW,2BAA2B,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI5E;;;;OAIG;WACW,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI9D;;;;OAIG;WACW,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI9D;;;;OAIG;WACW,aAAa,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAI9D;;;;OAIG;WACW,sBAAsB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAIvE;;;;OAIG;WACW,mBAAmB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAIpE;;;;OAIG;WACW,uBAAuB,CAAC,IAAI,EAAE,mBAAmB,GAAG,MAAM;IAIxE;;;OAGG;IACI,UAAU,IAAI,qBAAqB;CAc3C"}
|
package/dist/solaxcloudapi.js
CHANGED
|
@@ -3,12 +3,12 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.SolaxCloudAPI = exports.
|
|
6
|
+
exports.SolaxCloudAPI = exports.INVERTER_BRAND = void 0;
|
|
7
7
|
const sync_fetch_1 = __importDefault(require("sync-fetch"));
|
|
8
8
|
/**
|
|
9
9
|
* Brand for cloud data fetching.
|
|
10
10
|
*/
|
|
11
|
-
exports.
|
|
11
|
+
exports.INVERTER_BRAND = {
|
|
12
12
|
SOLAX: 0,
|
|
13
13
|
QCELLS: 1,
|
|
14
14
|
};
|
|
@@ -25,7 +25,7 @@ const CLOUD_URL = {
|
|
|
25
25
|
class SolaxCloudAPI {
|
|
26
26
|
/**
|
|
27
27
|
* Class constructor.
|
|
28
|
-
* @param {number} brand
|
|
28
|
+
* @param {number} brand Inverter brand type.
|
|
29
29
|
* @param {string} tokenId Token ID to gather data from Solax Cloud API.
|
|
30
30
|
* @param {string} sn Unique identifier of inverter (Serial No).
|
|
31
31
|
*/
|
|
@@ -42,7 +42,7 @@ class SolaxCloudAPI {
|
|
|
42
42
|
* @returns Cloud API URL.
|
|
43
43
|
*/
|
|
44
44
|
getCloudURL() {
|
|
45
|
-
if (this.brand === exports.
|
|
45
|
+
if (this.brand === exports.INVERTER_BRAND.QCELLS) {
|
|
46
46
|
return CLOUD_URL.QCELLS;
|
|
47
47
|
}
|
|
48
48
|
else {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"solaxcloudapi.js","sourceRoot":"","sources":["../src/solaxcloudapi.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AA8D/B;;GAEG;AACU,QAAA,
|
|
1
|
+
{"version":3,"file":"solaxcloudapi.js","sourceRoot":"","sources":["../src/solaxcloudapi.ts"],"names":[],"mappings":";;;;;;AAAA,4DAA+B;AA8D/B;;GAEG;AACU,QAAA,cAAc,GAAG;IAC5B,KAAK,EAAE,CAAC;IACR,MAAM,EAAE,CAAC;CACV,CAAC;AAEF;;GAEG;AACH,MAAM,SAAS,GAAG;IAChB,K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AW,EAAE,GAAG,WAAW,GAAG,IAAI,CAAC,OAAO,GAAG,MAAM,GAAG,IAAI,CAAC,EAAE,CAAC,CAAC;YAE3F,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE;gBAChB,MAAM,IAAI,KAAK,CAAC,uBAAuB,QAAQ,CAAC,UAAU,EAAE,CAAC,CAAC;aAC/D;YAED,OAA+B,QAAQ,CAAC,IAAI,EAAE,CAAC;SAChD;QAAC,OAAO,KAAK,EAAE;YACd,OAA+B,EAAE,SAAS,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE,EAAE,OAAO,EAAE,KAAK,EAAE,CAAC;SACjF;IACH,CAAC;CAEF;AApND,sCAoNC"}
|
package/images/homebridge-ui.png
CHANGED
|
Binary file
|
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"displayName": "Homebridge Solax Cloud API",
|
|
4
4
|
"name": "homebridge-solaxcloud-api",
|
|
5
|
-
"version": "2.
|
|
5
|
+
"version": "2.3.0",
|
|
6
6
|
"description": "Integrates solar production info using public Solax/QCells Cloud API into Homebridge accessories.",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"repository": {
|
|
@@ -28,11 +28,12 @@
|
|
|
28
28
|
"homebridge",
|
|
29
29
|
"homebridge-plugin",
|
|
30
30
|
"solax",
|
|
31
|
+
"qcells",
|
|
31
32
|
"solaxcloud"
|
|
32
33
|
],
|
|
33
34
|
"dependencies": {
|
|
34
|
-
"fakegato-history": "^0.6.
|
|
35
|
-
"homebridge-lib": "^5.
|
|
35
|
+
"fakegato-history": "^0.6.4",
|
|
36
|
+
"homebridge-lib": "^5.7.2",
|
|
36
37
|
"jshint": "^2.13.6",
|
|
37
38
|
"string-hash-64": "^1.0.3",
|
|
38
39
|
"sync-fetch": "^0.3.1"
|
|
@@ -43,9 +44,9 @@
|
|
|
43
44
|
"@typescript-eslint/eslint-plugin": "^5.0.0",
|
|
44
45
|
"@typescript-eslint/parser": "^5.0.0",
|
|
45
46
|
"eslint": "^8.0.1",
|
|
46
|
-
"homebridge": "^1.
|
|
47
|
-
"mocha": "^9.
|
|
48
|
-
"nodemon": "^
|
|
47
|
+
"homebridge": "^1.7.0",
|
|
48
|
+
"mocha": "^9.2.2",
|
|
49
|
+
"nodemon": "^3.1.0",
|
|
49
50
|
"rimraf": "^3.0.2",
|
|
50
51
|
"ts-node": "^10.3.0",
|
|
51
52
|
"typescript": "^4.4.4"
|