No VPN or exposing ports necessary.
For smart home deployments, there are a lot of ways to track the presence of individuals in a room. There are motion detection sensors that use mmWave and PIR, and you can also use simple detection ...
Unboxing Elektor’s ESP32 by Example Learning Course: book, boards, sensors, and a quick look at what the Academy Pro modules cover.