Try putting in a window of iron bars, with the camera close to the wall the door sits on. Then position it to see 54 degrees on either side of the bars. That way it opens when you approach if you are inside or outside.
I've been playing on a well populated server and at the end of every horde night the mods spawn in about 30 demo men every minute or so for us to run from. We all fight in a trader protected fort but often times 3 or 4 players will completely murder the whole lot of demo men before any can go boom.