HELP, can't turn off button when pressed Virtual button

Hii all , i’m new in blynk and have a problem with my project.

when me press “OFF ALL” button, button in LAMP 1 - LAMP 3 keep turn on,
how me to solve this problem ?

#define BLYNK_PRINT Serial
#include <ESP8266WiFi.h>
#include <BlynkSimpleEsp8266.h>
#define Relay1 D2
#define Relay2 D3
#define Relay3 D4
char auth = “xxx”;
char ssid = “tux”;
char pass = “qwertyui”;
digitalWrite(Relay1, HIGH);
digitalWrite(Relay2, HIGH);
digitalWrite(Relay3, HIGH);
digitalWrite(Relay1, LOW);
digitalWrite(Relay2, LOW);
digitalWrite(Relay3, LOW);
void setup() {
Blynk.begin(auth, ssid, pass);
void loop()

D4 which is really GPIO 2 is special, switch to D1 which is GPIO 5.

this problem only in app blynk , when press Virtual button , button in PWM / digital can’t turn off

The relays turn OFF, but the APP Buttons stay ON?

yes ,
i want use Blynk.setProperty but in docs only for Virtual button ,
im use Digital button / PWM for relay :frowning:

Blynk.setProperty is for changing labels and colors. It doesn’t do anything to the button state. I suggest you read through the DOCs and check out some examples (see sync physical button example). You need a better understanding of how BLYNK and its commands work. Even if I told you what command to use (it is Blynk.virtualWrite(Vpin, value); by the way), you probably wouldn’t know how to make it work without doing some research first.

1 Like

how to set properties on Digitial button ?
in this case , i want to disable Digital button with Virtual button :frowning:

Please don’t tack “how toos” onto old and unrelated topics.

Or create two separate topics for similar issues

I moved your posts into a this topic

You can’t… only on virtual pins.

As per the Documents…

NOTE : Changing these parameters work only for widgets attached to Virtual pins (analog/digital pins won’t work).

Use a Blynk Function like BLYNK_WRITE(vPIN) to create a logic flag, then you would then use with if() logic when responding to your physical button…

E.g. When physical button pushed AND flag = 1 do whatever the button is supposed to do. but if flag = 0 then do not do anything.