Close

First version of software is now complete

A project log for Web-connected automatic sunset lamp

A web-connected ESP8266 controller to turn on a lamp at sunset. Useful if the wiring is far from a location where daylight may be sensed.

bredmanbredman 06/15/2017 at 14:250 Comments

The first version of the software is now complete and has been tested.

The software has 3 main functions...

The most important aspect of the software is that it should continue to work even if internet connectivity is lost. Every 10 minutes, the times are refreshed from the internet. Even if this fails, the internal clock will continue to run, and the cycle will be repeated every 24 hours until the refresh from the internet is successful.

After a power failure, the program will wait for 30 seconds (init.lua) to allow internet conntivity to be restored. The the main program (suntracker.lua) is launched. The lamp defaults to ON, and will remain ON until a valid shedule has been downloaded from the internet.

Next step is to tackle the hardware...

Discussions