So I'm looking for a very specific product that I'm not sure what it's called. Basically I want to track every time a door was open and have a toggle to play a specific sound. So if it was off it would simply log every time a door was opened. If it was on it would log but also play an alarm sound. I'm not looking for a cheap alarm system, it's meant to be a deterrent to signal "Stop, you shouldn't be in this room". I'm also looking for something that's an easy install. I assume the easiest way would be to have a magnet or something that detects when it's touching the other side of the door or not. If it's not touching that means the door is open and if it is that means it's closed. Not even sure a product like this exists. And no, using a lock isn't allowed in this situation. Anyone know a product like this?
Edit: I'm pretty much aware this'll have to be a "smart" device. If it helps, I have a raspberry pi which I could potentially run home assistant off of? I've hardly got any smart home devices in the first place so I'm not sure what the best brands are