This PR solves the problem of the software crashing or hanging when the list of lights goes out of sync with reality.
Now, as the lights in the saved list are constructed, any failures are reported, with a suggestion to re-run light discovery. The issue of hanging (or other network request failures) is solved somewhat inelegantly by forcing a two-second timeout on all GET requests via a monkeypatch on the requests module.
This PR also delays the construction of the discovered light list until it is needed.
This PR solves the problem of the software crashing or hanging when the list of lights goes out of sync with reality.
Now, as the lights in the saved list are constructed, any failures are reported, with a suggestion to re-run light discovery. The issue of hanging (or other network request failures) is solved somewhat inelegantly by forcing a two-second timeout on all GET requests via a monkeypatch on the
requests
module.This PR also delays the construction of the discovered light list until it is needed.
Closes #15.