Eight years ago I bought two light switches to control my front porch and back porch lights, automatically turning them on at sunset and off at a certain time or at sunrise. These worked well for the most part, but didn’t track sunrise/sunset perfectly (you picked one of four zones in the US) and the clock lost a few minutes per month, so I would have to re-enter the current time and the time of sunrise and sunset a few times a year. They had a built-in battery backup which would usually keep the settings during a brief power outage, but not always. Lately, they have stopped saving settings during any power outages, so I think those batteries died. Taking one of them apart, the batteries are soldered in place and can’t be easily replaced. The switches still work, I just have to reprogram them every time the power goes out.
Last year I bought some smart plugs which plug into the wall and then you can plug a lamp into them like a timer, but these operate via the home wifi network and an app on my phone. You can set up schedules and/or I can say “Hey Google, turn on the living room lamp,” and the lamp comes on. If the power goes out, the plugs just re-boot and are ready to receive their next command to turn on or off. The clock is always exactly on time and the location is set to my neighborhood, so the sunrise and sunset times are right on the money. In fact for the indoor lamps I have them come on 20 minutes before sunset since it starts getting dark in the house earlier than outside. The only bad thing is if it is overcast, it would be nice if the lights came on a little early, which actually I think I could do because you can set weather-related events. These are great. I ended up buying several, then I bought some more from a different company (Kasa), which works the same except they use a different app. Their app doesn’t let you do as much unless you buy an upgrade, but I was able to do what I want by linking the Kasa app to Google Home and having Google Home do everything I want (in this case more than two programs).
When I bought the plugs, I also saw they sold light switches, but they were pretty expensive. The plugs were only about $5 each, but the switches were something like $25, so I never bought any. But, frustrated with frequent power outages, I looked again and found some smart switches for about $15 each. Not sure why they are so much more expensive. The cheapest switches were by a third company called Gosund. I ordered them from Amazon yesterday and they arrived today. I installed the first in about 30 minutes and was able to control it using the Gosund app and then link the Gosund app to Google Home so that Google could also control it. The installation for the second switch was even faster. It was kind of neat to do some basic wiring which I haven’t needed to do in a long time. I was able to do voice control, remote control, and today at sunset the lights came on like they were supposed to. Yay!
The only problem I had was the Gosund app would not let me tell it where my house is, which it needs to know to determine when sunrise and sunset happen. In the “Home Location” screen, it just showed a blank Google map. I was still able to get the sunset timer to work, but I looked up the problem and eventually found that Gosund is compatible with the first app I started using with smart plugs, Smart Life. So I deleted the switches in Gosund’s app, deleted my account, and set those two switches up again using Smart Life. I looked to see if I could move Kasa to Smart Life as well, but apparently not (simple lesson: don’t buy Kasa).
Now the only remaining problem is that sometimes the timers miss a command. I think if the wifi signal is weak or something, maybe they just miss it. It doesn’t happen that often, and usually only in the back room (two lamps, a poster, and the back porch light), furthest from the router. It doesn’t happen that often. I guess the way it works is they have a server somewhere that keeps up with everyone’s gadgets and then sends a command to the switch. I’m not sure what would happen if the company running that server stopped supporting the thousands or millions of devices it controls. It might be possible for a third party server to do the same thing if it new the IP address of the switches and knew the right security settings for the switch.