SendToHTTP problem
Moderators: grovkillen, Stuntteam, TD-er
SendToHTTP problem
Hello!
There was a problem sending a Get request with the SendToHTTP command. I created a rule to send temperature data every 1.5 minutes to the site (Device Name = T; Values = Temperature):
On system # boot do
timerSet,1,90
endon
On Rules # Timer = 1 do
SendToHTTP open-monitoring.online,80,/get?Cid=....#&key=....&p1=[T#Temperature]
timerSet,1,90
endon
This works very poorly: data is sent once every few hours, or not sent at all. In the Log window, the sending is shown, but the data does not come to the site. When sending data via a browser from the same network, everything is OK. I tried the firmware mega-20190928 and mega-20191003. Please help me figure it out.
There was a problem sending a Get request with the SendToHTTP command. I created a rule to send temperature data every 1.5 minutes to the site (Device Name = T; Values = Temperature):
On system # boot do
timerSet,1,90
endon
On Rules # Timer = 1 do
SendToHTTP open-monitoring.online,80,/get?Cid=....#&key=....&p1=[T#Temperature]
timerSet,1,90
endon
This works very poorly: data is sent once every few hours, or not sent at all. In the Log window, the sending is shown, but the data does not come to the site. When sending data via a browser from the same network, everything is OK. I tried the firmware mega-20190928 and mega-20191003. Please help me figure it out.
Re: SendToHTTP problem
It looks like you suffer from the same problem as with sending to thingspeak.
The sendtohttp command does not wait for a reply.
Can you transfer your sendtohttp into using one of the http controllers?
The sendtohttp command does need an update to force checking for a reply from the server.
The sendtohttp command does not wait for a reply.
Can you transfer your sendtohttp into using one of the http controllers?
The sendtohttp command does need an update to force checking for a reply from the server.
Re: SendToHTTP problem
Thank you for the quick response.
I wanted to use an HTTP controller, but I don’t know how to make a different period for sending values via MQTT and HTTP. I need the data to be updated 18b20 every 10 seconds and sent via MQTT, and every 1.5 to 2 minutes there should be an additional sending via HTTP. If you can tell me how to do this, I will be very grateful.
I wanted to use an HTTP controller, but I don’t know how to make a different period for sending values via MQTT and HTTP. I need the data to be updated 18b20 every 10 seconds and sent via MQTT, and every 1.5 to 2 minutes there should be an additional sending via HTTP. If you can tell me how to do this, I will be very grateful.
Re: SendToHTTP problem
You can "copy" the values to a dummy device (TaskValueSet, see https://espeasy.readthedocs.io/en/lates ... mmand.html )
You call the 'run' of the dummy device by calling TaskRun
When it is "executed", it will send the data to the assigned controller.
So this way you can have 2 different intervals in sending to both controllers.
You call the 'run' of the dummy device by calling TaskRun
When it is "executed", it will send the data to the assigned controller.
So this way you can have 2 different intervals in sending to both controllers.
Re: SendToHTTP problem
In addition, the Generic HTTP controller, if I understood correctly, must include the "user" and "password" fields in the query string, but for open-monitoring.online this is unacceptable, it must be "cid" and "key"
Re: SendToHTTP problem
Thank! Using a Dummy device is a good idea. But what about the second question, so that the "user" and "pass" fields in the request body are not passed?
Re: SendToHTTP problem
That's something I don't yet know. I must have to look into the code to see what's possible there.
Maybe someone else has experience with both http controllers regarding the authentication?
Re: SendToHTTP problem
Sorry, forgot to enable translation into English
Re: SendToHTTP problem
You have the 'check reply' set to exactly the same way as sendToHTTP is operating.
So try to set that to a value which does wait for a reply.
So try to set that to a value which does wait for a reply.
Re: SendToHTTP problem
Did not help. I looked at the _C008 plugin code, it’s installed there
Protocol [protocolCount] .usesAccount = true;
Protocol [protocolCount] .usesPassword = true;
If you change these values to false and rebuild the firmware in the Arduino IDE, will that help?
Protocol [protocolCount] .usesAccount = true;
Protocol [protocolCount] .usesPassword = true;
If you change these values to false and rebuild the firmware in the Arduino IDE, will that help?
Re: SendToHTTP problem
I don't think so. If those field are empty, it should not generate an authentication header.
If it does, then I think we have a bug.
Have you also tested the other Advanced HTTP controller?
If it does, then I think we have a bug.
Have you also tested the other Advanced HTTP controller?
Re: SendToHTTP problem
No, I tested only Generic HTTP, because I used the normal_core assembly. Is Advanced HTTP available in test_core? I'll try to flash it when I get to the workplace. Thank!
Re: SendToHTTP problem
Unfortunately, there is no ready-made test_core assembly for ESP8266 1Mb in releases. Will have to collect yourself.
Re: SendToHTTP problem
Cannot compile test_core_1M. In ArduinIDE compiles, but after loading it cannot write the configuration file to FS, it does not compile in Platformio: fatal error.
Re: SendToHTTP problem
Hi
The problem with the command
only appears as of Release mega-20190813
Release mega-20190809 still works.
The problem with the command
Code: Select all
SendToHTTP api.thingspeak.com,80,/update?api_key=<WRITE-KEY>&field1=0
Release mega-20190809 still works.
Who is online
Users browsing this forum: Bing [Bot] and 46 guests