Light switch replacement

Suggestions for a light switch controller run by node red. Seems like there are numerous options for wifi switches, looking for one someone has actually used and knows that it works. Want one to fit in a standard wall box.

There are too many criterias to recommend one:

  • Which country are you in?
  • Do you need neutral wire or not?
  • Do you want to wire the switch at all ... or just use the wall box and use a battery operated switch?
  • do you use zigbee, tuya or any onther protocol in your environment?
  • do you want a simple ON/OFF switch or do you want to dim the lights as well?
  • are you looking for a multi or single switch?

these are just a few criteria straight out of my head .. I would recommend that you search on youtube for home-automation and light switches... there are hundreds of videos explaining the pros/cons of the different swirches and you might find the one best suitable for you

Would like to replace a single pole non dimming switch in USA. Have a neutral so if that's a requirement it doesn't matter. And you are correct there are dozens if not hundreds of different switches so rather than guess at one I hoped to see if someone had one installed controlled by node red so l could be sure it would work.

This is a typical wiring diagram. It will not be easy to replace the switch in this case. But you can leave the switch on and install a relay from "sonoff" in the lamp. Which will allow you to control lighting through rest api and node-red

(there is no grounding in the circuit, but it doesn't matter )

As an option why not go smart e.g. with Philips Hue.

Or shelly:

Yep, there are enough manufacturers, choose which one is closer. The most commonly used Zigbee protocol. Most vendors offer their Rest API. This is not a problem when the Internet is stable, but it is better to keep the lighting control locally, without third-party solutions. If there is no native support for mqtt, consider zigbee. Met the zigbee2mqtt converter, as well as the zigbee dongle. This can be easily configured to be managed from node-red. I can't know how much zigbee is legal in your country. You might be lucky to find an api inside the lamp. For example "Yeelight LED Ceiling Light" can be controlled via lan. If you don't have a special design, it may be easier to change the lamp.

I don’t know how compatible they are to american electricity standards but i have had really good experiences with the shelly switches.
I have been using a few of their shelly1 relays for a couple of years now.
They are cheap, easy to install and can communicate directly and locally with nodered via mqtt.
Another option im also using which would need a little more equipment is to set up a z-wave mesh.
I use this in parallel with the awesome node-red-contrib-zwave-js.
Their are lots of quality zwave relays on the market at least in europe like for example the Fibaro ones.
The only downside is that they tend to be more expensive than the wifi ones.

All suggestions before are good. I personally use sonof minis with my own firmware (flashed via OTA)

Simply because I love to write my own firmware. Running now from the first install without any reboot or other glitches for 1.5 years.

But this is a more DIY approach than a out of the box solution.

Check out digiblurDIY on discord. You will find all of the help you want and more!!

My favourite option is a Sonoff mini type switch because although it has to be located near a supply it allows the use of either the standard wall switch (wife & visitor friendly) while also allowing the use of Node-RED, Alexa, Google Home etc as a control.

I use Sonoff 's with Tasmota mostly but I am moving to zigbee units to reduce the number of devices on the network and because once the zigbee system is up and running adding extra units is easy.

There are umpteen suppliers of these devices these days and they are cheap

Ordered a philips hue hub and a couple of bulbs. We'll see how it goes

Hi Gerry. Will be interested to know how you get on with Hue.

The problem with Hue is the bulbs are great but their switches suck. The system seems to be geared towards operating it from your phone rather than from wall switches but why would you want to find your phone, unlock it, open the app, switch to the right page and tap a button, when you could just have pressed a wall switch like we've been doing for a century? Plus the switches don't replace a wall switch so there is always the danger that someone will switch the light off at the wall leaving you with a light that doesn't work.

Here, for what it's worth, is what I have running and it is working pretty well, not least considering my wife is a Luddite so if you can't operate it using "normal" switches and unless, when you are presented with a switch, and you press it, that switch does exactly what someone with no interest in home automation would expect that switch to do (whatever else it might also do), then she's very, very not interested.

I am currently running two options, both work well and replace wall switches with new switches that look good (even in my 300 year old home) look and act like a wall switch should, don't need major rewiring (some rewiring at the switch though), are reliable and are reasonably easy to set up. One uses Fibaro Z-wave controllers. These fit behind a regular wall switch in the back box and will control, and dim, regular and LED bulbs. The switch gives you local control - just like what you are replacing but you have remote and automatic control through the z-wave network. It will also continue to work locally even if your node-red controller goes down. It doesn't need any external controller to switch or dim a light from the actual switch. Now, I use OpenHab to control all the I/O communications in my home; I only use Node Red for the automation rules. There is a z-wave node though so if you don't want to go down the OpenHab route, I presume you can do everything in Node red. You can build additional functionality into the switches like double and triple clicks or have two switches when there was only one. For example, when I come into the house at night, rather than have to shuffle to and fro switching lights on in front of me and switching them off behind me as I move from the front door deeper into the house I can double click and the lights will come on ahead of me and go off behind me automagically. The lights also automatically come on more dimly at night about 15 minutes after the house detects we've gone to bed so you aren't dazzled if you have to get up in the night. They reset at dawn.

My second system is using Hue bulbs or 3rd party controllers that work with Hue. I use these in some places where it's just easier - controlling LED strips for example, where I need the colour control or where it's not easy to gain access to the wiring. As I said above, the Hue switches are terrible so I use EnOcean switches. I rewire the back box so the bulbs are permanently live (which they need to be) and replace the switch over the back box with an EnOcean switch, which isn't connected to the mains wiring at all and uses no batteries because it generates the power it needs from the button press. You need an EnOcean dongle but if you're running node red on something like a Pi then that's easy to add. Again, I use OpenHab for my I/O comms but there are Enocean nodes for Node Red. You can trap the Enocean messages and use Node Red to send the relevant messages to your Hue Hub to operate the lights through the HueMagic node (or do it yourself using HTTP). One downside of this route is that if your controller fails, your lights don't work. Mine has proved rock solid though.

For example my dining room lights come on at different colour temperatures depending on the time of day (actually depending on the position of the sun). There are also different scenes for e.g. a dinner party or when my wife is designing a quilt spread out on the dining table and wants a daylight white to judge the colours properly. She is very happy about that!

Good luck. You might want to try OpenHab just to manage your IO. It keeps things simple. All the "intelligence" I do through Node red, which comes built in to OpenHab and all runs on the same RPi.

Good luck

Here is my specific use. These two bulbs are for outside use. Near garage and front door. Currently they are on a timer from dusk to dawn. Works fine till power goes out then they lose track of time. Yes they have batteries but power routinely goes out longer than the batteries last. So hook bulbs to node red and when power comes back on node red syncs time and I'm back in business. These bulbs won't even be hooked to a switch so no problem.

I am very content about the Shelly products. I use a dimmer, several single switches and a double switch. They all fit behind the normal wall switches. They can be operated by both wall switches and wifi. I put tasmota on the Shellies: easy to configure for use with mqtt / node-red.

BTW they operate at 110 - 230V and some low voltages.

I use also shellies for several stuffs, futhermeore I've replaced all my old EnOcean and Z-wave devices by shellies, just to keep it simple and to reduce maintenance.

Is there a reason you don't use the shelly mqtt API?

Sorry, I was wrong. The firmware on Shelly is the original.
I also use Sonoff, they are the modules I put Tasmota on so they have the same UI as my homebuild esp based modules.

The only problem with Shellies is that they need a negative supply, which isn't always available in UK lighting circuits.
There is a work around with a resistor, but it's a poor, wasteful, option...

As I indicated at the beginning, I have spent numerous hours over several weeks looking at lights before I asked this question. Dozens and dozens of options. Someone mentioned Hue and it looks like they should work for me. Eventually you have to make a choice so I did. Best choice? Maybe, maybe not but if it works all is good.

Hi everyone. I started my smart home adventure almost three years ago, when we were drafting our new house. My plan was to make everything controllable via Node-RED. I tried many alternatives, Homematic, SonOff, then Hue, and then Shelly. I ended up in using Homematic for climate & security for reliability and reach reasons (it works over radio and not WiFi), Shelly for all sort of switches (lights, window covers, ap-pliances etc.).

Today I have 70+ Shellys (original firmware), about 30 Homematic devices, Home Assistant as the integration platform & user front-end, and Node-RED as the automation center for everything.

I discarded SonOff because Shelly became more powerful, versatile, and reliably and Hue because it was proprietary and expensive.

Are the lighting neutral feeds readily accessible in Austrian homes, or were they added whilst drafting your new house?