I found these littleon Amazon (you may be able to find similar locally) which are designed for pranking friends and family. They have a 5 inch pull string on each side of a 1.5 inch charge; You rig them on anything that opens such as doors, windows and draws to prank people when they open them… I haven’t tried these myself, but providing they work, it appears to me that they can also be used for security purposes to set door/window alarms and perimeter tripwire alarms.
You attach one string to the door/window frame and the other to the door/window itself. When the door/window is pushed open it pulls the firework in a similar way to a Christmas cracker and it goes bang and omits a 80 decibel bang! You can buy a 12 pack of these pull string fireworks from Amazon for just $2.49 with free delivery.
These pull string fireworks could also be used with some fishing line to create a tripwire perimeter alarm when outdoors hiking, camping or if you’ve bugged-out to the wilderness. Simply tie one end of the trip wire to one of the strings, run your tripwire around the area you want to protect and simply tie the end of the wire to the other string on the firework.