Building new house - looking at room/fan switches for HA

Like most of smart switches do. Someone should make definition, what does it mean “without controller”. Without microcontroller?

The OP was looking for a momentary switch, AKA Button that would work without Home Assistant or WiFi running. I replied that this is not possible. There has to be something to detect and respond to the button press.

In Home Assistant it is never necessary to buy a proprietary hub.

I have a “Phillips_NoT” SSID for anything I want blocked from the internet (pretty much just my kasa switches), a “Phillips_IoT” for all other smart devices, and “Phillips WiFi” for general use.

Yes, the 12v power supply, ESP32, and optocoupler are all close to each other in the mechanical room. The ESP and Optocoupler are mounted to the same 3D printed mount. one 12V power supply hooks to each optocoupler and sends power to 16 sensors. I’m using basic 22/2 wire between the optocoupler and the sensor. The optocoupler has a + and - terminal for each of the 16 “channels”. I feed the + from the 12v supply direct to the optocoupler. The - from the 12v supply follows 22/2 wire from the power supply to the sensor and back to the - terminal on the optocoupler. Door opens, the circuit is complete, the optocoupler gets a 12v signal and the ESP32 sees it. The ESP32 is running ESPHome, sample configuration is below.

esphome:
  name: binary_sensor_board_1
  platform: ESP32
  board: nodemcu-32s

wifi:
  ssid: "Phillips_IoT"
  password: "XXXXXXXX"
  #Static IP
  manual_ip:
    static_ip: 192.168.1.101
    gateway: 192.168.1.1
    subnet: 255.255.255.0
  #Turn Off Power Save Mode
  power_save_mode: none
  fast_connect: on

  # Enable fallback hotspot (captive portal) in case wifi connection fails
  ap:
    ssid: "binary-sensor-board-1"
    password: "XXXXXXXXX"

captive_portal:

# Enable logging
logger:

# Enable Home Assistant API
api:

ota:
 - platform: esphome

binary_sensor:
#Terminal 1
  - platform: gpio
    pin: 
      number: GPIO23
      mode: INPUT_PULLUP
    name: "Kassidys Door"
    device_class: door
#Terminal 2
  - platform: gpio
    pin: 
      number: GPIO22
      mode: INPUT_PULLUP
    name: "Front Door"
    device_class: door
#Terminal 3
  - platform: gpio
    pin: 
      number: GPIO21
      mode: INPUT_PULLUP
    name: "Toy Room Door"
    device_class: door
#Terminal 4
  - platform: gpio
    pin: 
      number: GPIO19
      mode: INPUT_PULLUP
    name: "Office Door"
    device_class: door
#Terminal 5
  - platform: gpio
    pin: 
      number: GPIO18
      mode: INPUT_PULLUP
    name: "Garage Closet Door"
    device_class: door
#Terminal 6
  - platform: gpio
    pin: 
      number: GPIO5
      mode: INPUT_PULLUP
    name: "Garage Entry Door"
    device_class: door
#Terminal 7
  - platform: gpio
    pin: 
      number: GPIO17
      mode: INPUT_PULLUP
    name: "Mud Room Laundry Door"
    device_class: door
#Terminal 8
  - platform: gpio
    pin: 
      number: GPIO16
      mode: INPUT_PULLUP
    name: "Grocery Door"
    device_class: door
#Terminal 9
  - platform: gpio
    pin: 
      number: GPIO32
      mode: INPUT_PULLUP
    name: "Garage Service Door"
    device_class: door
#Terminal 10
  - platform: gpio
    pin: 
      number: GPIO33
      mode: INPUT_PULLUP
    name: "Powder Bath Door"
    device_class: door
#Terminal 11
  - platform: gpio
    pin: 
      number: GPIO25
      mode: INPUT_PULLUP
    name: "Kids Toilet Door"
    device_class: door
#Terminal 12
  - platform: gpio
    pin: 
      number: GPIO26
      mode: INPUT_PULLUP
    name: "Kids Bathroom Door"
    device_class: door
#Terminal 13
  - platform: gpio
    pin: 
      number: GPIO27
      mode: INPUT_PULLUP
    name: "upstairs Guest Closet"
    device_class: door
#Terminal 14
  - platform: gpio
    pin: 
      number: GPIO14
      mode: INPUT_PULLUP
    name: "upstairs Guest room Door"
    device_class: door
#Terminal 15
  - platform: gpio
    pin: 
      number: GPIO04
      mode: INPUT_PULLUP
    name: "Beyer Closet Door"
    device_class: door
#Terminal 16
  - platform: gpio
    pin: 
      number: GPIO13
      mode: INPUT_PULLUP
    name: "Beyer Door"
    device_class: door

#ESPhome restart
switch:
  - platform: restart
    name: "Binary Sensor Board 1 Restart"

I have a few temp/humidity sensors. Those are either Xiamoi Bluetooth sensors (I have a couple ESPHome based BLE proxies around the house) or I use the Aqara temp/humidity sensors.

I use ESPSomfy RTS for my Somfy roller shades

That’s what common smart switch does if button is hardwired.

I don’t follow what you are saying here, but I think you are misunderstanding what the OP asked for.

Yes, a smart switch can have a satellite 3-way switch that is a momentary switch. I have a few of them. But the only thing the satellite switch can control without Home Assistant is the device connected to the smart switch.

Do you understand what a “momentary” switch is? The connection only exists while the button is pressed. Take your finger away and the circuit opens.

I don’t follow you either, all I say is that if common smart switch loose connection to wifi and/or home assistant, it continues to operate and hard wired external momentary switch connected works equally without wifi/HA as long as there is electricity… There might be some Sinhuipinghoo switches that die when wifi is off, I don’t have experience with them…

We are mixing up terms here. I have a few Z-wave switches wired as 3-way (US terminology). They work whether Home Assistant is online or WiFi is down.

The OP asked for a momentary switch to do things:

What he asked for is not possible.

What you are describing is a smart switch hard-wired to a lamp. An overhead light. A wall outlet.

For example, a double tap on my Z-Wave switch will dim the room lights, turn on the hallway light and turn on the television. The hallway light and the television are not hardwired to the switch and thus need Home Assistant to be controlled. But if Home Assistant is down, the overhead lights will still work.

I could be reading too much into the OPs request; confused when he said “momentary”.

1 Like

Yes, I understand. The paddle on the Kasa light switch is momentary. You press it and it returns to its original position

Smart switch(MCU controlled relay) hard wired to a lamp and a “dumb” physical momentary switch hard wired to that smart switch. To be clear…

And I think it’s the best way to go. For example if you have a light that needs to have 3 physical switches around a room, that’s the most simple(wiring) and economic solution. One smart+3"dumbs".
Also using “dumb” switches gives you more options design-wise.
And if some of your smart switches get broken after ten years and that brand/model is not available anymore, you don’t have to replace your physical switches with aesthetically different ones.

Wow. You guys really dig into this. It’s fantastic.

My original thought is that first. if there is no electricity… nothing works, so there’s that.

Momentary Switch, AKA logic switch)
Next if I have a momentary switch, one that I push it has a microcontroller in the switch, which makes it “smart”, I guess. If I press that momentary switch then the light turns on, off, based on the prior condition.

Toggle switch:
If I have an old school toggle ON/OFF (up/on, down/off) switch, then if I leave that switch in the off position, I won’t be able to use automation of the switch because the circuit is open.

I think I need a momentary switch because it gives me the option of turning a given light on or off from the wall switch without HA or any other external control mechanism but it does not preclude me from changing state of a switch with HA, or Node-Red, or MQTT topic, or a remote control with appropriate automation.

Maybe a smart switch is actually internally a momentary switch?

The primary directive is to have wall switches that turn lights on/off directly from the wall switch even if there i no active automation running.

I suppose I could decide to centralize everything. Push the switch, signal goes to HA, HA gets the signal and routes the turn on request to the very switch from which it originated.

Because we’re going to be off grid, there will be times when I need to cut back consumption and it might mean turning off my home lab and automations therein. Still want to turn a light on or off at the wall switch
.
The kinds of automations I plan to use which are associated with lighting, might include:

  • turn all lights in the house, off. Or on in an emergency.
  • motion sensors detect no motion and turn off lights in a room or on when motion is detected.
  • under bed night lights come on when motion is detected and its dark
  • scheduled colored lights for golden hour, red lights after 2am to tell me it’s time to sleep because I often stay up too late working on homelabs, and home automation.
  • turn of the cymbal monkey (controlled with tasmota on d1-mini) as an alarm condition.

So I’ve seen recommendations on hardwired sensors, wifi switches, zwave, Zooz Z-Wave switches, TP-Link Kasa, ESP32, never enough ethernet, or conduit to carry it, no smart bulbs (but I might use programmable multi-color LED bulbs), daikin/midea mini-splits for HA control, use Shelly and convert those to momentary… What is one to make of all that?

Thanks for all your generous responses…

No. That way if your HA or wifi is down, you are without lights.

Push a dumb switch. Signal goes to smart relay aka “smart switch” which is connected to HA, to turn lights on/off. It might be programmed to have schedules as well or automatic delays or whatever automations. So you set these automations in HA, but once set they can act standalone if you loose connection.

So there are 3 separate components: Dumb switch, smart relay and dumb bulb.

2 Likes