Skip to content

Commit

Permalink
km200
Browse files Browse the repository at this point in the history
  • Loading branch information
tp1de committed Jul 19, 2023
1 parent eae68d7 commit 32094ad
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/km200.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ let km200_server,km200_gatewaypassword,km200_privatepassword,km200_key,km200_aes

// -------- energy recordings parameters ------------------------------------

const root = "recordings.";
let db = "sql.0", database = "iobroker", recordings=false;
let sum_month = 0;
// eslint-disable-next-line no-unused-vars
let r_multi = 1, r_month = true;

// -------------------------------------------------------------------------------------------------------------------------------------------------------------------
Expand Down Expand Up @@ -331,7 +331,8 @@ async function km200_get(url) {return new Promise(function(resolve,reject) {
if (response.statusCode !== 200) {
return reject(error+response.statusCode);}
else {
try {var data= km200_decrypt(body);}
let data;
try {data= km200_decrypt(body);}
catch(error) {data="";}
resolve(data);}
});
Expand Down

0 comments on commit 32094ad

Please sign in to comment.