BLYNK
BLYNK.IO       📲 GETTING STARTED       📗 DOCS       ❓HELP CENTER       👉 SKETCH BUILDER

How to restore a widget Label to Template after using HTTP GET "&label=...."

I think this is a Bug.

Seems like after setting a Widget (or PIN really) LABEL thru HTTP API, you cant reset the LABEL to whatever the Template says.

The following command:
´´´
https://blynk.cloud/external/api/update/property?
token=r1isS0…rm&pin=v10&label=Temperature
´´´
is documented to set the LABEL of a WIDGET to Temperature. But it really sets the LABEL of ALL widgets using V10. Fair enough.

But I cant find any way to restore or reset the Label value. And this is the bug.

I have several widgets using V10. Some labeled “Temp”, some “Temperature” and some “Temperature (AVG)”.
Problem is. Now when i have used the command ALL widgets use the same LABEL - i don’t want that.
But there seems to be no way to reset to the values defined in the Template. I am now stuck with a LABEL text i have defined via HTTP API, but Templates have different texts. I have tried to edit and save Templates, tried to logout-login, created new widgets from scratch, but nothing restores my LABEL text to what the Template says.

  • There seems to be no way to restore a LABEL text again after using the HTTP API command.
    The LABEL text once set with HTTP API command is now always used and cannot be changed by Template edits … (And it cannot be seen in any edit views etc).

Either something I don’t understand or a bug.

You can “delete device data”. Open required device on web or mobile find “Actions menu” and click on “Erase Data”.

But yeah, setProperty sets the datastream value, not the widget value. So every widget that uses that datastream will inherit the value from the datastream property.

Ok Dmitriy,

Erase Data is a “last way” as that will … erase all collected data. No nice.

  • Is there no way to “reset” the setProperty value once set?
    I tried with “&label=” (empty field), but this did not help.

No. But this is good thing to add. As quick workaround you can change create the new datastream and assign widgets to it.

I created internal ticket. most likely we’ll extend the “Erase data” to bigger menu with additional options.

@Dmitriy you may also want to look at this issue, which sounds like it’s related…

I raised this issue in June and it’s not had any actions assigned to it yet.

Pete.

Ok Dmitriy
Thanks for the help.
Jonas

Yes. The same issue. I think we’ll extend the “Erase data” dialog to support multiple options for erasing. For now, I think this should fix both issues.

1 Like