homebridge-solaxcloud-api 2.3.0 → 2.3.2
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 +10 -0
- package/README.md +195 -194
- package/config.schema.json +1 -1
- package/images/logos/homebridge-wordmark-logo-horizontal.png +0 -0
- package/images/logos/qcells.png +0 -0
- package/images/logos/solax-power.png +0 -0
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -2,6 +2,16 @@
|
|
|
2
2
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
|
|
5
|
+
## [v2.3.2] - 2024-07-04
|
|
6
|
+
### Fixed
|
|
7
|
+
* Updated README with fixed image logos.
|
|
8
|
+
### Changes
|
|
9
|
+
* Bumped dependencies.
|
|
10
|
+
|
|
11
|
+
## [v2.3.1] - 2024-04-08
|
|
12
|
+
### Fixed
|
|
13
|
+
* Changed max TokenID size to 24 ([#08](https://github.com/AllMightySauron/homebride-solaxcloud-api/issues/8)).
|
|
14
|
+
|
|
5
15
|
## [v2.3.0] - 2024-03-14
|
|
6
16
|
### Changes
|
|
7
17
|
* Added support for inverters from QCells through the QCells cloud API.
|
package/README.md
CHANGED
|
@@ -1,194 +1,195 @@
|
|
|
1
|
-
|
|
2
|
-
<table cellspacing="0" cellpadding="0">
|
|
3
|
-
<tr>
|
|
4
|
-
<td align="center"><img src="
|
|
5
|
-
<td align="center"><img src="
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
- **
|
|
22
|
-
- **
|
|
23
|
-
- **To
|
|
24
|
-
- **
|
|
25
|
-
- **
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
- **
|
|
31
|
-
- **Battery** (
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
- **
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
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
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
<td width="50%">
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
<td><img src="images/automation/
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
<td>
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
<td><img src="images/automation/
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
<td>
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
<td><img src="images/automation/
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
<td>
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
<td><img src="images/automation/
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
<td>
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
<td><img src="images/automation/
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
<td>
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
<td><img src="images/automation/
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
<td>
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
<td><img src="images/automation/
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
<td>
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
<td><img src="images/automation/
|
|
181
|
-
|
|
182
|
-
</
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
- [X]
|
|
190
|
-
- [
|
|
191
|
-
- [x]
|
|
192
|
-
- [x]
|
|
193
|
-
- [x] Support for multiple
|
|
194
|
-
- [x]
|
|
1
|
+
|
|
2
|
+
<table cellspacing="0" cellpadding="0">
|
|
3
|
+
<tr>
|
|
4
|
+
<td align="center"><img src="images/logos/homebridge-wordmark-logo-horizontal.png" width="200"></td>
|
|
5
|
+
<td align="center"><img src="images/logos/solax-power.png" width="150"></td>
|
|
6
|
+
<td align="center"><img src="images/logos/qcells.png" width="150"></td>
|
|
7
|
+
<tr>
|
|
8
|
+
</table>
|
|
9
|
+
|
|
10
|
+
# Solax Cloud Plugin for Homebridge
|
|
11
|
+
|
|
12
|
+
  [](https://github.com/homebridge/homebridge/wiki/Verified-Plugins)
|
|
13
|
+
|
|
14
|
+
|
|
15
|
+
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** are also supported since cloud requests share a similar approach.
|
|
16
|
+
|
|
17
|
+
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.
|
|
18
|
+
|
|
19
|
+
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:
|
|
20
|
+
|
|
21
|
+
- **PV** (PV outlet with power consumption)
|
|
22
|
+
- **AC** (Inverter AC outlet with power and total energy consumptions)
|
|
23
|
+
- **To Grid** (Inverter to Grid outlet with power consumption)
|
|
24
|
+
- **To House** (Inverter to House outlet with power consumption)
|
|
25
|
+
- **From Grid** (Grid to House outlet with power consumption)
|
|
26
|
+
- **Update** (Motion sensor)
|
|
27
|
+
|
|
28
|
+
Battery information is also provided as Homekit accessories in case there are any batteries installed for any of the configured inverters:
|
|
29
|
+
|
|
30
|
+
- **To Battery** (Outlet with inverter power charging the battery)
|
|
31
|
+
- **From Battery** (Outlet with power drawn from the battery to the inverter)
|
|
32
|
+
- **Battery** (Battery with State of Charge information such as level or charge state)
|
|
33
|
+
|
|
34
|
+
<img src="images/plugin-accessories-home.png" width="50%" height="50%">
|
|
35
|
+
|
|
36
|
+
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.
|
|
37
|
+
|
|
38
|
+
## Required information
|
|
39
|
+
|
|
40
|
+
For this plugin to work, two critical pieces of information are required from Solax/QCells Cloud:
|
|
41
|
+
|
|
42
|
+
- **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.
|
|
43
|
+
- **SN**: Registration No (communication module SN) for each desired inverter.
|
|
44
|
+
|
|
45
|
+
## Installation
|
|
46
|
+
|
|
47
|
+
This plugin is supported under Homebridge. It is highly recommended that you use Homebridge Config UI X to install and configure this plugin.
|
|
48
|
+
|
|
49
|
+
### Manual Installation
|
|
50
|
+
|
|
51
|
+
Install this plugin using: `sudo npm install -g homebridge-solaxcloud-api`.
|
|
52
|
+
Edit `config.json` manually to add your Solax inverters. See below for instructions on that.
|
|
53
|
+
|
|
54
|
+
## Platform configuration
|
|
55
|
+
|
|
56
|
+
Minimal platform configuration is depicted by the example configuration file below:
|
|
57
|
+
|
|
58
|
+
```json
|
|
59
|
+
{
|
|
60
|
+
"platforms": [
|
|
61
|
+
{
|
|
62
|
+
"platform": "SolaxCloudAPI",
|
|
63
|
+
"inverters": [
|
|
64
|
+
{
|
|
65
|
+
"brand": "solax",
|
|
66
|
+
"tokenId": "20200722185111234567890",
|
|
67
|
+
"name": "Solax",
|
|
68
|
+
"sn": "ABCDEFGHIJ"
|
|
69
|
+
}
|
|
70
|
+
],
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
Configuration parameters are described on the table below:
|
|
76
|
+
|
|
77
|
+
| **Parameter** | **Type** | **Description** | **Default** | **Mandatory?** |
|
|
78
|
+
| ------------------ | -------- | --------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | -------------:| :------------: |
|
|
79
|
+
| `platform` | string | Platform name (must be SolaxCloudAPI) | - | Y |
|
|
80
|
+
| `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 |
|
|
81
|
+
| `pollingFrequency` | number | Plugin data polling frequency from Solax Cloud (in seconds) | 300 | N |
|
|
82
|
+
| `smoothingMeters` | boolean | Whether to create additional meters by smoothing raw values from Solax Cloud | true | N |
|
|
83
|
+
| `smoothingMethod` | string | Statistical method to use for smoothing raw values from Solax Cloud (simple or exponential moving average - "sma" or "ema") | "sma" | N |
|
|
84
|
+
| `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 |
|
|
85
|
+
|
|
86
|
+
**NOTE:** The `pollingFrequency` parameter defaults to 300 seconds, since Solax/QCells inverters update cloud data every 5 minutes.
|
|
87
|
+
|
|
88
|
+
Configuration through the the use of [Homebridge UI](https://github.com/oznu/homebridge-config-ui-x) plugin is also available and recommended:
|
|
89
|
+
|
|
90
|
+
<img src="images/homebridge-ui.png" width="100%" height="100%">
|
|
91
|
+
|
|
92
|
+
## Non-standard characteristics
|
|
93
|
+
|
|
94
|
+
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.
|
|
95
|
+
|
|
96
|
+
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:
|
|
97
|
+
|
|
98
|
+
<img src="images/plugin-outlet-consumption.png" width="50%" height="50%">
|
|
99
|
+
|
|
100
|
+
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):
|
|
101
|
+
|
|
102
|
+
<img src="images/plugin-accessories-home-pure.png" width="50%" height="50%">
|
|
103
|
+
|
|
104
|
+
# Automation
|
|
105
|
+
|
|
106
|
+
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).
|
|
107
|
+
|
|
108
|
+
<img src="images/plugin-accessories-eve.png" width="50%" height="50%">
|
|
109
|
+
|
|
110
|
+
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.
|
|
111
|
+
|
|
112
|
+
## Automation example
|
|
113
|
+
|
|
114
|
+
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.
|
|
115
|
+
|
|
116
|
+
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):
|
|
117
|
+
|
|
118
|
+
<table cellspacing="0" cellpadding="0">
|
|
119
|
+
<tr>
|
|
120
|
+
<td width="50%">1. Under Automation, select <b>Rules</b></td>
|
|
121
|
+
<td width="50%">2. Click <b>Next</b></td>
|
|
122
|
+
</tr>
|
|
123
|
+
<tr>
|
|
124
|
+
<td><img src="images/automation/automation_1.png"></td>
|
|
125
|
+
<td><img src="images/automation/automation_2.png"></td>
|
|
126
|
+
</tr>
|
|
127
|
+
<tr>
|
|
128
|
+
<td>3. Click <b>Add Trigger</b></td>
|
|
129
|
+
<td>4. Select <b>Motion</b> as trigger type</td>
|
|
130
|
+
</tr>
|
|
131
|
+
<tr>
|
|
132
|
+
<td><img src="images/automation/automation_3.png"></td>
|
|
133
|
+
<td><img src="images/automation/automation_4.png"></td>
|
|
134
|
+
</tr>
|
|
135
|
+
<tr>
|
|
136
|
+
<td>5. Select the Solax <b>Update</b> motion detector and set <b>Motion</b> as trigger</td>
|
|
137
|
+
<td>6. Click <b>Next</b></td>
|
|
138
|
+
</tr>
|
|
139
|
+
<tr>
|
|
140
|
+
<td><img src="images/automation/automation_5.png"></td>
|
|
141
|
+
<td><img src="images/automation/automation_6.png"></td>
|
|
142
|
+
</tr>
|
|
143
|
+
<tr>
|
|
144
|
+
<td>7. Select <b>Add Value Condition</b></td>
|
|
145
|
+
<td>8. Choose <b>Inverter AC Consumption</b> as characteristic and elect <b>>=</b> a desired value</b></td>
|
|
146
|
+
</tr>
|
|
147
|
+
<tr>
|
|
148
|
+
<td><img src="images/automation/automation_7.png"></td>
|
|
149
|
+
<td><img src="images/automation/automation_8.png"></td>
|
|
150
|
+
</tr>
|
|
151
|
+
<tr>
|
|
152
|
+
<td>9. Click <b>Next</b></td>
|
|
153
|
+
<td>10. If no scene exists, click <b>Add Scene</b></td>
|
|
154
|
+
</tr>
|
|
155
|
+
<tr>
|
|
156
|
+
<td><img src="images/automation/automation_9.png"></td>
|
|
157
|
+
<td><img src="images/automation/automation_10.png"></td>
|
|
158
|
+
</tr>
|
|
159
|
+
<tr>
|
|
160
|
+
<td>11. Click <b>Add Actions</b></td>
|
|
161
|
+
<td>12. Select the accessory to be controlled (in this case <b>Garden Pool Outlet</b> will be turned <b>ON</b>)</td>
|
|
162
|
+
</tr>
|
|
163
|
+
<tr>
|
|
164
|
+
<td><img src="images/automation/automation_11.png"></td>
|
|
165
|
+
<td><img src="images/automation/automation_12.png"></td>
|
|
166
|
+
</tr>
|
|
167
|
+
<tr>
|
|
168
|
+
<td>13. Click <b>Next</b></td>
|
|
169
|
+
<td>14. Name your scene and click <b>Done</b></td>
|
|
170
|
+
</tr>
|
|
171
|
+
<tr>
|
|
172
|
+
<td><img src="images/automation/automation_13.png"></td>
|
|
173
|
+
<td><img src="images/automation/automation_14.png"></td>
|
|
174
|
+
</tr>
|
|
175
|
+
<tr>
|
|
176
|
+
<td>15. Click <b>Next</b></td>
|
|
177
|
+
<td>16. Name your rule and click <b>Done</b></td>
|
|
178
|
+
</tr>
|
|
179
|
+
<tr>
|
|
180
|
+
<td><img src="images/automation/automation_15.png"></td>
|
|
181
|
+
<td><img src="images/automation/automation_16.png"></td>
|
|
182
|
+
</tr>
|
|
183
|
+
</table>
|
|
184
|
+
|
|
185
|
+
# TO DO
|
|
186
|
+
|
|
187
|
+
Next planned plugin releases should include:
|
|
188
|
+
|
|
189
|
+
- [X] **Inverter AC** to include Total Yield Energy
|
|
190
|
+
- [X] Consumption history through the [fakegato-history](https://github.com/simont77/fakegato-history) module
|
|
191
|
+
- [x] Enable support for "pure" Home App accessories (power meters will be exposed as Ambient Light sensors)
|
|
192
|
+
- [x] Add "smooth" accessories for power meters (compensating for sporadic scenarios like cloud a passing)
|
|
193
|
+
- [x] Support for multiple inverters
|
|
194
|
+
- [x] Support for multiple brands (between Solax and QCells)
|
|
195
|
+
- [x] Accessories for battery state and consumptions
|
package/config.schema.json
CHANGED
|
@@ -31,7 +31,7 @@
|
|
|
31
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
32
|
"default": "20200722185111234567890",
|
|
33
33
|
"minLength": 23,
|
|
34
|
-
"maxLength":
|
|
34
|
+
"maxLength": 24
|
|
35
35
|
},
|
|
36
36
|
"name": {
|
|
37
37
|
"title": "Inverter name (unique)",
|
|
Binary file
|
|
Binary file
|
|
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.3.
|
|
5
|
+
"version": "2.3.2",
|
|
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": {
|