How to use the MAKER actuator using the GET method?

glaverglaver Member Posts: 9

Hello,

i'm unable to set actuator (maker) to pass web request to http://ruzyne.tmep.cz/?teplota={[First_senzor_Temperature_2].parameter}}

Is that even possible? Using the GET method, my URL is set to http://ruzyne.tmep.cz, content-type application/x-www-form-urlencoded, body teplota={[First_sensor_Temperature_2].parameter}}

I also tried an IFTTT maker, web request will create, but does not contain any values.

These are data from the Technoline (Mobile Alerts) sensor, from which I successfully store data in a google table.

Thank you in advance for your advice.

Sincerely,
Lukáš Krása

Comments

  • ChristianChristian Administrator, Moderator Posts: 1,219 admin

    Hi @glaver, I am going to discuss this tomorrow with my colleagues as well.

  • ChristianChristian Administrator, Moderator Posts: 1,219 admin

    PS: Mind if I edit the discussion title to make it more understandable?

  • glaverglaver Member Posts: 9

    Hi @Christian , thank you for your help, be sure to modify the title, I wrote a post in a hurry :)

  • ChristianChristian Administrator, Moderator Posts: 1,219 admin

    Hi @glaver, here the answers from our developers:

    i'm unable to set actuator (maker) to pass web request to http://ruzyne.tmep.cz/?teplota={[First_senzor_Temperature_2].parameter}}

    Putting variables into request URLs is not supported. You can only use variables in the request body.

    Is that even possible? Using the GET method, my URL is set to http://ruzyne.tmep.cz, content-type application/x-www-form-urlencoded, body teplota={[First_sensor_Temperature_2].parameter}}

    I believe the issue here is the malformed variable. Internally we use handlebars to replace placeholder variables with their values. The correct format is:

    {{[First_sensor_Temperature_2].parameter}}<Icode></p> <ul> <li>two {{ at the beginning and two }} at the end. The brackets around the sensor name here are optional as the variable does not contain special characters, so this should work:</li> </ul> <p><code>{{First_sensor_Temperature_2.parameter}}.

    In order to obtain the request body you must use either PUT or POST.

    Other than that, the IFTTT maker is NOT meant to pass along any values. You use it in order to get an IFTTT applet running based on a defined event name.

  • glaverglaver Member Posts: 9

    Hi @Christian Thank you for your reply. I don't quite understand. I'm not a programmer, but I thought the GET method, just passed the variables into the request. But you also write that variables in URLs cannot be passed. So why is the GET method in the selection? Sorry, neither PUT nor POST can be used when calling this web application.

    Regarding IFTTT, thank you for the explanation, but it's a shame because IFTTT supports passing up to 3 values within a web request.

  • ChristianChristian Administrator, Moderator Posts: 1,219 admin

    Hi @glaver, okay, thanks. The developers are going to modify the MAKER based on your feedback.

Sign In or Register to comment.