Help with IoT Code (Noob)
Posted: Wed Sep 09, 2015 9:30 am
Hi everyone,
I am new to the arduino/esp8266 world and am planning on building a home automation system (eventually). At the present time I am trying to learn and build little sensors so I can understand everything better. Please find attached some code that I am having trouble with, it is meant to post some information to EasyIoT to be graphed. However it returns error 404 and I am not sure why. I was hoping someone may be able to give me some insight and assistance on the matter.
Any help would be greatly appreciated as I am finding it hard to get any help on any forum!
#define EIOT_USERNAME "admin"
#define EIOT_PASSWORD "test"
#define EIOT_IP_ADDRESS "10.0.0.113"
#define EIOT_PORT 80
#define EIOT_NODE "N13S0"
#define REPORT_INTERVAL 30 // in sec
#define USER_PWD_LEN 40
char unameenc[USER_PWD_LEN];
int test;
client.print(String("POST ") + url + " HTTP/1.1\r\n" +
"Host: " + String(EIOT_IP_ADDRESS) + "\r\n" +
"Connection: close\r\n" +
"Authorization: Basic " + unameenc + " \r\n" +
"Content-Length: 0\r\n" +
"\r\n");
Cheers,
Scott
I am new to the arduino/esp8266 world and am planning on building a home automation system (eventually). At the present time I am trying to learn and build little sensors so I can understand everything better. Please find attached some code that I am having trouble with, it is meant to post some information to EasyIoT to be graphed. However it returns error 404 and I am not sure why. I was hoping someone may be able to give me some insight and assistance on the matter.
Any help would be greatly appreciated as I am finding it hard to get any help on any forum!
#define EIOT_USERNAME "admin"
#define EIOT_PASSWORD "test"
#define EIOT_IP_ADDRESS "10.0.0.113"
#define EIOT_PORT 80
#define EIOT_NODE "N13S0"
#define REPORT_INTERVAL 30 // in sec
#define USER_PWD_LEN 40
char unameenc[USER_PWD_LEN];
int test;
client.print(String("POST ") + url + " HTTP/1.1\r\n" +
"Host: " + String(EIOT_IP_ADDRESS) + "\r\n" +
"Connection: close\r\n" +
"Authorization: Basic " + unameenc + " \r\n" +
"Content-Length: 0\r\n" +
"\r\n");
Cheers,
Scott