specifiy request type (GET) in SendtoHTTP
Moderators: grovkillen, Stuntteam, TD-er
-
- New user
- Posts: 7
- Joined: 23 Mar 2020, 00:38
specifiy request type (GET) in SendtoHTTP
Dear all,
when I want to sent a Http request within the “Rules” tab (not within one of the http controllers) with SendtoHTTP is it possible to specify the type of request (in that case “GET”) ?
I want to set a value in a Blynk display field via the virtual pin:
SendToHTTP blynk-cloud.com,80,/xxxxxxxAPI-Tokenxxxxx/update/V3?value=%val1%
But in that case I need to send the http request as an GET request.
Any help is appreciated !
Br Peter
when I want to sent a Http request within the “Rules” tab (not within one of the http controllers) with SendtoHTTP is it possible to specify the type of request (in that case “GET”) ?
I want to set a value in a Blynk display field via the virtual pin:
SendToHTTP blynk-cloud.com,80,/xxxxxxxAPI-Tokenxxxxx/update/V3?value=%val1%
But in that case I need to send the http request as an GET request.
Any help is appreciated !
Br Peter
-
- Normal user
- Posts: 1385
- Joined: 17 Jun 2018, 20:41
- Location: USA
Re: specifiy request type (GET) in SendtoHTTP
It appears that the SendtoHTTP method used in the rules defaults to HTTP GET. FWIW, I can't find a SendtoHTTP parameter that overrides it.
But perhaps the BlynkGet command (enabled by the Blync controller) is what should be used. I can't find much info on it's usage, but this old Github issue discussion has examples.
https://github.com/letscontrolit/ESPEasy/issues/838
- Thomas
But perhaps the BlynkGet command (enabled by the Blync controller) is what should be used. I can't find much info on it's usage, but this old Github issue discussion has examples.
https://github.com/letscontrolit/ESPEasy/issues/838
- Thomas
-
- New user
- Posts: 7
- Joined: 23 Mar 2020, 00:38
Re: specifiy request type (GET) in SendtoHTTP
Hi Thomas,
thanks for the hint! I also found the Blynk controller but had no idea, how the controller can be used. But now I have an idea.
Br Peter
thanks for the hint! I also found the Blynk controller but had no idea, how the controller can be used. But now I have an idea.
Br Peter
-
- New user
- Posts: 7
- Joined: 23 Mar 2020, 00:38
Re: specifiy request type (GET) in SendtoHTTP
Topic solved.
I used the BlynkGet command in the rules. Took me some time to find out how to address the sensor values in variables (should be in []) but now it works. Only issue is that the blynk server reports the the blynk page is offline - which is wrong because I can write values on the fields.
Thanks a lot Thomas !
I used the BlynkGet command in the rules. Took me some time to find out how to address the sensor values in variables (should be in []) but now it works. Only issue is that the blynk server reports the the blynk page is offline - which is wrong because I can write values on the fields.
Thanks a lot Thomas !
-
- Core team member
- Posts: 9922
- Joined: 01 Sep 2017, 22:13
- Location: the Netherlands
Re: specifiy request type (GET) in SendtoHTTP
Some controllers really need to be set to "check reply".
Maybe that's also needed for Blynk?
Maybe that's also needed for Blynk?
-
- New user
- Posts: 7
- Joined: 23 Mar 2020, 00:38
Re: specifiy request type (GET) in SendtoHTTP
I will try that out (check reply) !
Thanks
Br Peter
Thanks
Br Peter
-
- Normal user
- Posts: 12
- Joined: 07 Dec 2016, 04:04
Re: specifiy request type (GET) in SendtoHTTP
How did you store the Blynkget get value in the variable. I am trying something like this but it does not work. D17 is the analog pin.PeterKatana wrote: ↑23 Mar 2020, 10:36 Topic solved.
I used the BlynkGet command in the rules. Took me some time to find out how to address the sensor values in variables (should be in []) but now it works. Only issue is that the blynk server reports the the blynk page is offline - which is wrong because I can write values on the fields.
Thanks a lot Thomas !
On Rules#Timer=1 do
if[BlynkGet 2,1,get/D17]>0
GPIO,2,1
else
GPIO,2,0
endif
-
- Normal user
- Posts: 12
- Joined: 07 Dec 2016, 04:04
Re: specifiy request type (GET) in SendtoHTTP
Never mind. I did not understand what is the purpose of 2.1 after BlynkGet . Now I got it. It sets the value in second device and first variable which I did not have earlier. After I added the dummy device as second device, I see the blynkget value being set there.
Now I will display the Blynk sensor value on LCD that I will connect to espeasy sensor.
Thanks
Now I will display the Blynk sensor value on LCD that I will connect to espeasy sensor.
Thanks
-
- Normal user
- Posts: 12
- Joined: 07 Dec 2016, 04:04
Re: specifiy request type (GET) in SendtoHTTP
Can I use BlynkGet for multiple Blynk sensor. I mea ncan I have multiple Blynk controllers with different controller password and retrieve value from each sensor?
Thanks
Thanks
-
- Normal user
- Posts: 12
- Joined: 07 Dec 2016, 04:04
Re: specifiy request type (GET) in SendtoHTTP
i could enter the Blynk password in the Rule and retrieve the values from different Blynk server by modifying C12.ino file.
Who is online
Users browsing this forum: Anthropic Claude Bot [bot] and 19 guests