Closed undjike closed 3 years ago
By creating new instance of ewelink like this you can have all your required fields necessary to perform other API calls.
const sonoff = new ewelink({ email: conf.email, password: conf.password, region: conf.region, });
you will get:
{ apiKey:null APP_ID:'xxxxxxx' APP_SECRET:'xxxxxxxx' arpTable:null at:null devicesCache:null email:xxxxxx@gmail.com' password:'xxxx@pass' phoneNumber:null region:'as' }
Okay, thanks. Got it. Just by console logging the instanciation.
How do I get my APP_SECRET ?
I'm using a non-SONNOFF device and it doesn't appear with
getDevices
method. I read other issues about this and a fix was to add the APP_ID and the APP_SECRET when intanciating the Ewelink connection. But, I don't know where to find my APP_SECRET. I got the APP_ID executinggetCredentials
method but no APP_SECRET.