bergsm / SunLights

Program to adjust TP-Link smart bulbs with the ambient sunlight
GNU General Public License v3.0
0 stars 0 forks source link

Resolves #17 #18

Closed bergsm closed 5 years ago

bergsm commented 5 years ago

This commit resolves #17. To fix the timing issue, a more accurate timing system was implemented, and delays in running functions is taken into account when calculating sleep periods. With this new code, the script runs on time within a tolerance of ~15 seconds as of testing.

The new code was tested in a controlled shortened test, and the timing was accurate for both when the bulbs are responsive and when they are not. Further tests in deployed environment will take place over the next few days.

I also cleaned up getSun.py and added code to set default values for the bulbs if for some reason values.target gets deleted.