WiFi-powered occupancy sensor