@Andrea_Errico, the comments by @Toro_Blanco are correct, your void loop isn’t compatible with Blynk.
I didn’t pay attention to the state of your void loop earlier - I was trying to work-out what you were doing with the button that you’d said was connected to D6, which eventually turned-out to be a typo by you.
You should read this:
http://help.blynk.cc/getting-started-library-auth-token-code-examples/blynk-basics/keep-your-void-loop-clean
and restructure your void loop to remove the call to ina219values()
- replacing it with a timer instead, and remove the delay.
I’d also remove the digitalWrite to your two LEDs if I were you.
When you move to virtual pins, you’ll need to do a pinMode declaration for the relays. I’d also recommend using GPIO pin references throughout, instead of this type of reference:
#define greenLED D7
#define redLED D8
with GPIO references, for a NodeMCU, this would look like this:
#define greenLED 13 // Pin D7 on the NodeMCU
#define redLED 15 // Pin D8 on the NodeMCU
You should also read this, to ensure that you choose appropriate GPIO pins:
Pete.