BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       👉 SKETCH BUILDER

Suddenly all buttons state has been changed automatically

Hello,
Everything was just working good untill last week as the relay/button state automatically changed like the ON state was to OFF Condition and the other is the opposite.
So if I turn the Relay on in app, Physically relay would turned off and when I turn off in the App/pc the Relay will be turned on.

I changed the state in Data stream but that doesn’t reflect or work here. It was working fine the before day Night and no one Has done anything. By next day morning when I tried to turn on it doesn’t on and the relay energised after I turned off.

Did you update your module? Or did any changes in the app ?

See if anyone has touched these settings in the blynk app.

Sounds like it might be related to this issue…

Personally, I don’t solve this type of problem by flipping the min/max values for the widget. Instead, I’ll do something like this…

If you have a relay that is active LOW (it is energised when the pin is pulled LOW rather than HIGH) and you want to control it via a widget switch attached to pin V0 then I’ll do this…

BLYNK_WRITE(V0)
{
  int widget_state - param.asInt();
  digitalWrite(realy_pin, !widget_state);
}

the exclamation mark symbol (!) before widget_state tells the code to do a logical NOT operation on the value. That sounds complicated, but basically it just flips the value, turning a 1 into a 0 and a 0 into a 1.
So, when the switch widget sends a 1 value when the button is pressed and in the on position, you send a 0 to the relay, which will energise it.

Pete.

Yeah I have Tried everything, Changed in Data stream and manually also but nothing changed.

Constantly it is doing the same thing.