SORTED! problems getting started.

8 years 5 months ago - 8 years 5 months ago #3318 by hunnimonstr
**EDIT
OK, MIA CULPA, my error entierly and im hopping mad it took me so long to sort it, while i had set the correct ssid and pw in the EIoTCloudRestApiConfig.h file
I entierly missed the AP prefix of the definitions for
AP_USERNAME AND AP_PASSWORD in the example sketches and set those to the eiotcloud uid and p/w DOH!!!!
well they were grouped with the instance id ...

Onwards n upwards..








synopsis as i went on a bit
EIoTCloudRestApi problems, cant connect..


I am attempting to copy the mega/esp8266 touchscreen thermostat project..

ive built a breadboard based test harness with all but the relay and bmp180(280 in my case on order) ,

sorted the font issues with the arduino code by downloading and including the definitions for the extra fonts in the default fonts file.

The code runs, with no peripherals attached it times out and displays the gui on the touchscreen but it remains unresponsive even after callibrating the tft..
with peripherals connected it sits in a loop sending an AT to the esp board which remains unresponsive.. (its been flashed before)

So I have turned my attention to the esp side and have been attempting to get the d18b20 example up..

i can flash the esp but it fails to register with my network..
I have edited the ..EIoTCloudRestApiConfig.h file with my ssid and key.
so i have found some other code and lashed up a dirty test program to connect to my network and your server.
using only the ESP8266WiFi.h lib and that works a treat
simply using the parameterID without logging onto the cloud server???
void sendtemp(float temp)
{  

  float tempfix1 =23.7;
   WiFiClient client;

   if (temp= 85.12) // fried sensor !!
    temp = tempfix1;


   
   while(!client.connect(EIOT_CLOUD_ADDRESS, EIOT_CLOUD_PORT)) {
    Serial.println("connection failed");
    wifiConnect(); 
  }

  Serial.print("now posting maxim sensor data");
  String url = "";
  // URL: /RestApi/SetParameter/[instance id]/[parameter id]/[value]
  url += "/RestApi/SetParameter/"+ String(EIOT_CLOUD_MAX_INSTANCE_PARAM_ID) + "/"+String(temp); // generate EasIoT cloud update parameter URL

  Serial.print("POST data to URL: ");
  Serial.println(url);
  
  client.print(String("POST ") + url + " HTTP/1.1\r\n" +
               "Host: " + String(EIOT_CLOUD_ADDRESS) + "\r\n" + 
               "Connection: close\r\n" + 
               "Content-Length: 0\r\n" + 
               "\r\n");

  delay(100);
    while(client.available()){
    String line = client.readStringUntil('\r');
    Serial.print(line);
  }

}

when i try n run the d18b20 example code all i get in the serial monitor is endless dots.. i assume written during connection attempts?

i have tried uncommenting out the debug status in the EIoTCloudRestApiConfig.h file but thats had no effect?

im kinda stuck with how to progress
while i can update the server without your libs retrieving it for conditional execution presents a problem.


TIA

Please Log in or Create an account to join the conversation.

8 years 5 months ago #3319 by EasyIoT
Hi, thermostat project is for experienced. For start I suggest you to try some basic projects like humidity or temperature sensors. Basically you have two kinds of projects - first is with local EasyIoT server and second are EasyIoT Cloud projects. Thermostat example is connected to EasyIoT Server and will not wrk with EasyIoT Cloud.
The following user(s) said Thank You: hunnimonstr

Please Log in or Create an account to join the conversation.

Time to create page: 0.229 seconds

Forum latest

  • No posts to display.