# Compatible Light Switch For Node-Red

**URL:** <https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024>\
**Category:** General\
**Created:** [8 July 2019 02:33 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024 "2019-07-08T02:33:19Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [8 July 2019 02:33 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/1 "2019-07-08T02:33:19Z")

</div>

It seems there is an absolute plethora of different WiFi light switches out there. I would like to install one or many to control some outdoor lights at my home using node-red. What are you guys using for switches and nodes?

I have two three way circuits that would need switched and others are just singles.

Not sure if I could replace one three way switch with a WiFi switch or if all three ways in the circuit would also need to be converted to WiFi?

Are there switches that offer off/on/dimming?

---

<div class="post-metadata">

**Author:** ![Trying\_to\_learn](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/trying_to_learn/32/28400_2.png) [@Trying\_to\_learn](https://discourse.nodered.org/u/Trying_to_learn)\
**Post date:** [8 July 2019 03:52 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/2 "2019-07-08T03:52:09Z")

</div>

Hi Seth.

I think it had better be explained where Node-Red fits in to all this.

As you said there is a plethora of WiFi switches out there.

Likewise there is a plethora of ways to do what you want.

I think some of your confusion is where/how Node-Red fits in to all of this.

Node-Red is a program (to call it) that allows a lot of things to be done. Including WiFi control of lights.

HOW this is done is a whole other set of things.

For example:  
You could control the WiFi switches from Node-Red. This would involve learning the codes sent by the switches and replicating them. There could be a library (or node as the term is here) that supports your WiFi system.

Or:  
You could build simple hardware outputs from an Arduino to then "electromagically" press the buttons on the existing remote control.

This way would involve hacking the remote control allowing electronic button pressing done by the arduino.  
Basically putting a FET in parallel with the button you press.  
Then, make a "dashboard" which looks like the remote control and when a button is pressed it sends a signal to the arduino and it "electromagically" presses the real button.

I'm not going to say which is easier. You are going to have to work that bit out yourself.

Designing dashboards isn't too complicated. I have done it, so that says a lot.

So all this about:

> [@seth350](#):
>
> I have two three way circuits that would need switched and others are just singles.

Well, that's at a different level. Node-Red is software. That is hardware.  
You have to work out how to get the software to control the hardware.

Again: There are many options. My love for switching "mains voltage" (don't know your local term for that) is **relays**.

Sure they are "old school" but they work. They provide a simple "on/off" switch and easy to associate with logic levels at the software part.

Dimming is a whole other field. I don't know enough on that to suggest solutions.  
Other than LED STRIPS are great and offer a whole lot of options which are easy to implement.  
It just depends on how much light you want....

Again: I can't answer those questions. Only you can.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 July 2019 08:09 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/3 "2019-07-08T08:09:33Z")

</div>

You need to explain a bit more. For starters, knowing what country you are in would be a helpful starting point since standards can be different for different countries.

Also "switch" is a rather overloaded term. Do you mean in-wall light switches? Or External plug-type switches?

There are solutions for all of these things. The most Node-RED friendly switches tend to be the SONOFF devices. There are other cheap ones that can be hacked but the SONOFF are the most easily hacked. All of them need to have their firmaware replaced. Then there are things that come from network vendors (typically) that have a published (or at least known) API such as the ones from Edimax - however, you are less likely to find in-wall devices from them.

Then there is non-WiFi wireless controllers using older "standards" such as HomeEasyEU, LightwaveRF, Zigbee, etc. Typically you would also need a bridge device to control these.

For 3-way, in-wall switches, you will need to convert ALL of the switches to wireless, if you leave a manual switch in place, someone is bound to turn off the manual switch and then your nice automation won't work.

Dimming is certainly possible with some devices though I'm not sure I've seen any WiFi switches with dimming but that might just be because I've not looked. Dimming is a tricky subject in its own right, especially with LED's and when used with standard LED bulbs (many of which don't support dimming anyway), you tend to find that there are a disappointing number of dimming steps & that there is a big jump from still reasonably bright to off. Still, been a while since I tried that as well so maybe things have moved on.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [8 July 2019 08:48 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/4 "2019-07-08T08:48:31Z")

</div>

I am using [RF switches, cost $4 a piece (!)](https://www.banggood.com/86-Type-123-Way-Wireless-Remote-Control-Switch-433MHz-RF-Wall-Panel-Transmitter-p-1334774.html?rmmds=search&ID=514178&cur_warehouse=CN), together with a sonoff RF bridge (running on [tasmota](https://github.com/arendst/Sonoff-Tasmota/wiki) with custom "portisch" firmware), can control anything. I am also using [sonoff's PIR sensors](https://www.banggood.com/nl/buy/sonoff-pir.html) to trigger stuff (these also work with the sonoff RF bridge). To make wall switches wireless, combine existing switches with a [shelly](https://shelly.cloud/shelly1-open-source/).

---

<div class="post-metadata">

**Author:** ![Robbo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbo/32/4491_2.png) [@Robbo](https://discourse.nodered.org/u/Robbo)\
**Post date:** [8 July 2019 08:58 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/5 "2019-07-08T08:58:21Z")

</div>

DrZz's recently had a wifi/mqtt switch on his show that was built using a ESP board.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 July 2019 09:56 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/6 "2019-07-08T09:56:26Z")

</div>

> [@bakman2](#):
>
> using [RF switches, cost $4 a piece (!)](https://www.banggood.com/86-Type-123-Way-Wireless-Remote-Control-Switch-433MHz-RF-Wall-Panel-Transmitter-p-1334774.html?rmmds=search&ID=514178&cur_warehouse=CN)

Just be aware that these don't generally work with standard UK lighting wiring.

---

<div class="post-metadata">

**Author:** ![bakman2](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/bakman2/32/6207_2.png) [@bakman2](https://discourse.nodered.org/u/bakman2)\
**Post date:** [8 July 2019 10:45 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/7 "2019-07-08T10:45:00Z")

</div>

They are RF switches, they don't do anything with wiring, you will need to combine them with like shelly's or sonoff's.

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 July 2019 10:46 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/8 "2019-07-08T10:46:52Z")

</div>

OK, I wasn't clear enough. It is the relay's that don't typically work with UK lighting wiring. UK lighting circuits have a slightly odd wiring layout.

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [8 July 2019 14:03 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/9 "2019-07-08T14:03:00Z")

</div>

> [@TotallyInformation](#):
>
> what country you are in would

USA

> [@TotallyInformation](#):
>
> Do you mean in-wall light switches?

Yes

> [@Trying\_to\_learn](#):
>
> Node-Red is software. That is hardware.  
> You have to work out how to get the software to control the hardware.

Correct, I was merely asking to see what other people have done to accomplish the same.

> [@TotallyInformation](#):
>
> For 3-way, in-wall switches, you will need to convert ALL of the switches to wireless, if you leave a manual switch in place, someone is bound to turn off the manual switch and then your nice automation won't work.

Thank you!

Relays, naturally, are easy in function. However, I am after a cleaner solution. An in-wall WiFi light switch that I could send an on/off signal from Node-Red would be appropriate.  
Dimming would be nice, but I can always install a seperate non-smart dimmer and just set the intensity manually.

Something like this,

> **[Smart Switches – Kasa Smart](https://www.kasasmart.com/us/products/smart-switches)**
>
> Control Your Lights whenever You Are

There also appears to be nodes readily available.

> **[node-red-contrib-tplink-smarthome](https://flows.nodered.org/node/node-red-contrib-tplink-smarthome)**
>
> A collection of node-red nodes for tp-link smart home devices

Anyone have experience using these nodes with the TP-Link smart switches?

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [8 July 2019 16:33 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/10 "2019-07-08T16:33:18Z")

</div>

Also check out the SONOFF devices.

[https://www.itead.cc/smart-home/sonoff-touch.html](https://www.itead.cc/smart-home/sonoff-touch.html)

Node-RED control requires some hacking though.

---

<div class="post-metadata">

**Author:** ![Robbo](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/robbo/32/4491_2.png) [@Robbo](https://discourse.nodered.org/u/Robbo)\
**Post date:** [8 July 2019 16:59 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/11 "2019-07-08T16:59:30Z")

</div>

If they device needs a neutral then UK light switches don’t have that.

---

<div class="post-metadata">

**Author:** ![dynamicdave](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/dynamicdave/32/96_2.png) [@dynamicdave](https://discourse.nodered.org/u/dynamicdave)\
**Post date:** [8 July 2019 17:04 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/12 "2019-07-08T17:04:30Z")

</div>

That's correct.  
Most UK conventional wall-switches just 'switch' the live wire.  
Whereas, the 'SMART' switches have live and neutral connected to them.  
So you will have to re-wire the switch (not an easy task as I can tell you).

---

<div class="post-metadata">

**Author:** ![nodecentral](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodecentral/32/10432_2.png) [@nodecentral](https://discourse.nodered.org/u/nodecentral)\
**Post date:** [8 July 2019 23:45 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/13 "2019-07-08T23:45:11Z")

</div>

You could always keep things simple and go with Phillips Hue light bulbs.

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [9 July 2019 03:35 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/14 "2019-07-09T03:35:30Z")

</div>

That would be easiest but also the most expensive.  
I have 10 lights on one switch right now.

---

<div class="post-metadata">

**Author:** ![krambriw](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/krambriw/32/5429_2.png) [@krambriw](https://discourse.nodered.org/u/krambriw)\
**Post date:** [9 July 2019 04:07 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/15 "2019-07-09T04:07:28Z")

</div>

And just to put some concern to security; I personally would and will be very selective when adding "wifi-devices" to my network. I know, I do already have many RPi's connected but those I kind of trust, but adding wifi-switches of all kind??? At least consider making a solution with those on the separated guest network in such case.  
Therefore, for security reasons, it is safer to use those RF, Zwave or ZigBee devices. Both Philips Hue, Osram and IKEA Tradfri is using ZigBee

---

<div class="post-metadata">

**Author:** ![ernestgwilsonii](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/ernestgwilsonii/32/9387_2.png) [@ernestgwilsonii](https://discourse.nodered.org/u/ernestgwilsonii)\
**Post date:** [9 July 2019 04:37 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/16 "2019-07-09T04:37:41Z")

</div>

Here is one of the channels I watch on YouTube and this video uses a three-way switch and I think he has another similar video.  
I like the fact that he uses the tasmota firmware so mqtt can be used locally without needing any cloud provider or even internet.  
I am also a firm believer in being able to control everything locally without an internet connection and as such mqtt is awesome.  
most of the over-the-counter items require connecting your device to some third-party cloud provider.  
If you can get through the steps of adding tasmota firmware, I think that solves the problem I was wanting to keep things all local for things like light switches.  
Additional thought about light switches, they usually require a neutral wire and three ways and four ways are already complex to hook up, be careful.  
Anyways here is a link to a channel I have been using:

---

<div class="post-metadata">

**Author:** ![TotallyInformation](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/totallyinformation/32/31_2.png) [@TotallyInformation](https://discourse.nodered.org/u/TotallyInformation)\
**Post date:** [9 July 2019 06:13 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/17 "2019-07-09T06:13:32Z")

</div>

Yes, the Shelly devices do look quite nice if they fit your needs. A step up in quality (and price) from the SONOFF devices.

I agree with others that I am very reluctant to use devices that rely on external services to work. They fail if your internet service goes down, if the supplier gets bored or runs out of money and may have very uncertain security. That's why I chose a smart heating solution that, while it does use an external service, it doesn't _have_ to use it. And why I roll my own lighting controls.

---

<div class="post-metadata">

**Author:** ![nodecentral](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/nodecentral/32/10432_2.png) [@nodecentral](https://discourse.nodered.org/u/nodecentral)\
**Post date:** [9 July 2019 07:08 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/18 "2019-07-09T07:08:47Z")

</div>

Personally - my lights switch’s are all z-wave

That allows me to always know their status plus with the z-wave controller hosted on my home network; I’m not reliant on any 3rd party for connectivity

I’m in the UK and e.g use the Fibaro Dimmer module with my kitchen lights / which is one switch feeding 9 bulbs

With NR I either use the MIOS node or I can make local http requests to turn then on/off or set the dimmer level

---

<div class="post-metadata">

**Author:** ![seth350](https://sea2.discourse-cdn.com/flex026/user_avatar/discourse.nodered.org/seth350/32/4617_2.png) [@seth350](https://discourse.nodered.org/u/seth350)\
**Post date:** [9 July 2019 11:17 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/19 "2019-07-09T11:17:00Z")

</div>

Thanks folks for the feedback.  
I don’t have internet access at my house. I am too far out in the country. I would definitely need a local solution. I agree that devices that require a 3rd party service would not be ideal. In fact, I would label them as “wont work”.

I’m also not concerned with security. I mean, it’s a light switch without internet connection.

I’m going to read on the Shelly relays.

---

<div class="post-metadata">

**Author:** ![MTStringer](https://avatars.discourse-cdn.com/v4/letter/m/ccd318/32.png) [@MTStringer](https://discourse.nodered.org/u/MTStringer)\
**Post date:** [17 July 2019 17:20 UTC](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024/20 "2019-07-17T17:20:24Z")

</div>

I have three wall switches made by Martin Jerry, each of which have been flashed with Tasmota via tuya-convert process. Also, they can be flashed using a serial adapter if you take the rear cover off. Easy to get to the pins. Two are in bedrooms, one is at the front door. Using Travis Griggs video, I set up a rule for long press so the switch has two functions. 1) turn on the light. 2) long press turns on the bedside lamp. The front porch light switch will also turn on the patio lights with the long press. For more info, check out DigiblurDIY's channel on You Tube. I have Node-Red automations that use the call service node to turn the lights on or off if conditions are met.

[Next page](https://discourse.nodered.org/t/compatible-light-switch-for-node-red/13024.md?page=2)
