Indoor and outdoor motion detector activate the same lamp
Use case
Your customer would like to activate the same lamp with both an indoor and an outdoor motion detector. Every movement detected by one of the detectors will switch on the lamp for 1 minute, independent of the current lamp status.
E.g.
- Movement is detected by the outdoor motion detector. The lamp is switched on for 1 minute.
- 59 seconds later a new movement is detected by the indoor motion detector. The lamp is again activated for 1 minute.
- The following minute no new movement is detected. The lamp is finally turned off. In total the lamp was activated for 1 min 59 sec.
Procedure
Creating the controls and the devices
- Create an indoor motion detector (DET1).
- Create an outdoor motion detector (DET2).
- Create a lamp (LAMP1).
- Create the virtual devices (VIRT1 and VIRT2).
Creating the routines
- Create a routine Motion detection with indoor detector(s) (ROUT1).
- Configure the following behaviour:
- master detector that initiates the routine: indoor motion detector (DET1)
- device that is switched on when the routine is started: VIRT1: Value = true
- Set the parameter switch-off delay to 1 min
- Configure the following behaviour:
- Create a routine Motion detection with outdoor detector(s) (ROUT2).
- Configure the following behaviour:
- master detector that initiates the routine: outdoor motion detector (DET2)
- device that is switched on when the routine is started:VIRT2: Value = true
- Set the parameter switch-off delay to 1 min
- Configure the following behaviour:
Creating the condition
Create a condition (COND1) for turning on the lamp when one of the detectors detects movement. Use the following logic:
- IF (ROUT1: State = motion detected + switch-off delay) or (ROUT2: State = motion detected + switch-off delay)
- THEN LAMP1: Value = on
- ELSE LAMP1: Value = off
The switch-off delay parameter that is set on the motion detectors makes sure that the condition is "true" for 1 minute. In this way the lamp is only turned off when both detectors don't detect any movement for at least 1 minute.
Filling the cabinet and addressing the device
Fill the cabinet with ... | and address the following device ... |
---|---|
a switching module (3x) 2U (MOD1) | lamp LAMP1. |
Example
Click here to download the programming example (nhc2 file).