Wanted to share my version of this Motion Based Light Except when Manually turned on. The issue into my garage is that opening the door would not trigger the PIR Motion as PIR requires temp change and the door swinging does not provide this. Only until I was physically in the garage and the PIR sensor saw me would it trigger the light. Since there is an ~1 sec delay or so before the light turns on, my wife (and I as well) were complaining we would be 3-4 feet into the garage before the light comes on. Anyone else with this frustration on motion based triggering?
So I added a door contact sensor as well that would turn the light on when the door opens. I still wanted the motion to kick in too and wanted the motion to override the door contact if I closed the door and stayed in the garage for some time or walked in through the actual garage door. Sounds relatively easy but it took a couple of days of playing with the piston to get it right. And what if someone opened the door, changed their mind, and closed it again without entering the garage and without triggering the motion? wanted it to shut the light off in this case immediately. This essentially covers any scenario and triggers the light initially by the door so that there is light when we step into the garage but also keeps it on if the door shuts and we spend time in there.