Can't update ThingSpeak field via AT commands to ESP8266

조회 수: 4 (최근 30일)
Richard Stallard
Richard Stallard 2022년 3월 18일
댓글: Christopher Stapels 2022년 3월 21일
I am working towards sending data from a Picaxe using AT commands via ESP8266, based on an example from 2015 here: https://www.allaboutcircuits.com/projects/connect-a-picaxe-to-the-internet-of-things/
At this stage, I am sending the AT commands to the ESP8266 from a terminal program (Termite), so the Picaxe board is not playing an active part other than providing 3.3V for the ESP-01S module.
However, the GET command is not working and there are no updates to ThingSpeak.
I can send the same update string from a browser and the data does appear in ThingSpeak, so the key and field number are correct. This is the update URL which works:
https://api.thingspeak.com/update?key=XXXXXXXXXXXXXXXX&field2=123
I understand there is a ThingSpeak library for Arduino which would simplify the process but, for various reasons, I prefer Picaxe at the moment.
Are updates via GET still supported?
Have there been any recent changes to the format which affect the data string?
I assume the byte count requires addition of 2 to account for the CR+LF sent from the terminal program but I have also tried with byte count reduced by 2 with no change in the result.
Here is the log from Termite:
AT
OK
AT+CIPSTART="TCP","thingspeak.com",80
AT+CIPSTART="TCP","thingspeak.com",80
CONNECT
OK
AT+CIPSEND=45
AT+CIPSEND=45
OK
> GET /update?key=XXXXXXXXXXXXXXXX&field1=123
Recv 45 bytes
SEND OK
+IPD,69:HTTP/1.1 408 REQUEST_TIMEOUT
Content-Length:0
Connection: Close
CLOSED

채택된 답변

Richard Stallard
Richard Stallard 2022년 3월 18일
Problem solved!
The web address needed "api" at the beginning.
AT+CIPSTART="TCP","api.thingspeak.com",80
  댓글 수: 1
Christopher Stapels
Christopher Stapels 2022년 3월 21일
Thanks for updating the post! Glad you got the updates working.

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

커뮤니티

더 많은 답변 보기:  ThingSpeak 커뮤니티

카테고리

Help CenterFile Exchange에서 ThingSpeak에 대해 자세히 알아보기

제품

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by