kukkjanos / ewelink

EWeLink Smart Home API Methods
27 stars 12 forks source link

Fixed these apis #4

Open DamianoMazzara opened 4 years ago

DamianoMazzara commented 4 years ago

These apis failed to work a lot of times before working fine. I had to refresh the page 3-6 times before making it work. I added do-while in getDevice to loop the process untill sonoff does not accept the connection. Another fix: when you login with the apis, it creates a cache file, if you use another session of ewelink (from your smartphone, another server with apis, etc) your apis will not work more, because ewelink only supports one session for time. So if you want to force the re-connection you have to ignore cache when you receive the error (so re-make the connection to your account). Write me in private chat for working apis or if you need help.