Light switch replacement

Have a look at https://zigbee.blakadder.com/all.html

You can use Philips Hue with the open source zigbee2mqtt > https://www.zigbee2mqtt.io/

The house is in Greece :slight_smile: , However, I had instructed the electrician to supply each switch with a neutral wire

3 Likes

"Proprietary" was probably the wrong term. My aim was to "talk" to switches directly over Node-RED, not over a hub. Furthermore, using Hue wall switches was too expensive. Using just hue bulbs, was a problem again because they were lacking physical switches (either you control a bulb or a switch). When you have just a few lights, and that's it, Hue might be a good solution. For having a homogenous system for a house with dozens of switches for covers, lights and appliances, it's getting complicated.

Currently they are on a timer from dusk to dawn... These bulbs won't even be hooked to a switch so no problem.

So it looks like you don't need a switch replacement after all. Hue bulbs will probably work fine and I believe there are options for timers and to have them revert to their previous state when the power comes back on. You don't need Node Red for that.

On the other hand if you are connecting to some form of automation then you can get much more sophisticated than dawn dusk control (why would you want your lights on all night?) - movement sensors, geo-fencing, timers etc

Don't need node red to control them but it's there so why not. As for on all night, personal preference for the situation. As for timers, see above and power outages.


That's how I controll the outer lights. The devices are Shelly Dimmers

Wound up buying a philips hue hub and bulbs. Yes, wasn't cheap but they provide extremely easy access to the hub to program. Been up for a week and lovin it.

What are the two (timer) nodes with the 'clock' icon top left, Damianos?

Paul, these are time-inject nodes, provided by node-red-contrib-sun-position node-red-contrib-sun-position
Very handy!

1 Like

It's the first time that I've seen icons actually within the label!
I tend to use node-red-contrib-cron-plus as all 3 timer functions could then be combined into just one node, but it's personal preference.

1 Like

While controlling lights like described above, using various time featuring nodes works fine, I have in addition readings from a light intensity sensor as condition for when lights should be turned on or off, in this way compensating for weather conditions

I think the clock icons are emoji's actually. I use the same Node. I found it easier to use than CRON+ for what I was trying to do (I do still use CRON+ for certain tasks) part of which was to track things like sunrise/sunset (more accurately "daylight" suitable for my location) in MQTT. I also track things like sun altitude and azimuth at 1 minute intervals.

image

In fact though, I've just installed a new light sensor and I'll be using that in the future to control the lights in the inner part of the house where it can get a bit dark even on cloudy days.

I have something similar, except I'm just using cron+ which contains 4 schedules.
I always try to use the least amount of nodes in my flows :wink:

screen3

Me too but I needed the other data that the sun-position nodes give anyway so this was the easiest solution.

Note that the data is pushed to a global variable and to MQTT and is reused later in various flows. That way, I only have to set things once and have one place to change it if I need to.

Me too, for the light sensor reading. Using a light level makes a great difference both indoor and outdoor, compensating for both sunny & cloudy conditions. Been running this since years and the on/off times are really changing dynamically compared to just use fixed based on sunset/sunsrise (My sensor is a 1-wire thing installed on the roof, no hazzle changing batteries)

Just a small side note: When using a light level sensor you could actually think differently. Basically, you could forget about time. The light level could decide when your lights should go on and off. But it might be, like in my case, there are certain hours during the day when you do NOT want the lights to go on, regardless of the current light level. In such case, combining with a schedule is a perfect fit

I've been meaning to do it for years! :grinning: Just never got round to finding a good place for the sensor and the processor till now. I do need to change round the USB power supplies in my office though as the sensor is currently attached to the PC which turns itself to suspended overnight and so turns off the USB power. Running out of plugs so need to get a new multi-way USB power supply.

Doesn't quite work for me since I don't want all of the lights on when we are sleeping. Also, if lights are on when we are sleeping, I want the light levels (where I can control them) to be much lower.

Some of the improvements I'm thinking about (some are already partially deployed):

  • Adjust light brightness according to outside light levels and time of day (e.g. a bit higher on a really nasty day and lower in the evening).
  • Link lights to internal PIR's and activate lights (and notify) on movement if we are out (carefully avoiding false alarms from the cat).
  • Have some set lighting patterns for holidays, working from home, etc.

My lighting has been working but very static for some years so it was overdue an overhaul. :grinning:

1 Like

:innocent: Of course, so you should combine with one or more schedules (like I actually do)

My light sensor reports it's value once per minute and I use it to calculate a moving average value based on the 15 latest readings to avoid "flickering". Then I have 2 threshold levels, one for outdoor and one for indoor. When the "averaged value" is below those, lights are ALLOWED to be turned ON if in harmony with the schedules so to say (complicated sentence :confused: )

Nice ideas for useful features, cool

Which I do. But I also have the sleep and daylight flags. I use those where appropriate rather than schedule nodes. So I have some lights that may come on in the morning when sleep=false & daylight=false. They go off when daylight=true except that a subset of them may stay on if the light level is low. In the evening, lights will come on when daylight=false but go off when sleep=true. A couple of the lights have variable brightness and they currently change levels depending on the time of day (since that is separate to whether they are on or off). And of course, there are manual overrides both in the form of physical buttons and web interfaces suitable for different people :grinning:

1 Like

I would be interested to know how you got a WAF for this. At the moment our lights can be turned on or off by chatting to Google or (just introduced) a four switch remote control. But... I still get grief because the light switches (while working eventually) are not the normal way to control an IOT light. I could use a Sonoff mini (or similar) but they are too big to fit in the ceiling rose (or switch box) so require installation above the light. I live in a bungalow so this is achievable - but a faff.

As to the scheduling, apart from a fancy display light, all my lights are controlled by human interaction.

And I think that is your answer.

We do have overhead lights that I never bother to control because UK lighting circuits are an absolute pain. Though with the advent of cheap Ikea Zigbee controlled bulbs, I could unwire the manual switches or replace them with fully remote ones.

But then we have various standard lamps and some LED strings that are mostly automatic. They don't really need any interaction from the family. Again though, Ikea do a bulb and battery dimmer button that is really low cost and I have a couple of those. I also have an older LightwaveRF multi-button remote which is handy for controlling a range of lights from a single control but the family aren't so keen on remembering the link between the numbers on the control and the lights they control. But the Ikea buttons are now mounted near the bulbs they control so those are as easy as standard wall switches.