skydiver / ewelink-api

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

Get Voltage and current on POWR2 device #218

Open nowsmart opened 1 year ago

nowsmart commented 1 year ago

There is no method to get device wattage, Voltage and current.

baugp commented 9 months ago
const connection = new ewelink({
    email: '',
    password: '',
    region: '',
});

const device = await connection.getDevice(deviceId);
if (device.online) {
    console.log(`Power: ${device.params.power}W, Voltage: ${device.params.voltage}V, Current: ${device.params.current}A`)
}

You also need to "activate" the measurement by either

tech9492 commented 8 months ago

Hi @baugp

Installing your fork npm install https://github.com/baugp/ewelink-api would enable me to retrieve Power, Voltage & Current from POW ELITE? Or it requires other modifications as well?

Thank you.