Receiving data from Blynk dashboard via BlynkAPI and Webhooks

Hi -

I am trying to send data set by a value in a Blynk dashboard back to my device. I am able to do it the other wat around easily enough, but for the life of me cannot get this working.

When setting up the Webhook to receive data, should it be set to POST as apposed to GET?

Regards,
Friedl.

Hi Friedl,

I think in this case your Blynk request should hit the Particle API for calling a function, and this mechanism uses a POST.
Is that what you are attempting?
Best,

1 Like

Hi @gusgonnet

Thanks, let me have a look.

For some obscure reason I have now also lost all ability to even send data to Blynk. I am literally copying and pasting code from a working example but for some reason all connections fail... :weary:

EDIT:// Blynk seems is updating the dashboard with the data sent to it, but the Webhook keeps indicating it is failing in the integration section :man_shrugging:

Will get back to the link you sent now, seems a little above my capabilities but will give it a shot :slight_smile:

Hi @gusgonnet -

I am trying to achieve the following;

  • Set a value in a widget on the Blynk App e.g. Max Speed = 200
  • This value should then be sent to a variable on the hardware

This can be done using Blynk.Read and Blynk.Write but this will circumnavigate Particle.Cloud if I recall correctly, which is kind of besides the point :slight_smile: Similar to how you would control GPIO pins from a Blynk dashboard I suppose, but would be ideal if I can send an integer value as apposed to having 4 virtual pins.

Regards,
Friedl.

Hi, this can help you:

1 Like

Hi @gusgonnet -

Holy crap.... really? All of that to get an integer from Blynk to Particle device :exploding_head: :grin:

I need to revisit this idea, it is for a Photon 2 tutorial and might be a little too 'involved'. Wish Particle had a UI :pleading_face: :pray:

What still gets the better of me is the fact that the webhooks returns errors even though data in Blynk is updating successfully. This is on the same code and same device I used a week ago.

Thank you for the help!!

Friedl.

1 Like

Well, the poor integer has to travel a long way to the Particle device:
Blynk UI -> Blynk Cloud -> Particle Cloud -> Particle device

The above blog post covers the Blynk Cloud to Particle Cloud communication, the rest is covered by Blynk and Particle :slight_smile:

1 Like

Haha, that is true. Just feels like it used to be easier with the BLYNK_WRITE(Vpin) :grin: My lack of programming knowledge is catching up on me...

I think you can still use BLYNK_WRITE.
The only drawback is that it travels unencrypted, so if the project is a home project, you may be fine.

But it 'bypasses' Particle Cloud correct?

I have managed to get functions working from Particle Console... seeing now whether I can get the rest going as well. But really, amongst a whole bunch of other things you have to create 3 webhooks just to be able to toggle a led ?? Just feels like there has to be a simpler way to do it.

correct

can you enumerate the 3 webhooks needed? I would say the only thing needed is Blynk sending a POST request.

Not ideal for Particle Tutorial I suppose :smile:

Below is an extract from the link on how to control device from Blynk;

Navigate to ‘Settings -> Webhooks’ and create three new webhooks, one each for the datastreams V7, V8, and V9, based on the information shown in the images below for V7, but substituting your Particle device ID and access token. The only difference between the three webhooks is the assignment of the V7, V8, and V9 datastream to the webhook, and the webhook name.

There is of course a hight probability that I am simply not understanding correctly :smiling_face: It also seems you have to set up an account with a service like Postman... even further down the rabbit hole we go :rofl:

Incorrect. The Particle tutorial is still connecting a Blynk mobile app or web app to a Particle device, so it still has value to the maker reading the tutorial.

ok, I see. I haven't explored Blynk webhooks yet.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.