Sunday, June 6, 2021

Smart Switches

Bored During the Pandemic

So I decided to spend some of my "shelter-in-place" time upgrading the old light switches in my house to "smart switches".  I document some of my adventures here in hopes that it will be useful for someone else trying to do the same thing.

Smart Switches

I wanted to buy a switch that was compatible with Apple HomeKit (Siri) and Amazon Alexa.  I have just decided that's what I'm going to use for home automation.  I want to be able to say "Alexa, turn on the kitchen lights".  Your mileage may vary depending on what kind of setup you want.  I bought my Meross switches off Amazon.  This blog post will be largely centered around these switches, and like I said earlier, your mileage may vary depending on what kind of switches you get.

Turn Off the Breaker

The most important part of changing a light switch is making sure you've turned off the power to the light switch before doing anything with it.  You can find this in the breaker panel.  There is one inside the house (mine is in the laundry room) and one outside the house.  The one on the outside of the house has a breaker in it called "sub-panel" which refers to the breaker panel inside the house (i.e. the main breaker panel is outside).

When the breaker switch is all the way to the middle, the switch is ON, if it's away from the middle, the switch is OFF.  I have started labelling the switches because sometimes "Bedroom #5" is not always obvious which bedroom it refers to :-).


The breaker switches, up close, look like this:

The top and bottom switches in the picture are "ON" (i.e. towards the middle), and the switch in the middle is "OFF".  If you go to turn the switch from OFF to ON and it bounces back to the middle, you probably have a short somewhere (like 99.9% chance).  I went on a whole adventure where I thought the breaker was bad, and I'll document that later if I have time, but the most likely scenario when the switch won't turn all the way on is that you've got two wires connected somewhere that shouldn't be (i.e. you have a short).

You should always verify that the power to your switch is off.  You can do this in two ways (and my paranoid self always does both ways).  The first way is you just try flipping the switch.  If it works, then the correct breaker is off.  If it doesn't, then you've got the wrong breaker.  The second way is to check with a volt-detector thingy (official name :-)).  You can get these off Amazon for pretty cheap.  You basically turn it on and put it near a wire - if it lights up, it's "hot", if not, it's not.




Like I said earlier, I usually check both ways, I'm just paranoid in that way.  Also, if you're wearing an Apple Watch, I would suggest you take it off before working with electricity.  It can be quite startling if you get haptic feedback in the middle of being around wires with electricity! :-) :-). Also, get used to going back and forth to the breaker panel and toggling the breaker.  If it's up a flight of stairs, just think of it like going to the gym and running the stair climber for a while. :-)

Single Pole Switches

The easiest light switch to change is the single pole switch.  This is one switch controls one light.  First, turn off the breaker to the switch.  Then remove the cover and remove the switch.  When you pull the old switch out, there can be multiple wires to it.  I'll document the configurations I have seen.

In the first configuration, there is one "ground" wire (the ground wire is either "green" or bare).  In the switch shown below, there are two black wires.  I really wish every wire had a unique color, but it just doesn't seem to work out that way.  The trick is to know which black wire is which.  One is Lin (which stands for Load-in), and the other is Lout (which stands for Load-out).  You can find out which wire is which by turning on the power to the switch (at the breaker) and turning off the switch at the switch.  Then using the voltage-detector against each black wire.  The one that's "hot" is the Lin wire -- there are stickers in most smart switches that will help you identify the wires - you don't have to use all of them, but I use enough of them to disambiguate which wire is which.


Once you've identified the wires on the legacy switch, you can just match them up to the smart switch and connect them.  In my smart switch, smart switch green wires goes to old switch bare ground wire, smart switch Lin goes to old switch Lin (black), smart switch Lout goes to old switch Lout (the other black wire) and the N (neutral wire) goes to the white wire in the box.  So this is kinda interesting.  There are four wires on the smart switch, and only three wires on the old switch.  The white wire connects to wires that are capped off inside the junction box.  You'll have to dig it out and unscrew the cap to get at it and screw in the smart switch white wire to it.


When you're done wiring everything up, it should look like this:

I usually test the switch before shoving it back into the junction box, because getting all the wires with the caps on them back into the junction box is a chore, and not something you want to be doing multiple times.  Once I verify the smart switch is working, I shove all the wires back in the box and screw everything back in place except the face plate.  Like I said, getting all the wires and caps back into the junction box is a chore.  I start with the thickest bunches of wires first and put them as far back as I can, and then finagle the other wires back into the box.  When you're done it should look something like this (not sure why the picture is titled slightly, but it's actually level):




Don't forget to clean up your mess :-).


Three Way Switches

Three way switches are when two light switches control the same light.  The way this "should" work is that you should be able to toggle the state of the light (on or off) at either switch.  Sometimes, when people screw this up (even lazy electricians do this from time to time), one light switch has to be "on" for the other light switch to work.  I've had this in my house, and it was absolutely maddening.  You want to be able to toggle the light from either switch -- i.e. no matter what position the "other" light switch is in.

Here is a picture my brother drew for me to help understand how three way light switches (that can toggle from either switch) works.


Ignore the neutral wire for a moment and convince yourself that the way the two switches work in the picture that you can toggle the state of the light from either switch.  Try to complete the path (where current flows) as you toggle the switches.

The black and red lines with two arrows on them are called "travelling wires" (because they travel between the two switches) and that will be important later, but just remember that for now.

The smart switch I bought has five wires connected to it.  The green wire is "ground", the red and black wires (labelled T1 and T2) are the travelling wires.  The white wire is the N for neutral wire.  The other black wire is the "load" (or L) wire.  This is the wire that is hot.  Be careful with this one.  For the life of me, I cannot figure out why they didn't give every single wire a unique color - it would have made things a lot simpler and easier.


The legacy (or old) wire that's in the junction box, typically looks like this:



There are usually four wires associated with these three way (older, non-smart) switches.  The green screen is connect to the bare wire.  This is the ground wire and needs to be connect to the green wire in the smart switch.  The two gold screws are connected to the travelling wires, and you can connect red to red and black to black.  The final screw is the "L" wire (or the Load wire).  This connects to the "other" black wire on the smart switch.  Then you just have to connect all the wires.  There is one final wire on the smart switch - the "white" or "neutral" wire.  Usually, inside the junction box, you will find a bunch of white wires twisted together.  You have to uncap them and connect this wire to that bunch.  When you're done, it should look something like this:

When you have everything connected all up, and before you shove it back into the junction box, and screw everything back in, I usually go to the breaker box, turn the breaker back on and test everything.  Trust me, once you get all the wires and caps back into the junction box, you're not going to want to have to pull it back out and do it again.  Once you verify everything is working, you can go turn the breaker back off and shove all the wires back into the junction box screw everything back and turn the breaker back on.  Sometimes when I'm feeling lucky (or lazy), I'll put on some light work gloves and shove the wires back into the junction box to avoid another trip to the breaker box.

Saturday, April 20, 2019

Replacing the Kitchen CFL Lights

The CFL lights they force you to install in the kitchen (there are no other options) are pieces of junk.  The lights go out, you climb up on a ladder, wiggle the rectangular bulb, and it may come back on (it may not - even though the bulb isn't out).  Even if it comes back on, a random amount of time later, it will go back out.  It's an exercise in frustration.

I reached out to some guys on Facebook, and they directed me to this awesome YouTube video which helped a lot.  It's not an exact guide for the kind of lights we have, but close enough...
https://www.youtube.com/watch?v=VXFisvd7FrI

I finally had had enough, and I decided to replace them with light fixtures from Costco.  Here's what I wound up getting.

I am basically replacing the light on the left with the one on the right:

Here are the instructions I went through to replace them.  I'm not an electrician or a handyman, and this job requires neither.  The first thing you have to do is...  survive :-).  You do this by turning off power to the lights.  My circuit breaker is in my laundry room, and is the third switch from the top on the left side.  The panel when you open it up will have what the switches correspond to.  You should verify this by turning on the light (from the lightswitch), then flipping this circuit breaker switch, and verifying your lights are off.  Then go back downstairs and try to turn the lights on and off to make double sure, they can't be turned on.


Once you've verified there's no electricity going to the lights, you are ready to start.  Start with getting your fingernails around and under the rim of the old light canister and pull it out slowly.


You will notice there are four wires connected to the light.  You'll want to cut these wires.  Cut them as close to the light fixture as you can (so the wires are as long as possible).  You'll notice that there are four wires going to the light (2 red, and 2 black).  The light I bought from Costco only has two wires - one black and one white.  Just for informational purposes, red corresponds to black (power) and blue corresponds to white (ground).  That will be important as you're thinking about connecting the wires.


Next, you'll want to remove the canister.  You do this by removing the screws first.  There are four small screws that hold the canister in place.  You'll need one of these stubby screwdrivers in order to unscrew them given the tight space.  After you've taken out all four screws, pull the canister out slowly until it is all the way out.  One of the things I did to make this a little bit easier to put back in was to use a sharpie to mark a spot on the canister and on the dry wall so that when I put it back in, I could just line up those marks and push it back in.


If you look inside that hold, you'll see a little metal box.  You push up on that tab, and the front panel can be removed.


When you do that, you'll see something like the following.  The important wires in here are two sets of red wires, two sets of blue wires, and a set of white wires and a set of black wires.  The white wires and black wires are connected to this cool thing where you can connect other wires (important) to them by simply pushing them into one of the available slots in the rectangular piece -- more on this later).

The red and blue wires that go into that box (and into the metal tube) on the left is important.  There are two red wires, and two blue wires.  You will only need one red wire and one blue wire.  Be careful here though, because once you pull those wires through the metal tube, it will be very difficult to get it back.  So I found one red wire and one blue wire that I could pull back and forth from the wires in the canister and the wires in the metal box.  I verified that those were the wires by pulling a little on them in both directions.  Once I found the wires, I cut it at the connect in the metal box.  Again, I cut them as close to the twist connectors to make sure I had the most amount of wire to work with.  I pulled those wires all the way through, from the canister all the way through the metal box.  So, now there were was only one red wire and one blue wire in the canister.  I then found the "other" red and blue wires that were going through the metal tube, and cut them again as close to the twist connector as possible.  I had to strip off the end of the wires - this is the most "electrician"-y kind of thing I had to do.



After stripping off the ends of the red and blue wires that go all the way through the metal tube, I pushed them into the white rectangular thingy (some pretty technical terms here, eh?).  Notice the pairing - the red wire is with the black wires and the blue wire is with the white wires.


I unboxed the replacement light and separated the orange connector.  This was pretty straightforward.


Then I shoved my awl (i think a super small screwdriver would work too), into the orange thing on each side and released both wires.


After you do this, you should strip the red and blue wires in the canister and push them into the orange connector.  There is a "B" where the black wire (or red) wire should go.  The white wire (or blue) wire should go into the other one.


After you've done this, you can connect the two orange parts again, close the metal box again, push the canister back up into the ceiling (align the sharpie marks you made earlier) and screw in the four screws.  At this point, you should be good to go.  Go turn the power back and and make sure the light can be turned on and off.  If your house burns down, I cannot be held liable.


Once you have verified everything is working, you can put the light back into the ceiling by putting the wires inside the guides in the canister and push the light fixture back up.


I was pretty worried when I started this job, but it was way easier than I thought it would be.  My only issue now is whether to replace working lights or wait until they burn out.  I've got a bit of a hodge podge right now.  I've got some LED flush lights, some of these lousy CFL lights, and another CFL light with a white light instead of a yellow light.  It's a mess...  But after I replace all the CFL lights with LED ones, I will have reached kitchen light Nirvana.  It will be awesome!

Patio Lights

It looks like the lights in the patio under the balcony have a different wiring.  Here is a picture.

I don't see the standard red and blue wire like I saw earlier.  I will investigate and update here.
Upon further investigation, looks like the same thing:




I'm not sure I am going to replace these ones (five).  It looks a lot more difficult to remove the canister as they have liberally put stucco around the edges to keep it lodged in.  Doesn't seem worth it...