blynkkk / docs

https://docs.blynk.io
9 stars 5 forks source link

Webhook issues #74

Open mariashinkevich opened 1 year ago

mariashinkevich commented 1 year ago

While working on the “How to Control a Particle Device with Blynk” blog, I discovered some issues with Blynk webhooks.

  1. HTTP POST webform concatenates the key and value and places the result (only) in the key position. I was struggling with creating a Blynk webhook to HTTP post to Particle. I had no problem sending the HTTP POST to Particle from Postman, but experienced an error every time I sent what I thought was the same HTTP POST from a Blynk webhook. So I sent a HTTP POST from a Blynk webhook to a Postman Mock Server, and looking at what Blynk sent, I discovered that the webform key and value is concatenated from the webhook and sent together as the key, not as a key/value pair. See the images below. The work around for this is to use the ‘Custom JSON’ content type option.

The Blynk webhook (HTTP POST): image What is received by the destination (Postman Mock Server): image

When I send the Blynk webhook as HTTP POST with content type of ‘Custom JSON’, the correct result occurs: image

  1. The second issue I experienced was while editing multiple webhooks. After editing and saving one webhook, if I open another, some of the field settings such as the webhook name, URL, etc. from the prior webhook are saved in the second webhook. This creates a real mess and loss of webhook settings. Let me know if you need me to engage in a paid study to come up with the exact sequence to replicate the issue, and identification of all of the issues in detail.

  2. The third issue is with the webhook ‘DEVICE’ dropdown list. About 50% of the time I would get a list of devices, and the other times I would see a spinning icon and never a list of devices. Let me know if you need me to engage in a paid study to come up with the exact sequence to replicate the issue.

  3. The fourth issue is that the ‘Logs’ are not always updated with any test activity, or changes to the associated datastream. At one time the Logs did show up, but suddenly they disappeared.

  4. Executing a “test webook” doesn’t cause substitution of the datastream value, but forcing a datastream value change does correctly cause the pin value to be substituted. This should be noted in the documentation to avoid developer frustration.

markwkiehl commented 1 year ago

Blynk webhook won't execute with datastream changes less than 50 seconds apart.

While working on the blog "How to Control a Particle Device with Blynk", I observed that datastream triggering of the Blynk webhook didn't always result in the data reaching the Particle device. So I set up a new webhook where from the Blynk dashboard, I pushed values to a Postman mock server. Through testing, I discovered that I needed an interval of at least 50 seconds between each data push, or the value would not be sent by Blynk. Postman limits the push interval to every two seconds, so Postman is not the problem.

Does Blynk have something in place that limits a webhook publish interval to no less than 50 seconds?

I'm doing these tests on the NY3 production server and my Pro account.

markwkiehl commented 1 year ago

I just noticed on the webhook page "REQUEST QUOTA: 1 per minute". Is this the restriction? If so, why so limited? Why can't it be limited to every 1 second?

Blynk webhook (3)

mariashinkevich commented 1 year ago

@doom369 are such limits reasonable? Can they be higher for paid plans?

doom369 commented 1 year ago

We won't do anything here until we have time to fix other performance issues.

irynalia commented 1 year ago

Let's document as is for now, and reconsider in the future.

irynalia commented 1 year ago

@mariashinkevich @doom369 ticket still relevant?