Peter, I think this gets you started: (It notifies only about open doors or windows, but that could be changed)