-
Notifications
You must be signed in to change notification settings - Fork 108
Open
Description
I realized that the getDevices() function is only returning 10 devices.
Is there any parameter that should be added in order to return all devices instead?
const getEwelinkConnection = () => {
const connection = new ewelink({
email: EWELINK_EMAIL,
password: EWELINK_PASSWORD,
region: EWELINK_REGION,
APP_ID: EWELINK_APP_ID,
APP_SECRET: EWELINK_APP_SECRET
});
return connection;
}
const getEwelinkDevices = async () => {
const connection = getEwelinkConnection();
try {
const devices = await connection.getDevices();
return devices;
} catch (error) {
console.error('Error getting devices:', error);
throw error;
}
}
getEwelinkDevices()
.then((devices) => {
console.log(devices.length); // this is returning 10
})
.catch((error) => {
console.error('Error fetching the device:', error);
});
Metadata
Metadata
Assignees
Labels
No labels