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

SetProperty http api

Hi,

I am trying to use SetProperty through the http api on blynk cloud. I saw that this feature was implemented in anoucemnents last month.

I couldn’t find any documentation, but after poking around on GitHub it looks like the http Put should look something like http://blynk-cloud.com/{token}/pin/{pin}/{property}. I’ve been trying http://blynk-cloud.com/{token}/pin/v77/label but I’m just getting a 404.
Is this the correct format?

Has SetProperty been implemented on the blynk cloud server, or is it only available on a local server?

Btw I’m loving the blynk app!
Thanks,
Simon

1 Like

Hello. Updated doc - http://docs.blynkapi.apiary.io/#reference/0/set-widget-property-via-get/set-widget-property-via-get

Thanks Dmitriy,

For some reason I’m getting “400 project is not active” when using http get with /update/v77?label=mylabel

However no issues updating pin with /update/v77?value=7, so my project is definitely active.

Any ideas on what I’m doing wrong?

Doesn’t this message explain what problem is?

@greggius do you get the full project details with the following line?

http://blynk-cloud.com/your_token/project

Note your_token is replaced with the 32 character token.

Yes I get full project details using http://blynk-cloud.com/{my_token}/project

I can also update pin values using http://blynk-cloud.com/{my_token}/update/{my_pin}?value={my_value}

But I get “400 project is not active” when I use http://blynk-cloud.com/{my_token}/update/{my_pin}?label={my_label}
I’m using the same auth token for all requests.

So maybe you need to activate your project?

Ok yes I have it working now. I thought the project was active once I had an auth token for it, but by active you mean that the project must be open and running in the Android app for the property update to work.
Sorry for the the misunderstanding.
I must have pressed stop on my project before submitting the http property update request.

Is there any reason why the project and the widget for a pin have to be active for a property update to work? Would it be possible to store the pin property on the sever, in the same way that a pin value is stored on the server?

This would make it easier to label pins from the hardware side.

No, it don’t. Just activated.

It is already done. Active doesn’t mean opened.