Scenario
We have a customer, lets call him 'Alex' who has a combination of LED and conventional lighting in his home. He has got switch plates with ultra-sensitive PIRs and buttons for 'Off' and 'Next' scene.
Request "When I come into a room, if the lights are off, I want the LED lighting to come on".
As with all customer requests, it seems simple at first, but actually the requirements look like:
- The Switch Plate should operate as expected at ALL times
- The LED lighting should only come on when it is DARK AND the WebBrick is at Scene 0
- The PIR should not operate if other lights are on
- The PIR should give an 'Exit' delay when the lights are switched off (otherwise the LED lighting comes on again immediately with the next movement)
- The solution should fail safe if the network is down
Assumptions
- The LED lights are configured on Scene 1
- The PIRs are hypersensitive 10m range 5V supply with 'float' and '5V' as idle and detected outputs
- There is a TTL digital out used as PIRDisable, with a 4.1K resistor to the output of the PIR (i.e when held high the PIR will not operate).
Configuration
- PIR output connected to digital in configured to ON Scene 1 on a rising edge (options=1)
- Scene 1 through Scene Max set the PIRDisable output high (therefore (1) above) cannot be retriggered
- Scene 0 is set to Ignore PIRDisable, therefore the PIR remains disabled when the lights are switched off
- The Gateway(HGA) detects the transition to Scene 0 (using the state of the 'Off' mimic)
- If isDark is true, then a delayed event is set to set the PIRDisable low in 'n' seconds (say 30), thus re-enabling the PIR
- If isDark is false then set PIRDisable high (its light so don't trigger)
- On transition from light->dark set PIRDisable(s) low
- On transition from dark->light set PIRDisable(s) high
For those of you with cunning minds (Mr Willet you know who you are!) I leave it to you to reply to this post with:
- Improvements
- The solution to switch off the lights under no movement in 'n' minutes
Happy WebBrick Building
Andy