Blynk App Webhook Multiple Values to Thingspeak

Every 10,000 millisecs I believe … Too much ?

Quick Google suggests min 15s. Change to 15555 ms.

Ok, will do Paul ! Is this a Blynk or a TS limitation ? Seem to remember I send some data to TS of other sensor much more frequent …

Google was for TS but the article was written in 2015. Blynk allows a call per second.

Ok thanks again PAul, I will change the setting tomorrow and do some tests again. So normally the system should unlock itself after some time ? I will switch it off tonight.

Free Thingspeak is 15s as per https://thingspeak.com/prices/thingspeak_home

AFAIK the Blynk lock sometimes stays on for months. It checks for a valid url and if the provider is accepting your calls. Not sure what the official procedure is for unlocking other than the Run Test with an Android device.

Okay … wil see what I can do. First let it be off all night …

http://docs.blynk.cc/#widgets-other-webhook

Nice !!! See also mail …

The problem is Paul that I can’t seem to be able to define a specific timing for the webhook. As I want “Live” data in Blynk (eg every second) and a different timing for sending the data to TS (every 30 sec or so) this needs to be done manually with code and here the webhook, function cannot be useed, right ?

The Webhook can be set to run at timed intervals just like any part of your code.

How’s that Paul ? In the sketch I only “prepare” the URL part which I parse into V6 …

//Create Thingspeak String for V6
V6value="";
V6value= “&field1=”;
V6value += String(voltage_blynk);
V6value += “&field2=”;
V6value += String(current_blynk);
V6value += “&field3=”;
V6value += String(power_blynk);
V6value += “&field4=”;
V6value += String(energy_blynk);
Blynk.virtualWrite(V6, V6value);

With Blynk Timer.

You write all the data to the individual Blynk widgets at your required 1 second interval but the V6 is on a separate 15555ms timer.

You mean like this Paul ?

No that is a totally different timer.

See https://examples.blynk.cc/?board=ESP8266&shield=ESP8266%20WiFi&example=GettingStarted%2FPushData

You need:

Define BlynkTimer timer;

In setup() timer.setInterval(15555L, myTimerEvent);

In loop() timer.run(); // Initiates BlynkTimer

And then your Thingspeak V6 stuff is in myTimerEvent().

BlynkTimer is a function just like a virtualWrite(), not a widget.

In the early days of Blynk it was an existing “millis()” library for Arduino’s called SimpleTimer.

http://playground.arduino.cc/Code/SimpleTimer

The library was cloned to BlynkTimer and recently Blynk made some minor adjustments to the original library.

Okay, clear with the example code ! :slight_smile:

I modified the code and it’s running right now but I get no values in TS so it’s probably still blocked. Could you unblock it again please ?

PS : I modified it so that the timer triggers every 30 sec …

I have just used the Run Test on Android but thinking about it that would probably just unblock my account on the server, not yours.

In iOS try taking off the last character of the URL in the Webhook i.e. the last character of the API key.

Save, exit the widget and then go back into the widget and add the character back on and save again.

Ok, let me rephrase in exact repro steps :

  • Take last char of API key in Webghook URL
  • Save
  • Start App (RUN)
  • Stop App
  • Edit URL and add last char again
  • Save
  • Start App again (Run)

Right ?