Yes my DH could do that for you. You need an old burglar alarm room sensor. He is currently rigging something up like this to check that I do move away from my laptop at some point when I am at home with the children.
We tried one of those sonic deterrents - my son couldn't bear the noise, it made my ears feel like they were under pressure... and next door's cats came and rubbed themselves up against it. It went back to the garden centre. Curiously, have seen little of them since I sprayed the flower beds with an anti-soiling spray (it confuses their sense of smell) and took to hissing at them. The hissing requires a degree of aggression to make them run away - my daughter can't quite manage it!
I think you may have to lend me one of your dogs, Freya to give mine a quick refresher in how dogs should guard the family home....rather then snoring in the family bed.