diff --git a/tasmota/integrationplugintasmota.cpp b/tasmota/integrationplugintasmota.cpp index a733646f..93b6de48 100644 --- a/tasmota/integrationplugintasmota.cpp +++ b/tasmota/integrationplugintasmota.cpp @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -35,11 +35,12 @@ #include #include #include +#include -#include "hardwaremanager.h" -#include "network/networkaccessmanager.h" -#include "network/mqtt/mqttprovider.h" -#include "network/mqtt/mqttchannel.h" +#include +#include +#include +#include static QHash sonoff_basicPowerStateTypeIds = { {"POWER", sonoff_basicPowerStateTypeId}, // On single channel devices, sometimes there's no index @@ -124,7 +125,7 @@ void IntegrationPluginTasmota::setupThing(ThingSetupInfo *info) //: Error setting up thing return info->finish(Thing::ThingErrorInvalidParameter, QT_TR_NOOP("The given IP address is not valid.")); } - MqttChannel *channel = hardwareManager()->mqttProvider()->createChannel(thing->id().toString().remove(QRegExp("[{}-]")), deviceAddress); + MqttChannel *channel = hardwareManager()->mqttProvider()->createChannel(thing->id().toString().remove(QRegularExpression("[{}-]")), deviceAddress); if (!channel) { qCWarning(dcTasmota) << "Failed to create MQTT channel."; //: Error setting up thing diff --git a/tasmota/integrationplugintasmota.h b/tasmota/integrationplugintasmota.h index 55aa85e8..699c1f9f 100644 --- a/tasmota/integrationplugintasmota.h +++ b/tasmota/integrationplugintasmota.h @@ -1,6 +1,6 @@ /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* Copyright 2013 - 2020, nymea GmbH +* Copyright 2013 - 2025, nymea GmbH * Contact: contact@nymea.io * * This file is part of nymea. @@ -31,7 +31,7 @@ #ifndef INTEGRATIONPLUGINTASMOTA_H #define INTEGRATIONPLUGINTASMOTA_H -#include "integrations/integrationplugin.h" +#include #include "extern-plugininfo.h" @@ -44,7 +44,6 @@ class IntegrationPluginTasmota: public IntegrationPlugin Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationplugintasmota.json") Q_INTERFACES(IntegrationPlugin) - public: explicit IntegrationPluginTasmota(); ~IntegrationPluginTasmota(); @@ -60,7 +59,7 @@ private slots: void onPublishReceived(MqttChannel *channel, const QString &topic, const QByteArray &payload); private: - QHash m_mqttChannels; + QHash m_mqttChannels; // Helpers for parent devices (the ones starting with sonoff) QHash m_ipAddressParamTypeMap; diff --git a/tasmota/tasmota.pro b/tasmota/tasmota.pro index d986a30e..328c965b 100644 --- a/tasmota/tasmota.pro +++ b/tasmota/tasmota.pro @@ -4,10 +4,8 @@ QT += network PKGCONFIG += nymea-mqtt -TARGET = $$qtLibraryTarget(nymea_integrationplugintasmota) - SOURCES += \ - integrationplugintasmota.cpp \ + integrationplugintasmota.cpp HEADERS += \ - integrationplugintasmota.h \ + integrationplugintasmota.h