-
• #2
Wow, that's very cool. So do you have to turn the ATX power supply on before turning on WiFi, or does it provide enough standby power that you can connect to the internet even without turning the main part of it on?
-
• #3
5v standby power is sufficient to run the ESP8266 via buck converter.
-
• #4
New code updated
https://github.com/wga22/esp8266/blob/master/espurino/landscape.jsCode for sleeping until the sunset, based upon the wunderground API:
if(nHoursTilSunset > 0) { //add 15 minutes from sunset var nMinutesTilSS = weather.moon_phase.sunset.minute - weather.moon_phase.current_time.minute + 15; var nSleepTime = (nHoursTilSunset*nMilisPerHour) + (nMinutesTilSS*60000); setMode("sleeping until sunset", "Turn on lights", nMilisForLights); setTimeout(turnOnLights, nSleepTime); }
-
• #5
Code is updated.
-
• #6
Nice, thanks!
-
• #7
I've been happily building these, but running on Sonoff now. I really like the convenience of having some house lights that follow the sunset. Probably over-engineered, but that is where the fun comes in!
Let me know if you'd like to buy one, $10 plus shipping.
1 Attachment
This project is to build a "modern" landscape light timer from an ATX power supply.
The purpose/features that make this "better" than common setup using a wall timer are:
Software design:
The application is written to pull sunset info from wunderground for my location. It then determines how long until sunset, and sleeps. It then runs for predetermined number of hours, turns off, and repeats again the following day.
A webserver is also run on port 80 that allows review of system status, turning on the lights, etc.
The latest version of the software can be found at
https://github.com/wga22/esp8266/blob/master/espurino/landscape.js
Hardware design:
Simple. The ESP8266 is running off of the 5V standby line (via buck converter down to 3.3). The "green" signal line, on the ATX, is pulled to ground via "D4" digital line on the ESP8266, across a 10k resistor to turn on the ATX supply.
Pardon the "in progress" look. Still doing testing.