Auto-timed Fish Tank Light

My roommates and I have a fish.

This is our fish.
Sidon is our fish.

We’ve managed to keep him alive and more or less healthy for the past two years, but one thing we’re not super reliable about is turning on and off the tank light, which (I’m told) is important for fish circadian rhythms or something. (I’m not a biologist; ask the roommates!)

To solve this, I used an ESP8266 to automatically turn on the lights in the morning and turn them off in the evening. Because the ESP doesn’t have a built-in RTC, I sync every ten minutes with the NIST NTP servers (which likely makes this the most accurate timekeeping device in the house other than cell phones!) and fade the lights off at 7am and off at 9pm.


More photos:

ESP8266 Light Switch: A Few Revisions



Web-controlled lights: Who doesn’t need ’em? I’d had my eye on something of the sort when I made the decision that none of the prebuilts available met my needs…I was going to have to build my own.

Specifically, I wanted a couple of particularly hard-to-find features:

  • I wanted these to be controllable via a well-documented and easy-to-use API (preferably something fairly REST-compliant).
  • I wanted something reasonably unlikely to die when I needed it to work (and I wanted to be able to fix it when it inevitably did).
  • I wanted to be able to securely share access with a handful of people, but not leave it wide-open for the internet to abuse.
  • I wanted to control not only the standard switched 120v overhead light but also some custom LED RGB lighting.

Continue reading ESP8266 Light Switch: A Few Revisions