Home Assistant Community

How do you control your smart lights?

#1

Hi guys, how do you control your smart lights? Let’s say I have a Hue smart bulb…

If I just replace my normal bulb and pair it with some Hue dimmer or sth it works fine until somebody turns off the light using existing old-fashioned wall switch. Let’s be honest - the standard wall switches are usually placed in the most comfortable locations in the room, it’s most natural just to hit it when entering the room. All those smart controllers/dimmers/panels usually have lots of small buttons, which gives you more control… but it’s more complicated to use.

However if I replace wall switch with some smart one (Xiaomi for example), I will loose the redundancy - home automation becomes mission-critical system, if it fails I won’t be able to turn the lights on/off. I’d like to avoid that…

What’s your setups? Do you keep old-fashioned wall switches or do you replace them?

#2

I leave the light switches on and the smart bulbs are controlled by PIRs, light levels and/or bed occupancy sensors. I don’t usually touch light switches. If HA goes down I can toggle the switches to turn the lights on.

#3

I haven’t used the Xiaomi ones, but with the Sonoff wall switches they still manually work if you loose WiFi / HA connection. (Flashed with Tasmota firmware)

Sonoff T1 Wall switch

If you only want to dim the lights you can also get WiFi Wall Dimmers, so you still have full manual control. Wall Dimmer

I have not tried the dimmers yet though.

I found controlling at the wall works out a lot cheaper than WiFi Bulbs.
You just need to make sure you have a neutral wire though behind your wall plate.

#4

Problem with these switches are that they need a neutral/ground wire to be attached to make them work. Most houses in Europe (except newer ones) do not have this neutral line at the location of the switch, most of the time the neutral line is in the ceiling where the lamp is. This makes is impossible to use in a wall unless you can pull your neutral wire through to the switchbox. Not very ideal for most houses, hence why people buy philips hue and tradfri’s instead of wall switches which is a more elegant solution imho. There is another solution though which could serve the needs for houses without that neutral wire. Sonoff Wifi/RF modules for example, you could get a sonoff basic with rf, mount this in the ceiling where the lamp is (and the neutral wire). Then get a sonoff rf switch to put in the wall (whis switch will only send a rf command to the sonoff whilst the sonoff is connected to wifi, so the state will come from the sonoff and not the wallswitch). You could also just mount a basic sonoff in the ceiling and use a xiaomi button instead (I would advise flashing your sonoffs with tasmota or espurna or something like that).

#5

Be very wary of exceeding the maximum operating temperature of the device if you do this.

I’ve been monitoring the roof temp over summer as I have an architrave switch for a fan I can not fit a shelly behind. It got well above 45 degrees up there yeasterday. So mounting in the roof is not an option and I am stuck.

#6

Some years ago, when Hue started bringing out their switches, I started buying Hue lights, replacing my wall switches with blanking plates, and sticking tap switches or dimmers on top of, or next to, them.

This was all under the control of the hue hub, which has been so reliable that I’ve never had the need to use physical switches, and I figured that if anything bad happened to the hub, or to me, then somebody could probably just go and buy another hub and make it all work again. It’s never been a problem, though nowadays I might go for one of the mounting plates that you can buy to mount a Hue dimmer over a UK light switch…

I still manage the basic connection between my switches and bulbs in the Hue world, and just use HA to enhance this in various ways. It would be a lot tidier to dispense with the Hue hub now that my confidence in HA has grown, I’m no longer running on a Pi, and I have a nicely-working separate Zigbee network.

But I have very much less confidence that, if anything happened to me, anybody else could decipher the system :slight_smile: So if I did decide to get rid of the Hue hub, I’d probably reinstall the physical switches, perhaps with the Samotech hue dimmer covers over them.

#7

Lately I’ve been placing behind my standard dumb switches shelly’s 1 and 2 flashed with ESPHome. So yeah some of the relays do actually control some smart lights(yeelight, zigbee and milight), the custom firmware is network proof. Meaning if the shelly can’t communicate with ha it will use the relay to toggle on/off.

This is a yaml snippet i use for controlling the light

- timing:
    - ON for at least 0.4s
  then:
    - if:
        condition:
          - lambda: 'return id(yeelight_available).state == "on" && id(network_available).state;'
        then:
          - logger.log: "Single Click, Executing HA script for toilet light"
          - homeassistant.service:
              service: script.turn_on
              data:
                entity_id: script.toilet_light_on_off
        else:
          - logger.log: "Single Clicked, No network, toggle relay1"
          - switch.toggle: relay1
- timing:
    - OFF for at least 0.4s
  then:
    - if:
        condition:
          - lambda: 'return id(yeelight_available).state == "on" && id(network_available).state;'
        then:
          - logger.log: "Single Click, Executing HA script for toilet light"
          - homeassistant.service:
              service: script.turn_on
              data:
                entity_id: script.toilet_light_on_off
        else:
          - logger.log: "Single Clicked, No network, toggle relay1"
          - switch.toggle: relay1

The code executes when the physical button is toggled. So reads if ESP can communicate with ha, and also the yeelight light is available then use homeassistant. If either if ha or yeelight is not available (no wifi for example) start using the internal relays. One of the biggest advantages of shelly is the switch input terminal that you can use as binary sensor, means you can connect it to the dumb switch pole so the standard wall plate button works as usual.

#8

I stuck flic buttons just above the wall switch so they’re in the same convenient location. The buttons also turn the lights on and off. However, mostly we just ask Google Home to turn the lights on and off. Either way, I’m not rewiring the house to get neutral to the switch. When I move house I just remove everything. Not sure how you hand over a smart house to a new owner.

#9

Thanks for sharing your idea, I am very interested in it.

Are you still satisfied with that solution?

Can you please share more details for begginers like me. I am waiting for couple of shellys I’ve recently ordered and this looks like great use case for them. I love my smart bulbs in my HA setup, but I still need to have good old dumb switches because some of my family members are not comfortable enough with using Google Home or phone. And they are regulary killing my automations… :slight_smile:

Do you have maybe wiring diagram for that particular use case?

Why did you use custom firmware? Can it be done with factory firmware and local only (mqtt) option?

#10

I am satisfied with solution. I have also some sonoff touch switches that I had them before i knew about shelly. Too lazy to change them but they do have the advantage I can make some use of double and triple clicks combination to trigger automations. You can have long and double click with shelly but you need to change the press switch for a momentary, like a bell pres.

That level of customization, making the esp device have self control is not possible with shelly stock firmware and is pita to do it with tasmota.
But you can use the stock firmware to detach the switch input (button) from the relay. So you can have the press show in ha via mqtt, then via ha turn on your smart light.
If ha is down, or the smart light is not responding then it doesn’t work.

As for wiring you can find plenty of info from shelly. ATM don’t have any testing device to show. Also look in their Facebook page and tasmota wiki.

1 Like
#11

Thank you so much for yor time!

It is now clrearer to me what can I achieve with Shelly… It would be great to have network proof solution like yours, but I am still not comfortable with flashing things, so I will try detached mode with stock firmware.

#12

replacing bulbs with smart bulbs doesn’t make sense (spend money on LED lights) … as there are many bulbs per switch … change your switches … it’s without question the most valuable home automation improvement i’ve done and i have every possible automation device, display etc

i use insteon and control the lights with an UDI ISY994i - this controller interfaces with my HA controller so light states etc are relayed to my ha displays and phone … with insteon scenes etc are locally programmed by the UDI controller so if it does gown all light scenes continue however program etc won’t … i have over a 150 light switches, fountains, garage door, door switches etc in my home using insteon and UDI both indoor and outdoor that have worked flawlessly for over 5 years

#13

It makes sense if you want to do more than switch the lights on and off, e.g. control the colour.

#14

As above. Just replace the switch plate with a blanking plate.

Sorted!

#15

I have made my own switches in my sockets with a relay and esp8266’s. I live in Holland where I do not have a neutral wire available but I have pulled the extra wire trough at multiple sockets now. I use touch chips and blind plates so I can manually turn on the light and also from my smartphone via ha. The red from the touch sensor looks super bright but in real life you see close to nothing. A perfect guidance when it is dark so you can turn on the light. Works like a treat and blends in perfectly in my interior.

1 Like