myenergi-api 2.8.0 → 2.9.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/dist/src/MyEnergi.d.ts
CHANGED
|
@@ -17,6 +17,7 @@ export declare class MyEnergi {
|
|
|
17
17
|
setZappiBoostMode(serialNo: string, boostMode: ZappiBoostMode, kwh?: number, completeTime?: string): Promise<any>;
|
|
18
18
|
setZappiGreenLevel(serialNo: string, percentage: number): Promise<any>;
|
|
19
19
|
setZappiPhaseSetting(serialNo: string, phaseSetting: ZappiPhaseSetting): Promise<any>;
|
|
20
|
+
unlockZappi(serialNo: string): Promise<any>;
|
|
20
21
|
getDayHourHistory(id: string, year: number, month: number, day: number, startHour?: number, noHours?: number): Promise<HistoryRecord[]>;
|
|
21
22
|
getStatusLibbiAll(): Promise<Libbi[]>;
|
|
22
23
|
getStatusLibbi(serialNumber: string): Promise<Libbi | null>;
|
package/dist/src/MyEnergi.js
CHANGED
|
@@ -29,6 +29,7 @@ class MyEnergi {
|
|
|
29
29
|
zappi_min_green_url: "/cgi-set-min-green-Z",
|
|
30
30
|
zappi_phase_setting_url: "/cgi-zappi-phase-setting-Z",
|
|
31
31
|
zappi_boost_time_url: "/cgi-boost-time-Z",
|
|
32
|
+
zappi_lock_url: "/cgi-jlock-",
|
|
32
33
|
eddi_mode_url: "/cgi-eddi-mode-E",
|
|
33
34
|
eddi_boost_url: "/cgi-eddi-boost-E",
|
|
34
35
|
get_app_key_url: "/cgi-get-app-key",
|
|
@@ -145,6 +146,19 @@ class MyEnergi {
|
|
|
145
146
|
}
|
|
146
147
|
});
|
|
147
148
|
}
|
|
149
|
+
unlockZappi(serialNo) {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function* () {
|
|
151
|
+
try {
|
|
152
|
+
const url = new URL(`${this._config.zappi_lock_url}${serialNo}-00000010`, this._config.base_url);
|
|
153
|
+
const data = yield this._digest.get(url);
|
|
154
|
+
const jsonData = JSON.parse(data);
|
|
155
|
+
return jsonData;
|
|
156
|
+
}
|
|
157
|
+
catch (error) {
|
|
158
|
+
return {};
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
}
|
|
148
162
|
getDayHourHistory(id, year, month, day, startHour, noHours) {
|
|
149
163
|
return __awaiter(this, void 0, void 0, function* () {
|
|
150
164
|
try {
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
export declare enum EddiBoost {
|
|
2
2
|
CancelHeater1 = "1-1",
|
|
3
|
-
CancelHeater2 = "1-
|
|
3
|
+
CancelHeater2 = "1-2",
|
|
4
4
|
CancelRelay1 = "1-11",
|
|
5
5
|
CancelRelay2 = "1-12",
|
|
6
6
|
ManualHeater1 = "10-1",
|
|
7
|
-
ManualHeater2 = "10-
|
|
7
|
+
ManualHeater2 = "10-2",
|
|
8
8
|
ManualRelay1 = "10-11",
|
|
9
9
|
ManualRelay2 = "10-12"
|
|
10
10
|
}
|
package/dist/src/models/Types.js
CHANGED
|
@@ -4,11 +4,11 @@ exports.LibbiMode = exports.ZappiPhaseSetting = exports.ZappiStatus = exports.Za
|
|
|
4
4
|
var EddiBoost;
|
|
5
5
|
(function (EddiBoost) {
|
|
6
6
|
EddiBoost["CancelHeater1"] = "1-1";
|
|
7
|
-
EddiBoost["CancelHeater2"] = "1-
|
|
7
|
+
EddiBoost["CancelHeater2"] = "1-2";
|
|
8
8
|
EddiBoost["CancelRelay1"] = "1-11";
|
|
9
9
|
EddiBoost["CancelRelay2"] = "1-12";
|
|
10
10
|
EddiBoost["ManualHeater1"] = "10-1";
|
|
11
|
-
EddiBoost["ManualHeater2"] = "10-
|
|
11
|
+
EddiBoost["ManualHeater2"] = "10-2";
|
|
12
12
|
EddiBoost["ManualRelay1"] = "10-11";
|
|
13
13
|
EddiBoost["ManualRelay2"] = "10-12";
|
|
14
14
|
})(EddiBoost = exports.EddiBoost || (exports.EddiBoost = {}));
|
package/package.json
CHANGED