I've got a Raspberry Pi and some Christmas lights. I would like to use the Raspberry Pi to control the Christmas lights by switching them on and off with a Python script. The programming aspect of this project is easy enough - my concern is with wiring the lights.

The lights in question are LED and require 120V AC. At first, I thought this might be an easy solution to the problem. Unfortunately, the website states the following:

"Life expectancy: 100,000 operations @ 15 amps, 125vac, resistive"

As I understand it, this means that I can only expect to turn the lights off and on about 100,000 times before wearing out the switch. I will be turning the lights on and off at high frequencies (perhaps up to 10 Hz), so the 100,000 limit will be quickly reached. This is not acceptable for a $25 device (especially if I purchase one for each string of lights).

Do other similar relays exist without this limitation?

  • Hello and welcome to RPi.SE. If you want to do switching with high numbers of cycles you might want to look into "solid state relais" that come without mechanical parts that wear off. See electronics.stackexchange.com for better help though. On a side note: you're going to switch the christmas lights at 10 Hz? Hope you're not my neighbor ;)
    – Ghanima
    Dec 1, 2014 at 22:57
  • @Ghanima: the goal is to switch the lights in time to music. 10 Hz is a maximum and certainly not something I'll be running 24/7. Dec 1, 2014 at 22:59

3 Answers 3


A solid state relay (see Wikipedia) with appropriate power ratings should do the trick. They provide increased lifetime and do not wear off as there are no moving parts. Selection according to your needs (power, voltage, current) should be pretty much straight forward. Switching time should be no issue for the mentioned application and neither should the load (the lights) be a problem. More to that on the flip side: electronics.SE

Be sure however to comply with appropriate safety regulations concerning the 120V AC! This is a serios life risk.


You do not understand the spec which is "100,000 operations @ 15 amps". If you are switching 1.8kW of lights you may have a problem.

The contact life is governed by erosion when opening the load. They would last much longer at any reasonable current.

A solid state relay would be a better solution, in any event.


If the relays are rated 100,000 operations at 15A 125VAC then I wouldn't worry about it.

A string of 100 LED lights consumes less than half a watt, which translates to less than 1/200 of an Amp. Even power-guzzling old-fashioned incandescent xmas lights consume only about 10x that. If the relay's lifespan varies linearly with the power (I have no idea), it would give you more than 400 million ops if you use LED bulbs. Even if the real life is only a quarter of that (100 million ops), and you put 4 strings of lights on each relay (25 million ops), you should still be able to run them at 10Hz (36,000 ops/hour) for almost 700 hours. A more realistic average of 2Hz would mean 5x that life.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.