eWeLink Community Knowledge Base
Light on for 5 minutes only on door open
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:
- Create a new scene.
- Tap
Add
belowIf
. This will be the trigger.- Choose
Smart Device
. - Choose the doorsensor (or the correct RF alarm when it is a RF doorsensor).
- Choose Door sensor open (when it is a WiFi doorsensor).
- Tap
Save
.
- Choose
- Tap
Add
belowThen
. This will contain the actions to be performed.- Choose
Smart Device
. - Choose the device to which the light is attached.
- Choose
ON
. - Tap
Save
. - Tap the
+
sign at the right ofThen
. - Tap
Smart device
. - Choose the device that will act as a dummy device as described above on this tutorial.
- Tap
ON
. - Tap
Save
.
- Choose
- Tap
- 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:
- Create a new scene.
- Tap
Add
below If. This will be the trigger.- Choose
Smart Device
. - Choose the device that will act as a dummy device as described above on this tutorial.
- Tap
OFF
. - Tap
Save
.
- Choose
- Tap
Add
belowThen
. This will contain the action to be performed.- Choose
Smart Device
. - Choose the device to which the light is attached.
- Choose
OFF
. - Tap
Save
.
- Choose
- Tap
- 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.