Button Timeout Limit

When using the Button widget to act as a momentary switch with the new Blynk 2.0 is there a timeout or time limit on it? I moved one project from Legacy Blynk to new Blynk 2.0 and now when I push the button it is only On (or 1) for about 10 seconds and then turns off.
It triggers a relay on that runs a water pump to fill a water reservoir. Before I could hold it down for a few minutes and would continue to run until I let go. Now it only runs for about 10 seconds. So I have to keep pressing and holding the button over and over.

Use the button mode as switch. This way you need not keep pressing the button. Once the water fills you can just turn it off. If you r good at coding then you can program for single click, double click or tripple click and accordingly set timeout like 1min 2min and 3min.

In your explanation i can understand that you want the total control. So easy way is to change the button mode to switch.

No.

Do you manually hold the button?

Yes, I manually hold the button. I can confirm that this issue exists using Android and iOS and with several different boards. The old Blynk does not have this issue.

It was suggested by someone else to just use a switch but that really does not work well for this project for a number of reasons. A momentary button works best.

Thanks and that does work. However, a momentary button has proven to work best for this particular project over time. I have had cases where the microcontroller lost connection with the cloud while it was switched on. That resulted in the water overflowing.

@timgtech please post here the button settings

So if you have trouble with connectivity then you will have to install some sensor to turn off the motor after the tank is full. The moment internet goes down while you are still holding the button on the app !! It still latches until the connection is back(depends on coding).

We use IOT to automate things and make things easier in life. But having human intervention is again a task and it is not much effective way.

I want to be able to watch the water level and have control of when to stop it. Old Blynk the momentary button worked great for this.

It is not loss of connectivity. It is that the button stops working after 10 seconds.

I think @Madhukesh was talking about this…

Pete.

I used to have a problem long ago in the past but not now. I have not had any issues with connectivity in a very long time. The problem is that the button is not behaving the same way in the new Blynk as the old Blynk.

But the suggestion to have an automatic cut-out to prevent an overflow is still a valid one.

Pete.

@Dmitriy here is the code…

#define BLYNK_TEMPLATE_ID "TMPLxxxxjS3o"
// #define BLYNK_DEVICE_NAME "myDEVICE"
#include <blynk.h>

char auth[] = "LWL_rATQBT6NtQxxxxxxxxxxxxsBdv81";



void setup()
{
    
    pinMode(D7,OUTPUT);
    
    Blynk.begin(auth);
}

void loop()
{
  Blynk.run();
  
}

BLYNK_WRITE(V0)
{
   if(param.asInt() == 1)
  {
    // execute this code if the switch widget is now ON
    digitalWrite(D7,HIGH);  // Set digital pin  HIGH
  }
  else
  {
    // execute this code if the switch widget is now OFF
    digitalWrite(D7,LOW);  // Set digital pin LOW
    
  }
}

No argument there. But I have never needed one in the past being I am watching it fill. I have to be able to stop it at different intervals that are random. So I really can not just put a sensor to cut off when it is full. I am not always filling to to full capacity.

Exactly what board is this code for?
It seems odd that you have no board-specific Blynk library, just blynk.h

Pete.

Right at the moment I am using a Particle Argon. As I have learned from vshymanskyy the library really is not board specific and you can do it this way with just about any board. I was however using an Adafruit Feather Huzzah8266 which I was using the ESP8266 example with Blynk.Edgent. That had the same results with the momentary button going out after about 10 seconds. Both of these boards are what I was doing the same exact thing with on the old Blynk. With the exception that I was able directly use the digital pin instead of using a virtual pin. I am pretty sure that has nothing to do with it though.

I have a few pushbuttons in my pond project using Node Red and Blynk, i’ll test tomorrow (at work now) if the same thing happens with my pushbuttons.

1 Like

Actually holding down the button on the app is like pinging blynk server like 100’s of time per second. I think its limited to 10 requests or writes per second. May be thats the reason it turns off after few seconds due to flooding. Just a guess.

2 Likes

I think so :stuck_out_tongue_winking_eye:

1 Like