I guess a ghost is a more exciting answer than an electronic device!

I finally figured out that (sometimes) when Gracie barks, it is directed at the front door which has beveled glass. The headlights from cars coming down the street or even a few streets over in our neighborhood can shine through the beveled glass and I'm sure it looks strange to her.