Public projects 1
Access Your Ecobee Thermostat Using Ecobee API
Project in progress by Andrewjohnsen31
- 3,987 views
- 9 comments
- 6 respects
Toolbox 1
Respected projects 0
Comments 1
Access Your Ecobee Thermostat Using Ecobee API over 2 years ago
Project in progress by Andrewjohnsen31
Thanks for catching this error. I had copied from an example which have variable length data strings. In this example there is only one char string of length 32 (Access Token is 31 char plus 1 for Null_terminiation). Also the data sheet for WiFi Rev 02 is 256 bytes EEPROM, 500 exceeded data sheet.
Modified code below:
String readEEstring(char add) {
int i;
char data[address_null_termination]; //Access Token is 31 char plus 1 for Null_terminiation
int len = 0;
unsigned char k;
k = EEPROM.read(add);
while (k != '\0' && len < address_null_termination+1) //Read until null character
{
k = EEPROM.read(add + len);
data[len] = k;
len++;
}
data[len] = '\0';
return String(data);
}