I have a cat flap
With 2 reed switches and a magnet which detects whether the cat has gone out or come in.
I had to use interrupts to capture the brief signal and some other stuff so I correctly detected the cats direction ( the door swings back and forth after it's operated firing both switches ).
So not really a beginners project , but there's a lot to be learnt with a book and the examples along the way .
( I did get it to "tweet" too , but that was a pain ).
As it's a Dog , could you not train her to operate a switch before she goes out and in ?