From ce54fd166afbc73588530c4bb47c93aacdd605d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Mon, 4 Aug 2014 01:21:31 +0200 Subject: [PATCH] added Lg Smart Tv support (discovery works) --- plugins/deviceplugins/deviceplugins.pro | 3 +- .../lgsmarttv/devicepluginlgsmarttv.cpp | 146 ++++++++++ .../lgsmarttv/devicepluginlgsmarttv.h | 60 ++++ .../lgsmarttv/devicepluginlgsmarttv.json | 1 + plugins/deviceplugins/lgsmarttv/lgsmarttv.pro | 17 ++ plugins/deviceplugins/lgsmarttv/tvdevice.cpp | 110 +++++++ plugins/deviceplugins/lgsmarttv/tvdevice.h | 71 +++++ .../deviceplugins/lgsmarttv/tvdiscovery.cpp | 270 ++++++++++++++++++ plugins/deviceplugins/lgsmarttv/tvdiscovery.h | 54 ++++ server/main.cpp | 2 +- server/server.pro | 2 +- 11 files changed, 733 insertions(+), 3 deletions(-) create mode 100644 plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.cpp create mode 100644 plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.h create mode 100644 plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.json create mode 100644 plugins/deviceplugins/lgsmarttv/lgsmarttv.pro create mode 100644 plugins/deviceplugins/lgsmarttv/tvdevice.cpp create mode 100644 plugins/deviceplugins/lgsmarttv/tvdevice.h create mode 100644 plugins/deviceplugins/lgsmarttv/tvdiscovery.cpp create mode 100644 plugins/deviceplugins/lgsmarttv/tvdiscovery.h diff --git a/plugins/deviceplugins/deviceplugins.pro b/plugins/deviceplugins/deviceplugins.pro index c95348e0..2cc5fe9d 100644 --- a/plugins/deviceplugins/deviceplugins.pro +++ b/plugins/deviceplugins/deviceplugins.pro @@ -10,7 +10,8 @@ SUBDIRS += elro \ wakeonlan \ mailnotification \ philipshue \ - wemo \ + lgsmarttv \ + boblight { diff --git a/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.cpp b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.cpp new file mode 100644 index 00000000..bc0f23de --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.cpp @@ -0,0 +1,146 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * This file is part of guh. * + * * + * Guh is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, version 2 of the License. * + * * + * Guh is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with guh. If not, see . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#include "devicepluginlgsmarttv.h" + +#include "plugin/device.h" +#include "devicemanager.h" + +#include + +VendorId lgVendorId = VendorId("a9af9673-78db-4226-a16b-f34b304f7041"); +DeviceClassId lgSmartTvDeviceClassId = DeviceClassId("1d41b5a8-74ff-4a12-b365-c7bbe610848f"); + + + +DevicePluginLgSmartTv::DevicePluginLgSmartTv() +{ + m_discovery = new TvDiscovery(this); + + connect(m_discovery,SIGNAL(discoveryDone(QList)),this,SLOT(discoveryDone(QList))); +} + +QList DevicePluginLgSmartTv::supportedVendors() const +{ + QList ret; + Vendor lgVendor(lgVendorId, "Lg"); + ret.append(lgVendor); + return ret; +} + +QList DevicePluginLgSmartTv::supportedDevices() const +{ + QList ret; + + DeviceClass deviceClassLgSmartTv(pluginId(), lgVendorId, lgSmartTvDeviceClassId); + deviceClassLgSmartTv.setName("Lg Smart Tv"); + deviceClassLgSmartTv.setCreateMethod(DeviceClass::CreateMethodDiscovery); + deviceClassLgSmartTv.setSetupMethod(DeviceClass::SetupMethodEnterPin); + + QList paramTypes; + paramTypes.append(ParamType("name", QVariant::String)); + paramTypes.append(ParamType("uuid", QVariant::String)); + paramTypes.append(ParamType("model", QVariant::String)); + paramTypes.append(ParamType("host address", QVariant::String)); + paramTypes.append(ParamType("location", QVariant::String)); + paramTypes.append(ParamType("manufacturer", QVariant::String)); + + deviceClassLgSmartTv.setParamTypes(paramTypes); + + ret.append(deviceClassLgSmartTv); + + return ret; +} + +QPair DevicePluginLgSmartTv::discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms) +{ + qDebug() << "should discover devices with params:" << params; + + if(deviceClassId != lgSmartTvDeviceClassId){ + return report(DeviceManager::DeviceErrorDeviceClassNotFound); + } + + m_discovery->discover(2000); + + return report(DeviceManager::DeviceErrorAsync); +} + +QPair DevicePluginLgSmartTv::setupDevice(Device *device) +{ + return reportDeviceSetup(); +} + +DeviceManager::HardwareResources DevicePluginLgSmartTv::requiredHardware() const +{ + return DeviceManager::HardwareResourceTimer; +} + +QPair DevicePluginLgSmartTv::executeAction(Device *device, const Action &action) +{ + return report(); +} + +QPair DevicePluginLgSmartTv::confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const ParamList ¶ms) +{ + + foreach (const Param ¶m, params) { + qDebug() << "confirm pairing param" << param.name(); + } + + + + + + + return reportDeviceSetup(DeviceManager::DeviceSetupStatusAsync); +} + +QString DevicePluginLgSmartTv::pluginName() const +{ + return "Lg Smart Tv"; +} + +PluginId DevicePluginLgSmartTv::pluginId() const +{ + return PluginId("4ef7a68b-9da0-4c62-b9ac-f478dc6f9f52"); +} + +void DevicePluginLgSmartTv::guhTimer() +{ + +} + +void DevicePluginLgSmartTv::discoveryDone(QList tvList) +{ + QList deviceDescriptors; + foreach (TvDevice *device, tvList) { + DeviceDescriptor descriptor(lgSmartTvDeviceClassId, "Lg Smart Tv", device->modelName()); + ParamList params; + params.append(Param("name", device->name())); + params.append(Param("uuid", device->uuid())); + params.append(Param("model", device->modelName())); + params.append(Param("host address", device->hostAddress().toString())); + params.append(Param("location", device->location().toString())); + params.append(Param("manufacturer", device->manufacturer())); + descriptor.setParams(params); + deviceDescriptors.append(descriptor); + } + emit devicesDiscovered(lgSmartTvDeviceClassId, deviceDescriptors); +} + + diff --git a/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.h b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.h new file mode 100644 index 00000000..1e093a11 --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.h @@ -0,0 +1,60 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * + * * + * This file is part of guh. * + * * + * Guh is free software: you can redistribute it and/or modify * + * it under the terms of the GNU General Public License as published by * + * the Free Software Foundation, version 2 of the License. * + * * + * Guh is distributed in the hope that it will be useful, * + * but WITHOUT ANY WARRANTY; without even the implied warranty of * + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * + * GNU General Public License for more details. * + * * + * You should have received a copy of the GNU General Public License * + * along with guh. If not, see . * + * * + * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ + +#ifndef DEVICEPLUGINLGSMARTTV_H +#define DEVICEPLUGINLGSMARTTV_H + +#include "plugin/deviceplugin.h" +#include "tvdiscovery.h" + +class DevicePluginLgSmartTv : public DevicePlugin +{ + Q_OBJECT + + Q_PLUGIN_METADATA(IID "guru.guh.DevicePlugin" FILE "devicepluginlgsmarttv.json") + Q_INTERFACES(DevicePlugin) + +public: + explicit DevicePluginLgSmartTv(); + + TvDiscovery *m_discovery; + + QList supportedVendors() const override; + QList supportedDevices() const override; + + QPair discoverDevices(const DeviceClassId &deviceClassId, const ParamList ¶ms) override; + QPair setupDevice(Device *device) override; + DeviceManager::HardwareResources requiredHardware() const override; + QPair executeAction(Device *device, const Action &action) override; + + QPair confirmPairing(const QUuid &pairingTransactionId, const DeviceClassId &deviceClassId, const ParamList ¶ms) override; + + QString pluginName() const override; + PluginId pluginId() const override; + + void guhTimer() override; + +private slots: + void discoveryDone(QList tvList); + +public slots: + + +}; + +#endif // DEVICEPLUGINLGSMARTTV_H diff --git a/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.json b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.json new file mode 100644 index 00000000..0967ef42 --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/devicepluginlgsmarttv.json @@ -0,0 +1 @@ +{} diff --git a/plugins/deviceplugins/lgsmarttv/lgsmarttv.pro b/plugins/deviceplugins/lgsmarttv/lgsmarttv.pro new file mode 100644 index 00000000..b7cae59c --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/lgsmarttv.pro @@ -0,0 +1,17 @@ +include(../../plugins.pri) + +TARGET = $$qtLibraryTarget(guh_devicepluginlgsmarttv) + +QT+= network + +SOURCES += \ + devicepluginlgsmarttv.cpp \ + tvdiscovery.cpp \ + tvdevice.cpp + +HEADERS += \ + devicepluginlgsmarttv.h \ + tvdiscovery.h \ + tvdevice.h + + diff --git a/plugins/deviceplugins/lgsmarttv/tvdevice.cpp b/plugins/deviceplugins/lgsmarttv/tvdevice.cpp new file mode 100644 index 00000000..ecd5a199 --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/tvdevice.cpp @@ -0,0 +1,110 @@ +#include "tvdevice.h" + +TvDevice::TvDevice(QObject *parent) : + QObject(parent) +{ + m_manager = new QNetworkAccessManager(this); + + + +} + +void TvDevice::setLocation(const QUrl &location) +{ + m_location = location; +} + +QUrl TvDevice::location() const +{ + return m_location; +} + +void TvDevice::setHostAddress(const QHostAddress &hostAddress) +{ + m_hostAddress = hostAddress; +} + +QHostAddress TvDevice::hostAddress() const +{ + return m_hostAddress; +} + +void TvDevice::setName(const QString &name) +{ + m_name = name; +} + +QString TvDevice::name() const +{ + return m_name; +} + +void TvDevice::setModelName(const QString &modelName) +{ + m_modelName = modelName; +} + +QString TvDevice::modelName() const +{ + return m_modelName; +} + +void TvDevice::setManufacturer(const QString &manufacturer) +{ + m_manufacturer = manufacturer; +} + +QString TvDevice::manufacturer() const +{ + return m_manufacturer; +} + +void TvDevice::setDeviceType(const QString &deviceType) +{ + m_deviceType = deviceType; +} + +QString TvDevice::deviceType() const +{ + return m_deviceType; +} + +void TvDevice::setUuid(const QString &uuid) +{ + m_uuid = uuid; +} + +QString TvDevice::uuid() const +{ + return m_uuid; +} + +void TvDevice::setKey(const QString &key) +{ + m_key = key; +} + +QString TvDevice::key() const +{ + return m_key; +} + +void TvDevice::showPairingKey() +{ + qDebug() << "request show pairing key on screen..."; + qDebug() << "--------------------------------------------"; + + QString urlString = "http://" + m_hostAddress.toString() + ":8080/udap/api/pairing"; + + QNetworkRequest pairingRequest; + pairingRequest.setUrl(QUrl(urlString)); + pairingRequest.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("text/xml; charset=utf-8")); + pairingRequest.setHeader(QNetworkRequest::UserAgentHeader,QVariant("UDAP/2.0")); + + QByteArray data = " showKey"; + + m_showKeyReplay = m_manager->post(pairingRequest,data); +} + + + diff --git a/plugins/deviceplugins/lgsmarttv/tvdevice.h b/plugins/deviceplugins/lgsmarttv/tvdevice.h new file mode 100644 index 00000000..e2a6a01a --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/tvdevice.h @@ -0,0 +1,71 @@ +#ifndef TVDEVICE_H +#define TVDEVICE_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + + +class TvDevice : public QObject +{ + Q_OBJECT +public: + explicit TvDevice(QObject *parent = 0); + + void setLocation(const QUrl &location); + QUrl location() const; + + void setHostAddress(const QHostAddress &hostAddress); + QHostAddress hostAddress() const; + + void setName(const QString &name); + QString name() const; + + void setModelName(const QString &modelName); + QString modelName() const; + + void setManufacturer(const QString &manufacturer); + QString manufacturer() const; + + void setDeviceType(const QString &deviceType); + QString deviceType() const; + + void setUuid(const QString &uuid); + QString uuid() const; + + void setKey(const QString &key); + QString key() const; + + void showPairingKey(); + + + +private: + QUrl m_location; + QHostAddress m_hostAddress; + QString m_name; + QString m_modelName; + QString m_manufacturer; + QString m_deviceType; + QString m_uuid; + QString m_key; + bool m_pairingStatus; + + QNetworkAccessManager *m_manager; + QNetworkReply *m_showKeyReplay; + + +signals: + +public slots: + +}; + +#endif // TVDEVICE_H diff --git a/plugins/deviceplugins/lgsmarttv/tvdiscovery.cpp b/plugins/deviceplugins/lgsmarttv/tvdiscovery.cpp new file mode 100644 index 00000000..01a1bbb0 --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/tvdiscovery.cpp @@ -0,0 +1,270 @@ +#include "tvdiscovery.h" + +TvDiscovery::TvDiscovery(QObject *parent) : + QUdpSocket(parent) +{ + m_timeout = new QTimer(this); + m_timeout->setSingleShot(true); + connect(m_timeout,SIGNAL(timeout()),this,SLOT(discoverTimeout())); + + m_manager = new QNetworkAccessManager(this); + connect(m_manager,SIGNAL(finished(QNetworkReply*)),this,SLOT(replyFinished(QNetworkReply*))); + + m_port = 1900; + m_host = QHostAddress("239.255.255.250"); + setSocketOption(QAbstractSocket::MulticastTtlOption,QVariant(1)); + setSocketOption(QAbstractSocket::MulticastLoopbackOption,QVariant(1)); + bind(QHostAddress::AnyIPv4,m_port,QUdpSocket::ShareAddress); + joinMulticastGroup(m_host); + connect(this,SIGNAL(error(QAbstractSocket::SocketError)),this,SLOT(error(QAbstractSocket::SocketError))); + connect(this,SIGNAL(readyRead()),this,SLOT(readData())); +} + +bool TvDiscovery::checkXmlData(QByteArray data) +{ + QByteArray xmlOut; + QXmlStreamReader reader(data); + QXmlStreamWriter writer(&xmlOut); + writer.setAutoFormatting(true); + + while (!reader.atEnd()) { + reader.readNext(); + if (!reader.isWhitespace()) { + writer.writeCurrentToken(reader); + } + } + if(reader.hasError()){ + qDebug() << "ERROR reading XML device information: " << reader.errorString(); + qDebug() << "--------------------------------------------"; + return false; + } + m_deviceInformationData = xmlOut; + return true; +} + +QString TvDiscovery::printXmlData(QByteArray data) +{ + QString xmlOut; + QXmlStreamReader reader(data); + QXmlStreamWriter writer(&xmlOut); + writer.setAutoFormatting(true); + + while (!reader.atEnd()) { + reader.readNext(); + if (!reader.isWhitespace()) { + writer.writeCurrentToken(reader); + } + } + if(reader.hasError()){ + qDebug() << "ERROR reading XML device information: " << reader.errorString(); + qDebug() << "--------------------------------------------"; + } + return xmlOut; +} + + +void TvDiscovery::error(QAbstractSocket::SocketError error) +{ + qWarning() << errorString() << error; +} + +void TvDiscovery::readData() +{ + QByteArray data; + QHostAddress sender; + quint16 udpPort; + + // read the answere from the multicast + while (hasPendingDatagrams()) { + data.resize(pendingDatagramSize()); + readDatagram(data.data(), data.size(), &sender, &udpPort); + } + + if(data.size() > 0){ + if(data.contains("HTTP/1.1 200 OK")){ + const QStringList lines = QString(data).split("\r\n"); + + QUrl location; + QString uuid; + QString server; + + foreach( const QString& line, lines){ + int separatorIndex = line.indexOf(':'); + QString key = line.left(separatorIndex).toUpper(); + QString value = line.mid(separatorIndex+1).trimmed(); + + // get location + if(key.contains("LOCATION")){ + location = QUrl(value); + } + + // get server info + if(key.contains("SERVER")){ + // check if it is a LG Smart Tv with UDAP/2.0 protocoll + if(value.contains("UDAP/2.0")){ + server = value; + } + } + + // get uuid + if(key.contains("USN")){ + int startIndex = value.indexOf(":"); + int endIndex = value.indexOf("::"); + uuid = value.mid(startIndex +1 ,(endIndex - startIndex)-1); + } + + if(!location.isEmpty() && !uuid.isEmpty() && !server.isEmpty()){ + foreach (TvDevice *device, m_tvList) { + if(device->uuid() == uuid){ + return; + } + } + TvDevice *device = new TvDevice(this); + device->setLocation(location); + device->setHostAddress(sender); + device->setUuid(uuid); + + // qDebug() << "--> UPnP searcher discovered a TV..."; + // qDebug() << "location: " << location.toString(); + // qDebug() << "ip: " << sender.toString(); + // qDebug() << "uuid: " << uuid; + // qDebug() << "--------------------------------------------"; + m_tvList.append(device); + requestDeviceInformation(device); + } + } + } + } +} + +void TvDiscovery::discoverTimeout() +{ + emit discoveryDone(m_tvList); +} + +void TvDiscovery::requestDeviceInformation(TvDevice *device) +{ + + QNetworkRequest deviceRequest; + deviceRequest.setUrl(device->location()); + deviceRequest.setHeader(QNetworkRequest::ContentTypeHeader,QVariant("text/xml")); + deviceRequest.setHeader(QNetworkRequest::UserAgentHeader,QVariant("UDAP/2.0")); + + m_deviceInformationReplay = m_manager->get(deviceRequest); +} + +void TvDiscovery::replyFinished(QNetworkReply *reply) +{ + int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); + QByteArray data; + + switch (status) { + case(200): + data = reply->readAll(); + if(checkXmlData(data)){ + parseDeviceInformation(data); + } + break; + case(400): + qDebug() << "ERROR: 400 Bad request. The event format is not valid or it has an incorrect value."; + qDebug() << "--------------------------------------------"; + return; + case(401): + qDebug() << "ERROR: 401 Unauthorized. An event is sent when a Host and a Controller are not paired."; + qDebug() << "--------------------------------------------"; + return; + case(404): + qDebug() << "ERROR: 404 Not Found. The POST path of an event is incorrect."; + qDebug() << "--------------------------------------------"; + return; + case(500): + qDebug() << "ERROR: 500 Internal Server Error. Event Execution Failure."; + qDebug() << "--------------------------------------------"; + return; + default: + return; + } +} + +void TvDiscovery::parseDeviceInformation(QByteArray data) +{ + + QXmlStreamReader xml(data); + + QString name; + QString uuid; + QString modelName; + QString deviceType; + QString manufacturer; + + while(!xml.atEnd() && !xml.hasError()){ + xml.readNext(); + + if(xml.isStartDocument()){ + continue; + } + if(xml.isStartElement()){ + if(xml.name() == "envelope"){ + continue; + } + //check if we have device part of message + if(xml.name() == "device"){ + // seems to be device information + while(!xml.atEnd()){ + if(xml.name() == "deviceType" && xml.isStartElement()){ + deviceType = xml.readElementText(); + } + if(xml.name() == "modelName" && xml.isStartElement()){ + modelName = xml.readElementText(); + } + if(xml.name() == "friendlyName" && xml.isStartElement()){ + name = xml.readElementText(); + } + if(xml.name() == "manufacturer" && xml.isStartElement()){ + manufacturer = xml.readElementText(); + } + if(xml.name() == "uuid" && xml.isStartElement()){ + uuid = xml.readElementText(); + } + xml.readNext(); + } + } + } + } + + foreach (TvDevice *device, m_tvList) { + // find our device with this uuid + if(device->uuid() == uuid){ + device->setName(name); + device->setModelName(modelName); + device->setDeviceType(deviceType); + device->setManufacturer(manufacturer); + + qDebug() << "--> fetched TV information..."; + qDebug() << "name: " << device->name(); + qDebug() << "model name: " << device->modelName(); + qDebug() << "device type: " << device->deviceType(); + qDebug() << "manufacturer: " << device->manufacturer(); + qDebug() << "address: " << device->hostAddress().toString(); + qDebug() << "location: " << device->location().toString(); + qDebug() << "uuid: " << device->uuid(); + qDebug() << "--------------------------------------------"; + } + } +} + +void TvDiscovery::discover(int timeout) +{ + QString searchMessage("M-SEARCH * HTTP/1.1\r\n" + "HOST: 239.255.255.250:1900\r\n" + "MAN: \"ssdp:discover\"\r\n" + "MX: 3\r\n" + "ST: udap:rootservice\r\n" + "USER-AGENT: UDAP/2.0 \r\n\r\n"); + + + m_tvList.clear(); + writeDatagram(searchMessage.toUtf8(),m_host,m_port); + writeDatagram(searchMessage.toUtf8(),m_host,m_port); + m_timeout->start(timeout); +} diff --git a/plugins/deviceplugins/lgsmarttv/tvdiscovery.h b/plugins/deviceplugins/lgsmarttv/tvdiscovery.h new file mode 100644 index 00000000..aff2a56c --- /dev/null +++ b/plugins/deviceplugins/lgsmarttv/tvdiscovery.h @@ -0,0 +1,54 @@ +#ifndef TVDISCOVERY_H +#define TVDISCOVERY_H + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "tvdevice.h" + +class TvDiscovery : public QUdpSocket +{ + Q_OBJECT +public: + explicit TvDiscovery(QObject *parent = 0); + +private: + QHostAddress m_host; + qint16 m_port; + + QTimer *m_timeout; + QList m_tvList; + + QNetworkAccessManager *m_manager; + QNetworkReply *m_deviceInformationReplay; + + QByteArray m_deviceInformationData; + bool checkXmlData(QByteArray data); + QString printXmlData(QByteArray data); + +signals: + void discoveryDone(const QList deviceList); + +private slots: + void error(QAbstractSocket::SocketError error); + void readData(); + void discoverTimeout(); + + void requestDeviceInformation(TvDevice *device); + void replyFinished(QNetworkReply *reply); + void parseDeviceInformation(QByteArray data); + +public slots: + void discover(int timeout); + +}; + +#endif // TVDISCOVERY_H diff --git a/server/main.cpp b/server/main.cpp index 426c88d4..da6881f8 100644 --- a/server/main.cpp +++ b/server/main.cpp @@ -32,7 +32,7 @@ Q_IMPORT_PLUGIN(DevicePluginLircd) Q_IMPORT_PLUGIN(DevicePluginWakeOnLan) Q_IMPORT_PLUGIN(DevicePluginMailNotification) Q_IMPORT_PLUGIN(DevicePluginPhilipsHue) -Q_IMPORT_PLUGIN(DevicePluginWemo) +Q_IMPORT_PLUGIN(DevicePluginLgSmartTv) #if USE_BOBLIGHT Q_IMPORT_PLUGIN(DevicePluginBoblight) diff --git a/server/server.pro b/server/server.pro index a1a863de..58cfc810 100644 --- a/server/server.pro +++ b/server/server.pro @@ -30,7 +30,7 @@ LIBS += -L../plugins/deviceplugins/lircd -lguh_devicepluginlircd LIBS += -L../plugins/deviceplugins/mailnotification -lguh_devicepluginmailnotification LIBS += -L../plugins/deviceplugins/wakeonlan -lguh_devicepluginwakeonlan LIBS += -L../plugins/deviceplugins/philipshue -lguh_devicepluginphilipshue -LIBS += -L../plugins/deviceplugins/wemo -lguh_devicepluginwemo +LIBS += -L../plugins/deviceplugins/lgsmarttv -lguh_devicepluginlgsmarttv boblight { xcompile {