Upgrade existing light switches to be smart

You can Post Talk Chat about anything here. Anything but religion/bullshit & politics/stupidity
slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Upgrade existing light switches to be smart

Post by slattynan » Fri Nov 16, 2018 6:03 pm

I've been searching the web to try and find a module that you can install behind your existing light switch to convert it into an RF (or other) controllable smart switch. I can see a couple, but none of them looks ideal and are ridiculously expensive. Does anyone have any suggestions?


A few years ago I spent £100's on nice chrome flat switches and I don't want to replace them!

I've spent some time googling and come up with nothing!

Has anyone come across anything I could use? Idealy I need single and dual gang and 1/2 way options.

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Sun Nov 18, 2018 1:59 am

hmmm that is an interesting idea. I have not seen something like that as of yet that is in a single packaged deal..

I am sure you would want to have the ability to be able to use the switch also. the basic idea of what you would want would be a relay that is located behind your existing switch with some kind of control board that has wifi or some other wireless technology that that control board can activate or deactivate the relay. there would be some wires that get connected to the existing switch so the add-on part would know if you pressed the manual switch at all.

it would not be that hard to make something like that. but again I have not seen one. I have not looked specifically for one either, I have trolled through all kind of devices tho looking for nothing specific, just wanted to see what has come out on the market and never cam across one. There are wireless relays that can be purchased. but you would lose the ability to control the light from the switch while the relay was active. so if the light was on via the add-on part you would not be able to turn it off from the switch. IDK if something like that would be useful to you or not.
If you like the work I have been doing then feel free to Image

slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Re: Upgrade existing light switches to be smart

Post by slattynan » Sun Nov 18, 2018 12:24 pm

kgschlosser wrote:
Sun Nov 18, 2018 1:59 am
I am sure you would want to have the ability to be able to use the switch also. the basic idea of what you would want would be a relay that is located behind your existing switch with some kind of control board that has wifi or some other wireless technology that that control board can activate or deactivate the relay. there would be some wires that get connected to the existing switch so the add-on part would know if you pressed the manual switch at all.
That's a fair summary. Seemed simple enough that it would exist already, but...
kgschlosser wrote:
Sun Nov 18, 2018 1:59 am
it would not be that hard to make something like that. but again I have not seen one. I have not looked specifically for one either, I have trolled through all kind of devices tho looking for nothing specific, just wanted to see what has come out on the market and never cam across one. There are wireless relays that can be purchased. but you would lose the ability to control the light from the switch while the relay was active. so if the light was on via the add-on part you would not be able to turn it off from the switch. IDK if something like that would be useful to you or not.
Possibly, it depends whether there would be a way to use the dimming knob?

My current thinking is to buy a smart light switch, rip the guts out and rework it for my needs. Only problem is that all the smart switches I have found have buttons for the dimming rather than a variable resistor.

I'd love to develop a better solution, as you say it should be a relatively simple design. If I can find the appropriate controller chip I would be tempted to get a PCB designed and prototyped. Don't suppose anyone knows if existing light switches are using a common controller chip?

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Mon Nov 19, 2018 10:29 am

if there is a dimmer involved it becomes a whole different animal. and with a potentiometer (anolog) dimmer that is a completely different scenario.

You would need to use a microcontroller like an Arduino Teensy to send voltage through the potentiometer to read what is coming out. with this and some crafty firmware writing you can use the teensy to "press" the buttons on something like a zwave dimmer. The issue you are going to have is getting ti all to fit into the box. because the current switch you have already occupies about 3/4 of a box (single gang) with wiring. that's because of the heatsinks needed to offload the heat from the resistance that is used to dim the lights. That being said. most of that crap can be ripped out of the existing switch because you would be passing low voltage through the existing switch. so there would be no heat issue. But it is still going to be a trip to get it all to fit into the wall. I know it can be done but essentially you will need to tear down your existing switch. possibly replacing the potentiometer with a much smaller one.

then the writing of the firmware.. hmmm... this would be tricky because the teensy would have not a clue as far as what the new switch is set at. so the dimmer knob would go out of sync. You would have to replace the potentiometer. you would need to replace it with something that has infinite turning. so if you turn it one way it would turn the light up. and the other way would turn the light down. I am going to assume pressing the knob in turns the light on or off. so by single pressing the knob it would press the button on the switch. then again you run into that sync issue. we would have to set the thing up so it can monitor the output voltage from the new switch.

it would be over complicated. probably easier to make one from scratch that would read the output voltage from the switch as is. and deal with it that way.

Now. that being said.. I know you don't want to replace those dimmers. but since you mentioned the chrome and the knob.

https://enzo.warpar.ca/

I have spoken to the designer of these things in the past. I am going to be making an EventGhost plugin for them. But they are a really nice switch. and they do everything you want. and I think they have the looks that might be right up your ally.
If you like the work I have been doing then feel free to Image

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Mon Nov 19, 2018 10:35 am

the biggest issue you will face if you try to add anything to the existing design is space vs cost. the HA switches that are available are expensive because they have to have pretty decent components inside. this reduces space needed as well as heat generated if it is a dimmer. You have to remember. there is a processor, power supply, RF transmitter, RF receiver, relay(s), and if it is a dimmer there will also be high voltage step down with some pretty sizeable FET's that are going to offload some heat. I know with my ZWave switches if i have the cover off the switch and I am running close to the 600 watt max. I can't touch the metal around the actual rocker.

That is a whole lot to fit into a 3"x4"x2.5" package (at most). in order to put in most of my switches I had to cut the old boxes out of the walls because they would not fit the switch and the wiring/wire nuts in the box
If you like the work I have been doing then feel free to Image

jachin99
Experienced User
Posts: 646
Joined: Sat Feb 13, 2016 8:39 pm

Re: Upgrade existing light switches to be smart

Post by jachin99 » Tue Nov 20, 2018 12:20 am

Aeotec makes something you can install behind a switch to make it "Smart". See here https://www.amazon.com/Aeotec-Switch-co ... 7583&psc=1 I think they make a few different variants of that with one being a switch, and the other for dimmers but I'm not entirely sure.

slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Re: Upgrade existing light switches to be smart

Post by slattynan » Wed Nov 21, 2018 1:21 pm

Thanks, I had seen them. I will explore further. These were the option I had described as horrifically expensive. It would be cheaper to buy a new switch. Perhaps the extremely attractive ones kgschlosser mentioned!

Do they have a square one for us square individuals in the UK K?

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Fri Nov 23, 2018 1:17 am

I do not know. You would have to send an email in to them. The owner should be who responds. Tell him that you heard about them from the EventGhost forum. And ask if they make or plan on making them in the format you need.

I am not sure what the power differences are between the UK and the US. Even if the voltage is the same I do not know what frequency the A/C is it. In the US it is 60hz I am almost thinking it might be 50 in the UK only because the TVs in Europe are PAL which is 50hz. And that refresh rate was initially set to filter out noise coming down the wire into the TV. Same goes with NTSC at 60hz

I could be wrong or things could be different. Not sure.
If you like the work I have been doing then feel free to Image

holdestmade
Experienced User
Posts: 183
Joined: Thu Dec 04, 2014 2:44 pm

Re: Upgrade existing light switches to be smart

Post by holdestmade » Fri Nov 23, 2018 8:26 am

Hi,

Based on my own experience in the UK, I use various modules behind switches or in the light fixtures themselves.
Most work with existing switches but not dimmers.
Note though, if you use a standard toggle switch, and turn it on, and then off with an app, the switch will be out of sync until you switch it off and on. That's why I use momentary push buttons instead.
I mainly use fibaro but also have qubino and everspring modules, dimmers and relays, I buy them when I see them on offer or on eBay, I usually pay around £25-30.
At the switch, you will most likely need to replace the backbox with a deeper 47mm one to fit the modules.
For a 2-way setup I found it easier to fit the modules at the light as all the wiring is there. I replaced the ceiling rose with a deeper one to fit the modules in or pushed into the ceiling void.
The UK electricity supply is 240v 50Hz but most modules work from 110-240v. Don't buy US zwave modules though as the Zwave frequency is different than the UK.

Hope this helps, let me know if there's anything that is not clear.

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Sat Nov 24, 2018 4:17 am

Yeah! I was right about the electrical frequency. You do need to be careful with it, only in respect to RF signals. for example. electronics made for the US are designed to filter noise using that 60hz. Tho the device may work elsewhere if the frequency is not 60hz it is going to be susceptible to for lack of better words EMI. or noise then gets bast the filters. this can cause diminished RF transfer speeds, range, signal quality. things of that nature.
If you like the work I have been doing then feel free to Image

slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Re: Upgrade existing light switches to be smart

Post by slattynan » Tue Nov 27, 2018 7:24 pm

Useful information, thanks!

Clearly needs a little more thought. It's the sort of simple task that could turn into a big project.

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Sat Dec 15, 2018 8:18 am

and as far as the AC cycle frequency goes. in most cases when converting AC voltage to DC you can use a capacitor to "smooth" out the AC bounce. a very large portion of it. if a device is super sensitive to it (an example would be the esp8266) a cap is not going to do it. it needs to have a filter that has been "tuned" to the frequency which would make the device region specific. a really good example of this would be WallWarts or one of those bricks you plug into an outlet to convert the AC to DC. and I know we have all come across these. the ones that are so blasted heavy you have to hunt for an outlet in the house that will hold the thing into the wall. Well that wall wart I am willing to bet has no more power output then say a cell phone charger. the 2 largest differences are. it will be able to output that rated amperage without the output voltage dropping. and the second is it has a wicked filter in it.

If you take a 1.0A rated cell phone charger plug it in and put say a 0.5 (500ma) load on it. and measure the voltage i am willing to bet it is close to 1 volt below the rated output volts. This is also when AC bounce will manage to get past. because they are using just a capacitor to filter the bounce. when you have a high current draw the cap is basically always empty so the bounce passes right through it. you can see the bounce I am talking about when you check the voltage. if it is there the volts will not remain at one number but will go up and down even tho the load has not changed. you have to have a good load to see this happen.

The reason why a cell phone charger has such a cheap crappy filter in it is because the charger only charges the battery for simplicity's sake a really large capacitor. A phone shuts down because of low voltage. when the battery is so dead it is pulling one hell of a draw on the charger and the voltage of the charger is really low and not enough to power the phone. only when the draw from the battery diminishes and the voltage goes up will the phone be able to turn on. by then the battery has enough power in it to filter whatever gets past the charger.
If you like the work I have been doing then feel free to Image

slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Re: Upgrade existing light switches to be smart

Post by slattynan » Mon Dec 17, 2018 6:28 pm

Funny you should bring up the ESP8266, I've just spent most my weekend trying to change the firmware on a bunch of Sonoff devices using that chip.

It's interesting challenge I hadn't considered around the mains frequency. Must be a challenge designing low cost for WW distribution. The challenge of the volume of scale vs component costs. I'm tempted to order a US sonoff adapter so I can see the change in components ---> I hope there are some and they aren't bodging it :D

User avatar
kgschlosser
Site Admin
Posts: 5498
Joined: Fri Jun 05, 2015 5:43 am
Location: Rocky Mountains, Colorado USA

Re: Upgrade existing light switches to be smart

Post by kgschlosser » Mon Dec 17, 2018 8:25 pm

any time you are messing around with the ESP 8266's when flashing firmware you need to have a good solid wall wart. those things do not play nice with AC bounce. I do not know if you bought a raw ESP or one that has already been fitted onto a breakout board and has a power supply.

there are so many companies that sell the ESP8266 you really need to do some reading on the specs of the one that you have.


as an example I have one that is on a breakout board but I have to connect an FTDI chip to it to be able to clash the thing. and that being stated I have to make sure the FTDI chip has a voltage divider on it. so it will work in 3.3 volt mode. That is what the native voltage of the chip is. so unless it specifically states in the specs of the one you have that it has a power supply and that it has all of the voltage dividers. you can expect everything on the chip to be at 3.3 volt levels. while you are flashing an ESP it will consume 500 MA or 1/2 an amp of current. so if you have a feather light wall wart that states it has an output of 1amp. guess again. that 3.3 volts starts dropping log before even hit the .5a draw. and most time it will cause the flash to fail.

another thing is the length of the RX and TX wires if you are using the ftdi chip to flash them... short short short that is the key. if you are trying to interface the thing with the sonos be sure of the input and output voltage of whatever you connect it to inside the sonos. you really have only maybe .2 to .3 volts of wiggle room. if you supply anything over something like 3.5 or 3.6 volts you can fry the ESP.

They are awesome little wifi chips. but they are temperamental little things. If you are having issues flashing. and you check the voltage powering the ESP during the flashing process and you see it is still at a good 3.3 then go and get yourself a capacitor. something small 1000uf ish (polarized). put it inline on the hot lead. this will help to normalize the power coming out of the wall wart.
If you like the work I have been doing then feel free to Image

slattynan
Experienced User
Posts: 63
Joined: Fri Jul 06, 2018 12:15 pm

Re: Upgrade existing light switches to be smart

Post by slattynan » Mon Dec 24, 2018 8:44 am

Thanks, got them flashed by using a meatier 3.3V power source in the end. The FTDI adapter seems a bit hit and miss without one.

Post Reply