homebridge-tauron-elicznik 0.0.2-beta7 → 0.0.2-beta8

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 (2) hide show
  1. package/index.js +8 -1
  2. package/package.json +1 -1
package/index.js CHANGED
@@ -137,12 +137,19 @@ class eLicznikDevice {
137
137
  fsPromises.mkdir(prefDir);
138
138
  }
139
139
 
140
+ const data = qs.stringify({
141
+ 'username': this.user,
142
+ 'password': this.password,
143
+ 'service': CHARTS_URL
144
+ });
145
+
140
146
  this.axiosInstance = axios.create({
141
147
  method: 'POST',
142
148
  baseURL: LOGIN_URL,
143
149
  headers: {
144
150
  'content-type': 'application/x-www-form-urlencoded'
145
151
  },
152
+ data: data,
146
153
  timeout: 5000,
147
154
  });
148
155
 
@@ -189,7 +196,7 @@ class eLicznikDevice {
189
196
  };
190
197
 
191
198
  const CHART_DATA_URL = 'https://elicznik.tauron-dystrybucja.pl/index/charts?dane[chartYear]=2020&dane[paramType]=year&dane[smartNr]=' + this.meterId + '&dane[checkOZE]=on';
192
-
199
+
193
200
  const options = qs.stringify({
194
201
  'username': this.user,
195
202
  'password': this.password,
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-beta7",
4
+ "version": "0.0.2-beta8",
5
5
  "description": "Homebridge plugin (https://github.com/homebridge/homebridge) to read data from Tauron eLicznik.",
6
6
  "license": "MIT",
7
7
  "author": "grzegorz914",