ewelink-reboot
v1.0.8
Published
Cut and restore force if a device goes offline
Downloads
1
Readme
ewelink-reboot
Reboot a device using eWeLink account when a device doesn't ping anymore.
Installing
npm install -g ewelink-reboot
Using
user@hostname:~/$ ewelink-reboot --help
Wed Aug 14 2019 15:53:30 GMT-0300 (-03): Alert: It is not safe to set passwords on environment variables.
Usage: ewelink-reboot [options] <addr> <device>
Options:
-V, --version output the version number
-e --email <email> Email address to eWeLink.
-p --password <password> Your password to eWeLink.
-r --region <region> The API region you use, valid ones are 'us', 'eu' and 'cn'.
-l, --loop <loop> Run the program in loop, checking.
-w, --wait <wait> Wait to check again (Default: 300).
-h, --help output usage information
API
const ewelinkReboot = require('ewelink-reboot');
ewelinkReboot({
email: '[email protected]',
password: 'your-password',
addr: 'localhost',
device: 'name-or-deviceid'
}).then(isRebooted => console.log(isRebooted))