Skip to content

Staircase Circuit

Heinz Peter Hippenstiel edited this page May 10, 2017 · 4 revisions

ESPEasy as Staircase Circuit or Door Opener or ...

What you need is a ESP8266 module (the ESP01 is absolutely capable doing the job) and a relay. There are many 5V modules available from the Arduino world for around 1$/€ or less. To control them from an ESP8266 you need to do a little soldering since the ESP can't work directly with the 5V. The simpliest version I know of can bee found here. On the other hand you might look for 3.3V relay version but they are rather expensive. So before you get 3.3V version you might buy this thing that contains a relay and an ESP01 - you only need 5V power. For the Wemos D1 mini there are also cheap ready-to-use relay modules available. Make your choice.

In case you need to switch high-voltage you should think about using any of the Sonoff switching devices.

Steps for the setup:

Configure devices

Select the Hardware link and

  • set the Wifi Status Led: to GPIO-1 (D10)
  • deselect SDA: and SCL: since I2C is not needed
  • keep the rest as default

Select the Devices link and add two devices:

  • Device: Switch Input
    Name: Button
    1st GPIO: GPIO-3 (D9)
    Pull UP: (selected)
    Enabled: (selected)
    Value Name 1: State
  • Device: Switch Input
    Name: Relay
    1st GPIO: GPIO-2 (D4)
    Pull UP: (selected)
    Switch Button Type: Push Button Active Low
    Enabled: (selected)
    Value Name 1: State

For everything not listed use the default. The Enabled flag is maybe only in ESPEasy Mega.

Connect a button to GPIO-2 and GND and IN1 (or whatever the name of the input pin is) of the relay to GPIO-3. Connect the relay (NO/COM) to lights or a door opener depending on your needs. Timing is done in the rule.

Configure rules

Depending on the needs a relay need to be switched for a few seconds (door opener) or some minutes (staircase lights) but the handling is exactly the same. After a button is pressed (GPIO-2 to GND) the relay is triggered (GPIO-3 to GND) and after n-seconds it needs to be released.

See rule for an example rule. Use this rules and copy&paste them afer selecting the Rules link in ESPEasy (No link? See Configure ESPEasy basics).

Stichworte Deutsch

Treppenhausschaltung Kurzzeitschalter Türöffner Tastrelais Kurzzeittimer