Blynk App Webhook Multiple Values to Thingspeak

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 ?

Yes but perhaps don’t bother with the first RUN because you will begin the next cycle of being blocked for a bad URL.

Done but get no entries in TS so far … Will let it run for half an hour or so and check again …

PS : In the Blynk App, is there a way to “hide” the Webhook entry from the screen ?

@Eugene can you please provide details of unblocking with iOS and do you have “Run Test” to add at a later date?

Yes drag it about 6 feet down the screen :slight_smile:

Hahaha ! :slight_smile: Feature request ?

How would you edit the Webhook if it was invisible?
Perhaps would be nice to have an option for it not to be shown in Run mode.
The beauty of the Webhook is that you can pass your project to other users and incorporate their API keys in the Webhook rather than hard coding them.

You need to open and close the widget. This should be sufficient.

1 Like

I have done 3 updates to your TS via a browser and it returned a sequential number starting at 1 so it looks like it resets back to 1 each day.

You don’t have any other devices updating TS do you as that would need to be taken into account with the 15s min update cycle (that you have set at 30s in this project)?

Maybe you have a bug in your code that’s not quite sending the correct URL as it should be updating now in TS.

Exactly … don’t show in RUN mode is the solution !

1 Like

No, I resetted it myself to clear all previous data Paul. So it should show an entry every 30 sec now.

Do you have the Strings for voltage etc set up as Globals as that will be required for the myTimerEvent() to work correctly?

They are defined like this :

float voltage_blynk=0;
float current_blynk=0;
float power_blynk=0;
float energy_blynk=0;
String V6value;

Can I send you my code ? Maybe there’s more “stupid” bugs in there and I wish to learn from my mistakes !

Yes send me the code.