[SOLVED] RESTful HTTP API with on Terminal Widget

Hi, I’m in the final stage of my aquarium project… so I would to integrate with IFTTT DO button using the RESTful HTTP API.
I’m succeeded to command a LED attached to a virtual PIN … I passed the body value ["1"] as JSON content with the PUT method on URL like this http://blynk-cloud.com:8080/4ae3851817194e2596cf1b7103603ef8/pin/V9

Now I would to pass a string (eg. “feed”) to a Terminal Widget attached on a virtual PIN… so… I tryed to use the method above replacing the body ["1"] with ["feed"] but nothing appear on my terminal.
What I’m wrong?

@naamah75 I don’t think the API can do what you want but you should be able to code it yourself.

With a button in PUSH mode on V1 something like this will allow the API to indirectly send “feed” to the Terminal:

BLYNK_WRITE(V1) { // Send "feed" to terminal
  int feedingtime = param.asInt();
  if (feedingtime == 1) {

Yes, this is what I do now within the Blynk app… but I would to extend to IFTTT DO button…

As I told before, I’m able to turn on a LED sending the body “1” by a RESTFul PUT so… I think that in the same way I can send a string to the terminal, I supposed that basically a LED is the same object as a Terminal when attached to a Virtual PIN.
In fact… seems that the Terminal will not work as a LED because my supposition won’t work

You can do it with DO.

In DO you set it up as you did with the LED but send it to a button on a virtual pin and the code extract I posted sends the text to the terminal.

Okay… now I understand what you mean… mom… isn’t a “elegant” solution, but it should work.
Anyway thanks for your idea!

I don’t do elegant, just functional :smiley:

We have buttons that send text to the Terminal and we use DO but not to send text to the Terminal.
Interested to know why you would want to do that as you have sent the DO command so you know it is feeding time.

Unless sending “feed” to the Terminal is coded to do something more than a visual confirmation of an action.

…simply because I’ve used all the virtiual PINs! :wink:

@naamah75 nice catch. Indeed this is a server bug. I’ll fix it. https://github.com/blynkkk/blynk-server/issues/190

1 Like

Fixed. Will be in 0.16.0 server release.

1 Like

Great! I’m looking forward for the release