ssut / wideq-js

A Node.JS(TypeScript) port of wideq, a reverse-engineered client for the LG SmartThinQ API
https://ssut.github.io/wideq-js/
MIT License
17 stars 7 forks source link

Q: auto-refresh? #8

Open gvdhoven opened 4 years ago

gvdhoven commented 4 years ago

My wideq version stops working every now and then, restarting the app resolves this so i assume it is something with expiring tokens; does your version implement something like auto-refreshing if the monitor task fails?

I expect it does; looking at this: https://github.com/ssut/wideq-js/blob/master/lib/core/monitor.ts#L29

But it would be cool if you could confirm.

ncovercash commented 4 years ago

It looks like it was throwing some other kind of exception – don't remember what – however, adding --unhandled-rejections=strict caused the whole script to start over. Crude, but it worked enough for me