homebridge-tauron-elicznik 0.0.2-beta74 → 0.0.2-beta78
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/index.js +2 -2
- package/package.json +1 -1
- package/src/tauronAuth.js +4 -3
package/index.js
CHANGED
@@ -140,7 +140,6 @@ class eLicznikDevice {
|
|
140
140
|
service: SERVICE_URL
|
141
141
|
};
|
142
142
|
|
143
|
-
|
144
143
|
//auth
|
145
144
|
this.tauronAuth = new axiosTauronAuth({
|
146
145
|
data: data
|
@@ -195,7 +194,8 @@ class eLicznikDevice {
|
|
195
194
|
|
196
195
|
const response = await this.tauronAuth.request(url);
|
197
196
|
|
198
|
-
this.log('11112222',
|
197
|
+
this.log('11112222', this.tauronAuth.request());
|
198
|
+
this.log('33333344', response.data);
|
199
199
|
const energyImport = 0;
|
200
200
|
const energyExport = 0;
|
201
201
|
if (this.tauroneLicznikEnergyService) {
|
package/package.json
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
{
|
2
2
|
"displayName": "Tauron eLicznik",
|
3
3
|
"name": "homebridge-tauron-elicznik",
|
4
|
-
"version": "0.0.2-
|
4
|
+
"version": "0.0.2-beta78",
|
5
5
|
"description": "Homebridge plugin (https://github.com/homebridge/homebridge) to read data from Tauron eLicznik.",
|
6
6
|
"license": "MIT",
|
7
7
|
"author": "grzegorz914",
|
package/src/tauronAuth.js
CHANGED
@@ -10,6 +10,7 @@ class axiosTauronAuth {
|
|
10
10
|
}) {
|
11
11
|
this.username = data.username;
|
12
12
|
this.password = data.password;
|
13
|
+
this.service = data.service;
|
13
14
|
}
|
14
15
|
|
15
16
|
async request(returnUrl) {
|
@@ -17,16 +18,16 @@ class axiosTauronAuth {
|
|
17
18
|
const data = {
|
18
19
|
username: this.username,
|
19
20
|
password: this.password,
|
20
|
-
service:
|
21
|
+
service: this.service
|
21
22
|
};
|
22
23
|
|
23
24
|
const options = {
|
24
25
|
data: data
|
25
26
|
};
|
26
27
|
const response = await axios.post(LOGIN_URL, options);
|
27
|
-
|
28
|
+
const returnUrl = response.data;
|
28
29
|
|
29
|
-
return
|
30
|
+
return returnUrl;
|
30
31
|
} catch (err) {
|
31
32
|
return err
|
32
33
|
}
|