thingspeak and esp8266

#include <SoftwareSerial.h>
#define SSID "ABCD"
#define PASS "123456789"
#define IP "184.106.153.149" // thingspeak.com
String GET = "https://api.thingspeak.com/update?key=[M0XL34NOFEMCUU9P]&field1=0";
SoftwareSerial monitor(10, 11); // RX, TX

void setup()
{
  monitor.begin(9600);
  Serial.begin(9600);
  sendDebug("AT");
  delay(5000);
  if(Serial.find("OK")){
    monitor.println("RECEIVED: OK");
    connectWiFi();
  }
}

void loop(){
  float tempC = analogRead(A0);
  char buffer[10];
  String tempF = dtostrf(tempC, 4, 1, buffer);
  updateTemp(tempF);
  delay(60000);
}

void updateTemp(String tenmpF){
  String cmd = "AT+CIPSTART=\"TCP\",\"";
  cmd += IP;
  cmd += "\",80";
  sendDebug(cmd);
  delay(2000);
  if(Serial.find("Error")){
    monitor.print("RECEIVED: Error");
    return;
  }
  cmd = GET;
  cmd += tenmpF;
  cmd += "\r\n";
  Serial.print("AT+CIPSEND=");
  Serial.println(cmd.length());
  if(Serial.find(">")){
    monitor.print(">");
    monitor.print(cmd);
    Serial.print(cmd);
  }else{
    sendDebug("AT+CIPCLOSE");
  }
  if(Serial.find("OK")){
    monitor.println("RECEIVED: OK");
  }else{
    monitor.println("RECEIVED: Error");
  }
}
void sendDebug(String cmd){
  monitor.print("SEND: ");
  monitor.println(cmd);
  Serial.println(cmd);
} 
 
boolean connectWiFi(){
  Serial.println("AT+CWMODE=1");
  delay(2000);
  String cmd="AT+CWJAP=\"";
  cmd+=SSID;
  cmd+="\",\"";
  cmd+=PASS;
  cmd+="\"";
  sendDebug(cmd);
  delay(5000);
  if(Serial.find("OK")){
    monitor.println("RECEIVED: OK");
    return true;
  }else{
    monitor.println("RECEIVED: Error");
    return false;
  }
}

This is the code I compiled but the serial monitor show
AT
AT+CIPSTART="TCP","184.106.153.149",80
AT+CIPSEND=71
AT+CIPCLOSE

and the thingspeak no receive any value

Which version of the WiFi library supports https?

#include <SoftwareSerial.h>.....because I use esp8266

jian999:
#include <SoftwareSerial.h>.....because I use esp8266

Well, that's a non-sequitor.

Returning this from the dead!

I've been trying all day to do the same but I just keep getting the same messages as the OP does and nothing gets uploaded to thingspeak

Is there anyway to see if the ESP really is getting connected to the internet using that program?

Hi! I´m pretty new also. but i successfully get my esp8266 12 connected and sending data from 4 sensors to thingspeak.

I have many troubles to geting error from the console or not getting data on my channel so i made two things:
check if esp8266 is connected by looking at my router's client list.
and adding two led (one led and one green) for fast error detection.

What i don't understand in you code is if you are connecting the esp to the softserial or to the hardwareSerial...

I use the hardware serial to monitor and connect the esp to softserial thru pin 10 and 11.

you don't put your api key in between []? don't you?

and i have trouble to using these method:

"https://api.thingspeak.com/update?key=[M0XL34NOFEMCUU9P]&field1=0"
instead of:
"GET /update?api_key=MYAPIKEYDONTSHOW&field1=-222.2&field2=-222.2&field3=-222.2
&field4=-222.2

getting "dnsfail" or something.

you misstyped one variable : "tenmpF" or "tempF"
and you defined GET as:

String GET = "https://api.thingspeak.com/update?key=[M0XL34NOFEMCUU9P]&field1=0";
including the value of field1 and the adding it again from tempF.

Maybe i´m too new and don´t understand the code or you have many mistakes.

Are you resolved this issue?