I considered this but we already have fancy light switches with motion detectors in our bathrooms and our company is strict about leaving the doors open when you leave so that hasn't been a problem. An added bonus of this is that if the last person is leaving and about to lock up they can see if a bathroom door is closed and check to make sure no one is still in there, where as the light could still be on.
The ATMega328P is pretty low power. I could probably save a bit more with a smaller more targeted MCU, but I wanted this board to be as close to the Arduino Uno as possible. I'm not sure what you mean by a central server. It's possible to use an ATTiny series chip to sense the reed switches and transmit to the nRF24 board.
Cool, there probably isn't a huge difference between idle and deep sleep modes so I'm sure it could still last a long time. In deep sleep you can still use the HIGH & LOW level interrupts but just not the CHANGE one.
I totally agree. There are definitely some more things like this that I could have done to reduce power further and use normal external interrupts. I was going for more of a general purpose sensor board though and wanted to keep it minimal. I could also have used the HIGH and LOW level interrupts on those pins and just change which it triggers on every time it triggered. But I decided to go with the WDT.
Great to see others are doing this too! I like your solution, very cool. I have some of those digispark boards but decided to go in a different direction making a standalone sensor board that transmits its sensor data to a hub for pushing to the cloud. There are tons of ways this could be done. The way I describe here worked best for us and achieved my goals for it.
I used the WDT to make a platform for sensing any sensor in second intervals. Using the reed switches as external interrupts would have been specific to this application. Also, the ATMega328P doesn't allow you to set the interrupt to fire on CHANGE when using the lowest power mode.
For a door opening and closing a 1 second delay is fine. If it misses an event with that delay then it was probably a fluke. Think of it as a buffer to prevent false readings.