CoogleIOT issues with newer esp8266 Arduino cores (3.0.x)
Changes needed to make CoogleIOT compile and run on current esp8266 cores
1) Function removed from ESP8222 core API
From ESP8266 Arduino core 3.0.0 version onwards the following prototype (previously deprecated) has been removed:
HTTPUpdateResult ESPhttpUpdate::update(const char* host, int& port, const char* uri, const char * currentVersion);
This methotd is used in CoogleIOT::checkForFirmwareUpdate() at CoogleIOT.cpp line 987 (library version 1.3.1).
Od call:
firmwareUpdateStatus = ESPhttpUpdate.update(URL.m_Host.c_str(), port, URL.m_Path.c_str(), COOGLEIOT_VERSION);
The current prototype is
HTTPUpdateResult ESP8266HTTPUpdate::update(WiFiClient & client, const String & host, uint16_t port, const String & uri, const String & currentVersion)
The call sholud be replaced with something like (it worked for me):
const String ver_str = COOGLEIOT_VERSION;
const String uri_str = URL.m_Path.c_str();
const String host_str = URL.m_Host.c_str();
firmwareUpdateStatus = ESPhttpUpdate.update(espClient, host_str, port, uri_str, ver_str);
**2) Missing return value in CoogleIOT::verifyFlashConfiguration();**
The memeber function bool CoogleIOT::verifyFlashConfiguration() lacks a 'return
Just adding
return true;
at the end of the function (line 367) solves the problem and the initialization proceeds normally.