Skip to content

Commit

Permalink
Update to be compatible with lumen 1.1.0 (async AppDataManager)
Browse files Browse the repository at this point in the history
  • Loading branch information
Elanis committed May 18, 2023
1 parent bbe8309 commit 8131e45
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions main.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ console.log(config);
await new Promise((resolve, reject) => {
// Yeaaap, this is ugly, but I tried to rewrite python module as JS Code, and failed, so, let's get lazy
const pythonProcess = child_process.spawn('python', [__dirname + '/getData.py', ip, username, password, start.getTime() / 1000, end.getTime() / 1000]);
pythonProcess.stdout.on('data', (data) => {
pythonProcess.stdout.on('data', async(data) => {
//console.log(data.toString());

const results = data.toString().replaceAll('\'', '"').replace('\r', '').split('\n');
Expand Down Expand Up @@ -66,7 +66,7 @@ console.log(config);

//console.log(reformattedData);

AppDataManager.saveObject(
await AppDataManager.saveObject(
'power-tplink-tapo-p110',
`${ip}--${Date.now()}`,
reformattedData);
Expand Down

0 comments on commit 8131e45

Please sign in to comment.