@Korina I understand, ok, thanks for the reply.
And please tell me, does your server only accept HTTPS requests, or can it still accept HTTP requests?
If I contact your server via an HTTP request, I understand that the server will ignore it? Or can the server still process the HTTP request?
Thanks!
Latest posts made by Vladyslav Lebediev
-
RE: Report your Weather Station Data to Windy
-
RE: Report your Weather Station Data to Windy
@Korina Good day.
Unfortunately, I still can't solve my problem, I think that this may be due to the size of the data that I send you to the server, and everything would be fine if I did not have a buffer size limit on my system.
I want to ask if it is possible to change mine API to a shorter one?
I think this might solve the problem. -
RE: Report your Weather Station Data to Windy
@Korina Hi! I use a homemade weather station with my software.
I'm trying to send data using the API, but unfortunately your server cannot process my request correctly, or my weather station still cannot connect to your server. It is possible that I am not specifying the correct port when connecting to the server.
May I know your IP, API and possibly port? -
RE: Report your Weather Station Data to Windy
Good afternoon, colleagues!
I am addressing you with what seems to me a non-standard question.
The situation is as follows - when trying to send data to the site, difficulties arise, what they are connected with, I can’t understand, but I hope for your experience.
I have developed a software and hardware complex for meteorological monitoring based on a microprocessor platform, a sensor unit and a GSM modem for data transmission using GPRS technology.
As a GSM modem, I use the SIM900 module.
The GSM modem is controlled using AT commands.
Sending was tried to be carried out both using the TCP/IP functions, and using the HTTP functions.
That is, by sending a regular GET request in this format:https://stations.windy.com/pws/update/XXX-API-KEY-XXфX?winddir=n&wind=n"
Where n is the corresponding value of the specified parameter.
According to the latest modem responses, as far as I understand, the error lies in the incorrect reception of the sent request, that is, the server cannot process it - HTTP/1.0 400 Bad Request.
But at the same time in the browser such a request is processed without problems.
I'm sure this system will work because the two sending methods - TCP/IP and HTTP - will do a great job of sending data to Thingspeak.com.
Therefore, I dare to assume that the error may be on the server side, or I am not connecting to it correctly, or for some other reason I cannot get through to the server, or he really does not like my request, or something else.
Usually, when connecting to the server, the command looks like this:AT+CIPSTART="TCP","api.thingspeak.com","80"
By analogy, I also specify for the site www.windy.com:
AT+CIPSTART="TCP","api.windy.com","80"
But the result is negative, I tried to specify the IP, if I understood correctly:
AT+CIPSTART="TCP","35.201.88.123","80"
But nothing.
I also tried the HTTP method in GET request format:AT+HTTPPARA="URL","https://stations.windy.com/pws/update/XXX-API-KEY-XXX?winddir=n&wind=n"
But also not effective, I tried many options, there were errors 303, 603 and 400.
Can anyone come across with the organization of such methods of sending? Or understands how to organize it correctly, I will be very grateful.
Below I attach the code of the program, as well as a screenshot of an attempt to send data and responses from the module.TCP/IP function:
If the URL is "http://api.thingspeak.com/update?api_key=XXX-API-KEY-XXX&field1=n&field2=n&field3=n&field4=n&field5=n&field6=n" and the TCP is "api. thingspeak.com", then everything works.AT+CPIN? AT+CSQ AT+CREG? AT+CGATT? AT+CSTT="internet" AT+CIICR AT+CIFSR AT+CIPSTART="TCP","api.windy.com","80" AT+CIPSEND https://stations.windy.com/pws/update/XXX-API-KEY-XXX?winddir=n&wind=n
HTTP function:
If the URL is "http://api.thingspeak.com/update?api_key=XXX-API-KEY-XXX&field1=n&field2=n&field3=n&field4=n&field5=n&field6=n" and the IP is "api. thingspeak.com", then everything works.AT+SAPBR=3,1,"CONTYPE","GPRS" AT+SAPBR=3,1,"APN","internet" AT+SAPBR=1,1 AT+SAPBR=2,1 AT+HTTPINIT AT+HTTPPARA="CID",1 AT+HTTPPARA="URL","https://stations.windy.com/pws/update/XXX-API-KEY-XXX?winddir=n&wind=n" AT+HTTPPARA="PROIP","35.201.88.123" AT+HTTPPARA="PROPORT",80 AT+HTTPACTION=0 AT+HTTPREAD AT+HTTPTERM
Screenshot of an error when using the TCP/IP function:
Thanks a lot in advance!