If cost is an issue, take a look at Wyze. You can get a camera for $20 and then add a sensor pack that includes 2 contact sensors and a motion sensor for another $6. It isn’t cheap crap either. The camera offers good video quality and the sensors work well too. If you don’t want your video going through Wyze, they have a RTSP firmware available as well. The only drawback is that there is no battery option available.