Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

FR: Cache device list retrieved from Dyson account at library startup #23

Open
crowbarz opened this issue Aug 6, 2020 · 1 comment
Open
Assignees

Comments

@crowbarz
Copy link

crowbarz commented Aug 6, 2020

As Dyson's somewhat unreliable API servers are queried whenever this library is loaded (eg. at Home Assistant startup), their availability is effectively on the critical path of a successful server restart. (They aren't working for me right now: Cloudflare says the backend servers are currently unavailable. I am going to try again later but it got me thinking about how to ameliorate this situation.)

#14 (comment) mentioned that a list of devices is downloaded via the Dyson API, then the library subsequently connects to devices locally via MQTT. Would it be possible to cache/save that list of devices locally, to be used when the Dyson API is not available? It would greatly reduce the need for Dyson's API servers to be available at library startup.

@etheralm
Copy link
Owner

Hey, thanks for the idea.

I've been thinking about adding some sort of cache for the dyson API calls for quite some time now. It should be trivial to add and will prevent a lot of the issues. I'll have a go at it when I can find some free time.

I'll keep this ticket open to track the progress.

@etheralm etheralm self-assigned this Aug 11, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants