Need help: Feedback from GET-request
Posted: Mon Apr 23, 2018 1:06 am
I have various IoT devices that are controlled by GET requests and give feedback. But I have a problem getting this feedback in Demopad.
For example, the temperature request from the temperature sensor is performed as follows:
Feedback is:
HTTP/1.1 200 OK#CR#LF
Content-Length: 31 #CR#LF
Server: lwIP/1.4.0#CR#LF
Content-type: text/html#CR#LF
Connection: close #CR#LF
Expires: Fri, 10 Apr 2008 14:00:00 GMT#CR#LF
Pragma: no-cache#CR#LF#CR#LF
hostname:RS-21-PRO-1;dsw1:25.2;
I have a problem - I can not get the necessary data from the Feedback (25.2) in Demopad, since they are not in 1st line.
Use "Feedback matches specific data" is impossible, because the feedback is always different (date, time, temperature change).
If I use "Feedback matches a pattern", it reads from the first line. So the sample (.*) displays only "HTTP/1.1 200 OK".
Tell me, please, is there any opportunity to get the right information in feedback?
I also found one bug.
If I send quickly two GET-requests using the pattern and assigning the feedback to the same label (if these requests are sent to different devices of the same type that use the same Feedback pattern), then after the second request, I get the data in feedback (25.2), but from the first request.
So, if the first request is the temperature of the 1st sensor, and the second request is the temperature of the 2nd sensor, the temperature of the first sensor will be assigned to the label after the execution of the second request!
Sorry for my bad English))
For example, the temperature request from the temperature sensor is performed as follows:
Code: Select all
GET /sensors/ HTTP/1.1\x0D\x0A
HTTP/1.1 200 OK#CR#LF
Content-Length: 31 #CR#LF
Server: lwIP/1.4.0#CR#LF
Content-type: text/html#CR#LF
Connection: close #CR#LF
Expires: Fri, 10 Apr 2008 14:00:00 GMT#CR#LF
Pragma: no-cache#CR#LF#CR#LF
hostname:RS-21-PRO-1;dsw1:25.2;
I have a problem - I can not get the necessary data from the Feedback (25.2) in Demopad, since they are not in 1st line.
Use "Feedback matches specific data" is impossible, because the feedback is always different (date, time, temperature change).
If I use "Feedback matches a pattern", it reads from the first line. So the sample (.*) displays only "HTTP/1.1 200 OK".
Tell me, please, is there any opportunity to get the right information in feedback?
I also found one bug.
If I send quickly two GET-requests using the pattern
Code: Select all
dsw1:(.*);
So, if the first request is the temperature of the 1st sensor, and the second request is the temperature of the 2nd sensor, the temperature of the first sensor will be assigned to the label after the execution of the second request!
Sorry for my bad English))