Skip to content

Light on for 5 minutes only on door open

You are here:

If you have a light nearby a door which leads you to outside you might want to automate it. Let’s say you want the light to turn on 5 minutes when you opened the door. You can manage that with a Sonoff Tx set to inching with 5 minutes and trigger it by a scenes which got triggered by a doorsensor. But what if you want to be able to manually turn the light on longer then 5 minutes? This tutorial explains how to do it.

Necessities

Fot this tutorial you need:

  • A device to operate the light. E.g. a Sonoff Tx (built-in into the wall) or a Sonoff S26 (if you have a light with a wire and a plug).
  • A door/window sensor (e.g a Sonoff DW or a RF 433 Mhz doorsensor in combination with the SonoffRF bridge)
  • A second eWeLink supported plug / switch that will act asa dummy.

Device settings

Device that operates the light

You can setup this device almost as you normally would do except that you need to leave inching disabled on this device.

Door/window sensor

You can setup this device as you normally would do.

A second eWeLink supported plug / switch

You need to setup inching to 300 seconds (5 minutes). You also might want to think about what to do on main power disruptions. You can set the Power-on State to On if you have set the device to operate the light to that same setting. In that case when the power came back after a main power disruption the light will be lit for 5 minutes too.

Scenes

Door open scene

This scene will be triggered by opening the door.

Instructions:

  1. Create a new scene.
    1. Tap Add below If. This will be the trigger.
      1. Choose Smart Device.
      2. Choose the doorsensor (or the correct RF alarm when it is a RF doorsensor).
      3. Choose Door sensor open (when it is a WiFi doorsensor).
      4. Tap Save.
    2. Tap Add below Then. This will contain the actions to be performed.
      1. Choose Smart Device.
      2. Choose the device to which the light is attached.
      3. Choose ON.
      4. Tap Save.
      5. Tap the + sign at the right of Then.
      6. Tap Smart device.
      7. Choose the device that will act as a dummy device as described above on this tutorial.
      8. Tap ON.
      9. Tap Save.
  2. Now tap Save again to save the scene.

Light off after 5 minutes scene

This scene will be triggered by turning off the dummy device which has its inching set to 5 minutes.

Instructions:

  1. Create a new scene.
    1. Tap Add below If. This will be the trigger.
      1. Choose Smart Device.
      2. Choose the device that will act as a dummy device as described above on this tutorial.
      3. Tap OFF.
      4. Tap Save.
    2. Tap Add below Then. This will contain the action to be performed.
      1. Choose Smart Device.
      2. Choose the device to which the light is attached.
      3. Choose OFF.
      4. Tap Save.
  2. Now tap Save again to save the scene.

You are ready

Now you are ready. You should now be able to operate the light manually (without having the light turning off after 5 minutes) and it automatically turns off after 5 minutes when the door got opened.

While nothing has to be connected to the dummy device you ofcourse can connect adevice to it. For example: you can connect a second light what lights a spot for 5 minutes.

In case you think there is an error in a Knowledge Base article, there is something missing or when you have an idea for a new Knowledge Base article please contact us on our Contact form!

If you refer to an existing Knowledge Base article please include the link to the article involved!

Table of Contents
%d bloggers like this: