You need to format any posted code… as per the directions…
Meanwhile your void loop() should only contain the basics like blynk.run() while you put your sensor/relay/etc. controls in separate functions… some with a timed loop using BlynkTimer as nessesary.
I recommend you read through the Documentation & Help Center and try out the examples in the Sketch Builder (all these links are also at the top of this page) to get a good understanding of how programming with Blynk works…
e.g.
BLYNK_WRITE(V0) // Button Widget in SWITCH mode
{
int value = param.asInt(); // Get value as integer
digitalWrite( 2 , value ); // control GPIO with value
}