LED widget updating issue for intermittent connected sensor

Hi Guys,

I have a low power application where the sensor device connects and sends data every 5min.
This works great using PUSH for Label or Value Display widgets for virtual pins combined with syncAll() however the LED widgets does seem to work the same way.

In the Blynk App (on the phone) I need to flip into edit mode and back into “run” mode for the LED to update its status correctly.

Anyone else experiences this ?

Thanks,
Serge

@ssozonoff, is it iOS or Android?

I also have problems updating the LED status. My setup is

  • Arduino Nano
  • HM-10 BLE
  • Android app

When I do virtualWrite (or using led.on() / led.off() ) I always see the “before last” value instead of the last value.
My workaround is to run 2 times the command (virtualWrite or led.on/off) and it works.
The strange thing is that I see on the debug-values that it is actually sending the data to the serial-connection. But I didn’t find the time yet to check if the problem is in the communication to the HM-10 module, or between HM-10 and Android app.

@BlynkAndroidDev, could you look into this?

I am testing under iOS.

Thanks,
Serge

@ssozonoff, you can enable #define BLYNK_DEBUG to see what’s going on…

Hi,

I will have a look when I get home.

Thanks,
Serge

BTW not sure what the debug on the sensor device has to do with it. The sensor is sending the data. The problem is that when I resume Blynk from background mode the LED widget is not updated with the correct value or not updated at all. A simple “stop” and “start” of the application updates the LED status correctly.

Serge

Well it seems that this behavior is now happening for all widgets :frowning: Even with PUSH mode for the values, when returning the iOS App from background I need to press stop and start to refresh the values :frowning:

I am running the latest versions of everything.

Thanks,
Serge

Here is a Video to illustrate the problem. You see that when Blynk App returns from background it does not update any values. When I go through a stop / start sequence then it refreshes the values correctly. All the values are set for “PUSH” mode.

Vimeo Video

Thanks,
Serge

Thanks, we will have a look.

Hello,
Any news on this?

I am experiencing exactly the same issue.

  • Android 6.0.1
  • Arduino Uno
  • latest version of the libraries

Everything works fine, but when I do:
BLYNK_READ(V3)
{
if (light < 50)
Blynk.virtualWrite(3, HIGH);
else
Blynk.virtualWrite(3, LOW);
return;
}
The LED associated to V3 never changes state, no matter what the value of the variable is.
I put a print inside the function and I never see any prints either so the routine is never called.
No push from the server, it seems.

If I stop the app, then the LED V3 gets updated!

Thanks!
-Paolo

You need to send 255, not HIGH.

Blynk.virtualWrite(3, 255);

Docs - http://docs.blynk.cc/#widgets-displays-led

1 Like

@Dmitriy can you confirm HIGH and LOW can be used if Blynkers add:

 #define HIGH 255
 #define LOW 0

HIGH and LOW is easier to understand for beginners rather than some arbitrary number.

Agree. That’s the reason why we added WidgetLED class. So you have to led.on(), led.off().

Should work.

Sorry @Dmitriy you were correct, obviously.
Typical RTFM on my side.
Everything works perfectly now :slight_smile:
Thanks again!
-Paolo

Looks like this is still not fixed :frowning: in the latest release of Blynk App