skydiver / ewelink-api

eWeLink API for JavaScript
https://www.npmjs.com/package/ewelink-api
MIT License
264 stars 108 forks source link

Cannot retrieve power usage #166

Closed whizyrel closed 2 years ago

whizyrel commented 2 years ago
await connection.getDevicePowerUsage('<device id>');

Throws an error for connections via the combination of api key and access token and the combination of email and password too. Please find screenshot attached for behavior. Screenshot from 2021-10-17 12-49-20

whizyrel commented 2 years ago

Figured what the issue was. In the long term can we use typescript or include types? So, I used the value of _id for deviceid instead of deviceid from the list of devices