Can't update ThingSpeak field via AT commands to ESP8266

4 views (last 30 days)
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

Accepted Answer

Richard Stallard
Richard Stallard on 18 Mar 2022
Problem solved!
The web address needed "api" at the beginning.
AT+CIPSTART="TCP","api.thingspeak.com",80

More Answers (0)

Communities

More Answers in the  ThingSpeak Community

Categories

Find more on ThingSpeak in Help Center and File Exchange

Products

Community Treasure Hunt

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

Start Hunting!