You have a 10 minute interval timer using BlynkTimer.
Each time activity is detected (a BLYNK_WRITE(vPin) is triggered) you reset the interval timer to give another 10 minutes.
If no activity for 10 minutes then the function named in the timer will be called, and you do your idle routine.