very much shorter version with only basic functionality.
Detects and reports opening and closing of a window/door. Nexts step is to allow for external configuration (e.g. standard mode with one reed contact versus multi-contact mode to detect tilting of a window/door).