blynkkk / blynk_Issues

6 stars 6 forks source link

LED color setting (from sketch) problems #176

Open thorathome opened 3 years ago

thorathome commented 3 years ago

Hi. I use Blynk LED widgets, blinking them on and off using a timer to show a heartbeat from my devices.

#define HEARTBEAT_COLOR "#D3435C" // red
#define HEARTBEAT_VPIN V29
Blynk.setProperty  ( HEARTBEAT_VPIN, "label", "Working" ); // this does not work
Blynk.setProperty  ( HEARTBEAT_VPIN, "color", HEARTBEAT_COLOR ); 
Blynk.virtualWrite ( HEARTBEAT_VPIN, 150 ); // or Zero

I observe that the LED widgets do not operate consistently, often start working only when I manually set the LED color from the tile, but not always. This applies to "color", "label", and value. I see this behavior on iOS and on Android. Sometimes they work, sometimes they do not. When I put a Value Display widget in on the dame datastream, it shows the correct values. The LED stays off.

Any suggestions for me?

alexkipar commented 3 years ago

@thorathome Do you have a V29 data stream on the webdash in the template of this device? Which value type is it using?

thorathome commented 3 years ago

Yes, thanks, I do.

The web dash widget was initially set as a Label. I also tried setting it as a Slider. Either way, the correct values show on the web.

Suggestions?

alexkipar commented 3 years ago

@thorathome what's the setup of your datastream: it's min/max and type?

thorathome commented 3 years ago

It's set up as an Integer 0-255.

One thing I have noticed... I have 14 Datastreams numbered 1-4 and 6-15. I deleted number 5 after initially creating them, then added the last one numbered 15, also the same Datastream we are writing about. So we have a gap in Datastream IDs, number 5, and a last Datastream added, number 15.

I also notice that when I add any widget for Datastream 15, Integer -255, the LED widgets in the same Tile stop working on iOS. When I remove the widget for Datastream 15, the LEDs all seem to work on iOS. When I add a Value Display for Datastream 15, it works, but still causes the Android Tile to fail with the Parsing error I noted.

When I have a moment, I will create a totally new Template, Device and Tile running the same code to see if it works any better.

Hope this is helpful.

alexkipar commented 3 years ago

@thorathome, We had found the cause for that parsing error, looks like you had some set property call on that datastream in the wrong format. Soon it will be fixed.

thorathome commented 3 years ago

Thanks for fixing this. The Blynk 2.0 System is getting more reliable day by day. I am submitting another Issue on Android LED behavior...

Thanks, all. Enjoying the power of the new Blynk server-side logic.