openmotics / plugins

Repository containing the gateway plugins.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Astro stop working if api.sunrise-sunset.org is unreachable

alepez opened this issue · comments

If internet connection isn't available at the time Astro request to api.sunrise-sunset.org the time of sunrise/sunset etc..., the plugin stop working. Scheduled actions are not called.

Possible solution is to cache the sunrise/sunset time points and use the old one when connection is available. Using the time points of the day before is not perfect, but acceptable: the error is of some seconds. Not working at all is really bad.