Http get and set requests

Hi,

I just wanted to make sure doing multiple get and set requests isn’t going to be an issue?

I can’t see the difference between an Arduino doing it or an http request but thought I’d check.

Approx 20 set requests a second and approx 10 get requests

Thanks

There is a difference, because one is done across a keep-alive ssl/tls connection and the other is done via a REST API.

The Limits section of the documentation relating to the HTTPS API is a little confusing because it doesn’t cover queries…

HTTPS API Limits

Max request size: 2 MB (headers + request body)

Max number of file uploads (product/organization logos, firmware for shipment, data import) per user per day: 25

Max number of Export Data calls (/external/api/data/get ) per device per day (both UI and HTTPS API export): 10

Max number of the Update requests (/external/api/update ) per device per day: 500,000

The Export Data section above relates to requesting a full datastream history, not requesting the current value for a pin.

You’re obviously going to exceed the daily limit of 500,000 update requests, as 20 every second is 1.73 million per day.

There are “Update Multiple Datastreams Simultaneously”, " Upload a Set of Timestamped Data" and “Get Multiple Datastream Values” options, which I guess count as one transaction rather than multiple ones, but you’d need to check.

I have to say that I don’t see the value in doing this type of frequency of updates, as your ability to retrieve that data again is somewhat limited, even with a Plus/Pro account and raw data enabled.

Pete.

Thanks for the reply.

I have a c# program that collates multiple sets of data and records to a database. To see the live data when not being in front of the pc I opt’d for setting pin values to blynk. There is then a few sensors c# doesnt have access to which I have used the get request from blynk.

Im sure there is a better way of doing this but i atleast understand this way. I did look at node red but that still seemed to rely on http api to get data.

I can adjust so between the get and set requests I am below 500,000 per device per day.

Are you using the Blynk plugin or the HTTP node?

No, just simple get web requests

I’d use the Blynk plugin if I were you.

No, it does not.
The Node-Red plug-in for Blynk creates a keep-alive connection to the Blynk server, so the device appears online in the Blynk dashboards (something that doesn’t happen using REST API).
The two-way Blynk communication protocol that runs across this ssl/tls connection notifies Node-Red when a datastream value changes, so that updated value is immediately visible within Node-Red without the need to poll the server to check for changed values.
This mimics the BLYNK_WRITE(vPin) functionality within the C++ library.
The same protocol, across the always-on connection, is also used to write data to the Blynk server.

The only time that the current version of the Blynk Node-Red plugin needs to use the REST API is to perform functionality that isn’t currently available within the Blynk nodes. This is primarily for things like logging events and sending notifications - which are limited to one per second and one per minute respectively anyway.

But, I still don’t see why the 1 second update frequency that you mentioned in your original post is needed anyway. Unless you’re using Live View, the Superchart widget shows data that is amalgamated and averaged over a one minute or one day period.
Gauges, labeled widgets etc do display the latest value sent to them, but you’d need to have super human skills to be able to assimilate live data for 40 datastreams at a one second refresh rate per datastream.

Pete.

Where can I find the C# plugin/library?

Thanks for the info. I understand your point on the multiple datastreams. I use it for fault finding/viewing multiple sources. But only one at a time, I suppose I could write toggles for when to send the info to Blynk

Thanks, nothing specifically for C# then? I was trying to avoid running another service. I’ve got it down to 300,000 http requests a day now