From v4.4 to v4.5
Template Streams
The TemplateStream class has been updated to improve tag recognition (Pull Request #2400).
This means regular {varname} tags are sufficient for most purposes, including JSON templates.
The IFS::JsonDirectoryTemplate previously used double-brace tags such as {{varname}}.
It now uses regular tags by default, so if you use this class either:
Add a call to
TemplateStream::setDoubleBraces()in your code, orUpdate your templates to use single braces
Eclipse Project Files
Starting with version 4.5.x we don’t provide Eclipse meta files in our samples.
These can be generated using the ide-eclipse makefile target.
For more information read the updated Using with Eclipse CDT.
Esp8266 toolchain
Sming now requires the ESP Quick Toolchain for building.
Support for the old legacy toolchains (ESP open SDK, UDK) have been dropped. They may still work but are no longer tested.
user_config.h
This header file is part of the original ESP8266 SDK code and is now deprecated. Libraries should use only the necessary headers. Applications do not require it.
Breaking Changes
Undeprecated HttpRequest::getQueryParameter() and removed a lot of old deprecated code.
Removed
WebsocketClient::disconnect(). UseWebsocketClient::close()instead.Removed
TimerDelegateStdFunction. UseTimerDelegateinstead.Removed class
URL. Use classUrlinstead.Removed
TemplateVariables. UseTemplateStream::Variablesinstead.Removed
StreamTransformer::transformCallback. Create inherited class and overrideStreamTransformer::transform()method instead.Removed
StreamTransformer::StreamTransformer(IDataSourceStream* stream, const StreamTransformerCallback& callback, size_t resultSize, size_t blockSize). Instead, create inherited class, overrideStreamTransformer::transform()method and use alternative constructor.Removed
SslValidatorCallback. UseSsl::ValidatorCallbackinstead.Removed
SslSessionIdandSSLSessionId. UseSsl::SessionIdinstead.Removed
SslKeyCertPairandSSLKeyCertPair. UseSsl::KeyCertPairinstead.Removed
SslCertificate. UseSsl::Certificateinstead.Removed
SeekOriginFlags. UseSeekOrigininstead.Removed
eSO_FileStart. UseSeekOrigin::Startinstead.Removed
eSO_CurrentPos. UseSeekOrigin::Currentinstead.Removed
eSO_FileEnd. UseSeekOrigin::Endinstead.Removed
OtaUpgrade::BasicStream::errorToString(). UsetoString()instead.Removed deprecated stuff in Mqtt, including
MQTT_MAX_BUFFER_SIZEandMQTT_MSG_PUBREC.Removed
MqttClient::publishWithQoS(const String& topic, const String& message, int QoS, bool retained, MqttMessageDeliveredCallback onDelivery). Usebool MqttClient::publish(const String& topic, const String& message, uint8_t flags)instead. If you want to have a callback that should be triggered on successful delivery of messages, useMqttClient::setEventHandler().Removed
MqttClient::setCallback(MqttStringSubscriptionCallback subscriptionCallback). UseMqttClient::setEventHandler()instead.Removed
MqttClient::setWill (const String& topic, const String& message, int QoS, bool retained). UseMqttClient::setWill()instead.Removed
MqttMessageDeliveredCallbackandMqttStringSubscriptionCallback. UseMqttDelegateinstead.Removed
IDataSourceStream::length(). UseIDataSourceStream::available()instead.Removed
HttpServer::setDefaultResource(HttpResource* resource). Usepaths.setDefault()instead.Removed
HttpServer::addPath(String path, const HttpPathDelegate& callback),HttpServer::addPath (const String& path, const HttpResourceDelegate& onRequestComplete)andHttpServer::addPath (const String& path, HttpResource* resource). Use paths.set() instead.Removed
HttpResponse::toString(const HttpResponse& res). Use :HttpResponse::toString()method ortoString()global function instead.Removed
HttpResponse::sendTemplate(IDataSourceStream* newTemplateInstance). UseHttpResponse::sendNamedStream()instead.Renamed
commandFunctionDelegatetoCommandFunctionDelegate.Removed
DateTime::convertFromUnixTime(time_t timep, int8_t* psec, int8_t* pmin, int8_t* phour, int8_t* pday, int8_t* pwday, int8_t* pmonth, int16_t* pyear). UseDateTime::fromUnixTime()instead.Removed
DateTime::convertToUnixTime (uint8_t sec, uint8_t min, uint8_t hour, uint8_t day, uint8_t month, uint16_t year). UseDateTime::toUnixTime()instead.Removed
DateTime::fromUnixTime(time_t timep, int8_t* psec, int8_t* pmin, int8_t* phour, int8_t* pday, int8_t* pwday, int8_t* pmonth, int16_t* pyear). Use unsigned version insteadvoid DateTime::fromUnixTime(time_t, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint8_t*, uint16_t*).Removed
DateTime::parseHttpDate(const String& httpDate). UseDateTime::fromHttpDate()instead.Renamed
DNSServerclass toDnsServer.Removed
eFO_Append. UseFile::Appendinstead.Removed
eFO_CreateIfNotExist. UseFile::Createinstead.Removed
eFO_CreateNewAlways. UseFile::CreateNewAlwaysinstead.Removed
eFO_ReadOnly. UseFile::ReadOnlyinstead.Removed
eFO_ReadWrite. UseFile::ReadWriteinstead.Removed
eFO_Truncate. UseFile::Truncateinstead.Removed
eFO_WriteOnly. UseFile::WriteOnlyinstead.Removed
eSO_FileStart. UseSeekOrigin::Startinstead.Removed
eSO_CurrentPos. UseSeekOrigin::Currentinstead.Removed
eSO_FileEnd. UseSeekOrigin::Endinstead.Removed
fileList()function. UseDirectoryobject, orfileOpenDir()/fileReadDir()/fileCloseDir()functions.Removed
FileStream::attach(const String& fileName, FileOpenFlags openFlags=File::ReadOnly). UseFileStream::open()instead.Removed
FTPServer. UseFtpServerinstead.Removed
FtpServer::checkUser(const String& login, const String& pass). UseFtpServer::validateUser()insteadRenamed
Hardware_TimertoHardwareTimer.Renamed
HardwareSerial::setCallback(StreamDataReceivedDelegate dataReceivedDelegate)toHardwareSerial::onDataReceived().Removed
HttpClient::request(const String& url). UseHttpClient::createRequest()instead.Removed
HttpConnection::getLastModifiedDate(). UsegetResponse()->headers.getLastModifiedDate()instead.Removed
HttpConnection::getResponseCode(). UsegetResponse()->codeinstead.Removed
HttpConnection::getResponseHeader(const String& headerName, const String& defaultValue). UsegetResponse()->headers[]instead.Removed
HttpConnection::getResponseHeaders(). UsegetResponse()->headersinstead.Removed
HttpConnection::getResponseString (). Use ``getResponse()->getBody()instead.Removed
HttpConnection::getServerDate (). Use ``getResponse()->headers.getServerDate()instead.Removed
httpGetErrorName (HttpError err). UsetoString()instead.Renamed
HttpPartProducerDelegatetype toMultipartStream::Producer.Renamed
HttpPartResulttype toMultipartStream::BodyPart.Removed
HttpRequest::getPath(). Userequest.uri.Pathinstead.Removed
HttpRequest::operator=(const HttpRequest& rhs). UseHttpRequest::clone()instead.Removed
HttpRequest::setPostParameters(const HttpParams& params). Userequest.postParams = paramsinstead.Removed
HttpResponse::hasHeader(const String& name). Useheaders.contains()instead.Removed
HttpResponse::forbidden(). Useresponse.code = HTTP_STATUS_FORBIDDENinstead.Removed
HttpResponse::notFound(). Useresponse.code = HTTP_STATUS_NOT_FOUNDinstead.Removed
HttpResponse::redirect(const String& location). Useheaders[HTTP_HEADER_LOCATION]instead.