Wifi light switches

access

Executive Member
Joined
Mar 17, 2009
Messages
8,258
#21
Just get a Philips Hue hub and then you can choose from a range of dimmable smart lights from various manufacturers to fit your budget.

Osram and Innr make high quality cheaper alternatives to the Philips ones. From regular warm or cool white light's to bulbs or light strips that can display 16 million colours.

Then you can set timers for when you want specific lights to turn on/off, or when to change colour or brightness. Through the apps the RGBW colour lights can be set to cycle through specific colours or to react to different audio frequencies like night club lighting.

If you want your lights to be voice activated then add on a Google Home or Amazon Echo. I think it's definitely worth doing. We're so in the dark about this in SA.
i agree, most of the guys selling/installing supposed home automation here concentrate so much on audio/video stuff it might as well be a fancy home theater system. like something my grandmother had, a record player and radio with a speaker in each room, woopdedoo.
 

vaper

New Member
Joined
Oct 31, 2007
Messages
4
#22
Controlling lights with an app on your phone is not that useful. Controlling it with voice is though.
I can switch any of my lights on/off individually or all together using voice commands. The system works with Google Assistant, so
I also have access to it 24/7 in the absence of a phone (set reminders, ask directions, make it read news, etc).

The Sonoff switches were mentioned in this thread, my system is based on a reprogrammed version of those. They already contain the ESP8266 chip and are quite cheap. They are easily reprogrammed with ESPEasy. Lots of information online how to do it exactly. Once reprogrammed, replace your light switches with them (see product: Sonoff Touch). My house is 35 years old and I have neutrals in the lightswitch sockets.

Commands are sent to the Sonoff switches via MQTT protocol from the MQTT server (Software: Mosquitto) running on a Raspberry Pi 3B. Raspberry Pi because its cheap (R600) and uses almost no electricity, so it can be always on.

I also have Node-Red running on the Raspberry Pi which communicates easily with the MQTT server to allow any kind of control to be exhibited over the lights.

Its simple to integrate Node-Red with www.IFTTT.com. So when I want to create a voice command to switch on a light I just create a rule on IFTTT. IF: (Google Assistant = Turn on all the lights) THEN: (Send command to Node-Red = "Turn on all the lights") RESPONSE = "Executing Command". Immediately then when I invoke Google Assistant "OK Google", "Hey Google", I can send the command "Turn on all the lights" (from anywhere) to IFTTT which will send that text to Node-Red.

Since google released the Google Assistant SDK I installed it on the Raspberry Pi as well. So now I don't need my phone for voice commands and the Raspberry Pi is a standalone controller which accepts voice commands and switches lights on and off via MQTT. Modular home automation that costs <R1000 (that includes 1 light switch replaced with the Sonoff Touch) + R220 per light switch or +R120 per applicance.

I also integrated voice commands with Autovoice->Tasker (running on Android) -> Node-Red (running on Raspberry Pi), so even when there is no internet connection I can use voice commands from my phone working only on the local network.

Also integrated into node-red is a GUI from where all connected devices can be controlled. I can access that GUI locally or from the internet.

The system can also be used to easily integrate this sort of functionality: Ask the Raspberry Pi, "How much is the solar system producing", and it will get the reading from Sonoff POW via MQTT. Google Assistant will then read the value back to you. Its already been done by youtuber: Csongor Varga
 
Last edited:

Honey Badger

Honorary Master
Joined
Apr 30, 2010
Messages
18,450
#25
My solution involves Sonoff switches for pretty much anything in the house, and Google Home and Amazon Alexa. Unfortunately the Sonoff switches are still en route.

Nice thing about them is they're controlled directly by Home or Alexa over wifi, no other cabling needed.
 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#26
Only small problem with that unit is that each one will require a Neutral in the lightswitch box in the wall which from experience is not really the norm in SA.
Yea.

I meant to look actually. I didn't know how to open my lights. Lol

Also, only one switch ... A few of mine are two on a panel
 

ToxicBunny

Honorary Master
Joined
Apr 8, 2006
Messages
79,070
#27
My solution involves Sonoff switches for pretty much anything in the house, and Google Home and Amazon Alexa. Unfortunately the Sonoff switches are still en route.

Nice thing about them is they're controlled directly by Home or Alexa over wifi, no other cabling needed.
My biggest issue with both the Sonoff switch and the TPLink one, is that they're 1 gang.. I want multi-gang (4 way or even 6 way)...
 

vaper

New Member
Joined
Oct 31, 2007
Messages
4
#28
My solution involves Sonoff switches for pretty much anything in the house, and Google Home and Amazon Alexa. Unfortunately the Sonoff switches are still en route.

Nice thing about them is they're controlled directly by Home or Alexa over wifi, no other cabling needed.
The Sonoff switches out of the box only works with the app Ewelink. And Alexa integrates with Ewelink. I had Alexa running on my raspberry Pi for a bit just to test it. But its a pain, because you cannot change your voice commands.

You have to say: "Alexa, send Ewelink, turn on Light". It also seems to have problems when you name your switches something more complicated like "Garage Light".

As far as I know you cannot use Google Home with Ewelink.
 

vaper

New Member
Joined
Oct 31, 2007
Messages
4
#29
My biggest issue with both the Sonoff switch and the TPLink one, is that they're 1 gang.. I want multi-gang (4 way or even 6 way)...
That is an issue for me as well, but the Sonoff Touch (UK version, the one you get in ZA) is actually small enough so that I can fit 2 of them side by side inside my house's light switch sockets.
 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#30
Do you get 110v and 240v light switches?
So can't get anything from Amazon.com but rather Amazon.co.uk?

My issue with switches (as Toxic) mentioned is the single switch only ; and the neutral wire required.
My issue with globes is if a guest or someone flicks off the light when they leave a room, and nothing works.

I can only imagine me showing off one night to guests, 'Alexa ... turn on the lounge light' .... 'oops, it's off the switch' ... stand up to switch it on ... then repeat.
 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#31

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#32
I bought a few various sonoff switches etc just to see. Setup of light fitting was a bit of a mission but once I figured it out its was easy to replicate.

Works well I would say.

I got them at communica so a bit more pricey. Will get more of them direct so will be much cheaper.

The only negative I see is that its quite bulky. And no dim function as far as i can see.
This one looks interesting ... Is this what you have? 220v and I read no neutral required. And 1/5th of everything else

http://www.communica.co.za/catalog/Details/P2265077762
 

krycor

Honorary Master
Joined
Aug 4, 2005
Messages
14,127
#33
I went the Sonoff route i.e. Netram Technologies sells them for cheap enough that its not too much more than importing some of it yourself. <-- Not everything is tho so shop around..

There are 1000x articles, YouTube vids on how to use these with Google Home / Alexia or HomeKit and they work perfectly. We have those big glass dome ceiling fittings so will place the sonoff switch inside there and just leave the standard switch on. Before you do it though I suggest you work out costs and reasons for doing it. So bathrooms, kitchens which have brighter (greater wattage lights) makes sense where as bedrooms are not as costly as we already have 5w LEDs. So in our case we getting savings vs heated blankets (auto scheduled for early morning), lights which we want on for a short time, and lights/devices we want turned on & off remotely or via HomeKit. So now u can go.. ''Hey Siri, turn on the lights in kitchen". What I want to do is Auto trigger via IFTTT(enter area event after 6pm example) + HomeKit.

Currently I am only using it for heated blankets with the built in application but will be changing these to OpenHab so that I can use them with HomeKit via MQTT (supported on Sonoff). FYI: Apple HomeKit has simultaneously dropped a lot of the costly licensing & barriers needed to DIY so this coming year will be fun to watch.

Lastly for bathrooms this is non-ideal.. and busy getting occupancy detectors to connect.. An occupancy detector costs +/-R250-400 and again, easily put inline with an existing light.
 
Last edited:

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#34
I like the switch as opposed to the globe, mainly due to the fact that guests etc can't turn off the light switch and kill your home automation system. But they've been plagued by the 3 issues above.
 

krycor

Honorary Master
Joined
Aug 4, 2005
Messages
14,127
#35
btw the Sonoff wifi switch has a port which acts as a "Toggle" switch on which it has 5v.. i guess you could technically connect these to the standard switch to Toggle the state (ground the 5v line with the ground pin). The TH16 switch has a headphone jack port which basically allows u to do this without board manipulation too.

I dunno.. these switches seem fun so waiting for my order from China to come. Just ordered a few locally as the import wait sucks.
 

krycor

Honorary Master
Joined
Aug 4, 2005
Messages
14,127
#36
I like the switch as opposed to the globe, mainly due to the fact that guests etc can't turn off the light switch and kill your home automation system. But they've been plagued by the 3 issues above.
hard link the switch? so the switch is 'fake' / dummy ? Personally I wouldn't do this as it means any lighting issue = turning off breaker at mains or the mains breaker which sucks
 

Dolby

Honorary Master
Joined
Jan 31, 2005
Messages
26,564
#37
You have to say: "Alexa, send Ewelink, turn on Light"
Lucky they changed this - was my biggest gripe.

Now it's just, 'Alexa, turn off the study'.

I've been created a group and can say 'Alexa, turn off/on for the house' for everything to turn off at the same time.
 

Honey Badger

Honorary Master
Joined
Apr 30, 2010
Messages
18,450
#38
The Sonoff switches also has a button, did you notice. You can toggle the light state with that button and it will inform the server of what the state is. Connecting the current switch in an OR configuration (or XOR) would mean the Sonoff would send the incorrect state to the server; telling you the light is on, when it's in fact off.

If one can connect the current button to that onboard switch it would be a win.
 

vic777

Expert Member
Joined
May 6, 2015
Messages
1,232
#39
Working on a project like this at the moment

Two approaches:
NodeMCU connected to relay, triggered via MQTT from a server
Raspberry Pi Zero connected to relay, triggered via MQTT from a server
 
Top