Remove plugins anel, usbwde, pushbullet, multisensor

* Anel: unfinished and not working
* UsbWde: Contributor didn't accept CLA
* Pushbullet: Contributor didn't accept CLA
* Multisensor: Contributor didn't accept CLA
This commit is contained in:
Michael Zanetti 2017-07-11 14:17:32 +02:00
parent 09447a6ea2
commit d3a6a6ac64
31 changed files with 0 additions and 1974 deletions

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -29,8 +29,5 @@ SUBDIRS += \
orderbutton \
denon \
avahimonitor \
pushbullet \
usbwde \
senic \
multisensor \
gpio \

View File

@ -1,135 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Simon Stuerz <simon.stuerz@guh.io> *
* Copyright (C) 2016 nicc *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*!
\page multisensor.html
\title MultiSensor
\brief Plugin for TI SensorTag.
\ingroup plugins
\ingroup guh-plugins
This plugin allows finding and controlling the Bluetooth Low Energy SensorTag from Texas Instruments.
\chapter Plugin properties
Following JSON file contains the definition and the description of all available \l{DeviceClass}{DeviceClasses}
and \l{Vendor}{Vendors} of this \l{DevicePlugin}.
For more details on how to read this JSON file please check out the documentation for \l{The plugin JSON File}.
\quotefile plugins/deviceplugins/multisensor/devicepluginmultisensor.json
*/
#ifdef BLUETOOTH_LE
#include "plugininfo.h"
#include "devicemanager.h"
#include "bluetooth/bluetoothlowenergydevice.h"
#include "devicepluginmultisensor.h"
DevicePluginMultiSensor::DevicePluginMultiSensor()
{
}
DeviceManager::HardwareResources DevicePluginMultiSensor::requiredHardware() const
{
return DeviceManager::HardwareResourceBluetoothLE;
}
DeviceManager::DeviceError DevicePluginMultiSensor::discoverDevices(const DeviceClassId &deviceClassId, const ParamList &params)
{
Q_UNUSED(params)
if (deviceClassId != sensortagDeviceClassId)
return DeviceManager::DeviceErrorDeviceClassNotFound;
if (!discoverBluetooth())
return DeviceManager::DeviceErrorHardwareNotAvailable;
return DeviceManager::DeviceErrorAsync;
}
void DevicePluginMultiSensor::bluetoothDiscoveryFinished(const QList<QBluetoothDeviceInfo> &deviceInfos)
{
QList<DeviceDescriptor> deviceDescriptors;
foreach (auto deviceInfo, deviceInfos) {
if (deviceInfo.name().contains("SensorTag")) {
if (!verifyExistingDevices(deviceInfo)) {
DeviceDescriptor descriptor(sensortagDeviceClassId, "SensorTag", deviceInfo.address().toString());
ParamList params;
params.append(Param(nameParamTypeId, deviceInfo.name()));
params.append(Param(macParamTypeId, deviceInfo.address().toString()));
descriptor.setParams(params);
deviceDescriptors.append(descriptor);
}
}
}
emit devicesDiscovered(sensortagDeviceClassId, deviceDescriptors);
}
DeviceManager::DeviceSetupStatus DevicePluginMultiSensor::setupDevice(Device *device)
{
qCDebug(dcMultiSensor) << "Setting up MultiSensor" << device->name() << device->params();
if (device->deviceClassId() == sensortagDeviceClassId) {
auto address = QBluetoothAddress(device->paramValue(macParamTypeId).toString());
auto name = device->paramValue(nameParamTypeId).toString();
auto deviceInfo = QBluetoothDeviceInfo(address, name, 0);
QSharedPointer<SensorTag> tag{new SensorTag(deviceInfo, QLowEnergyController::PublicAddress, this)};
connect(tag.data(), &SensorTag::valueChanged, this,
[device, this](StateTypeId state, QVariant value) { device->setStateValue(state, value); });
connect(tag.data(), &SensorTag::event, this,
[device, this](EventTypeId event) { emit emitEvent(Event(event, device->id())); });
m_tags.insert(tag, device);
tag->connectDevice();
return DeviceManager::DeviceSetupStatusSuccess;
}
return DeviceManager::DeviceSetupStatusFailure;
}
void DevicePluginMultiSensor::deviceRemoved(Device *device)
{
if (!m_tags.values().contains(device))
return;
auto tag= m_tags.key(device);
m_tags.remove(tag);
}
bool DevicePluginMultiSensor::verifyExistingDevices(const QBluetoothDeviceInfo &deviceInfo)
{
foreach (Device *device, myDevices()) {
if (device->paramValue(macParamTypeId).toString() == deviceInfo.address().toString())
return true;
}
return false;
}
#endif // BLUETOOTH_LE

View File

@ -1,59 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Simon Stuerz <simon.stuerz@guh.io> *
* Copyright (C) 2016 nicc *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef DEVICEPLUGINMULTISENSOR_H
#define DEVICEPLUGINMULTISENSOR_H
#ifdef BLUETOOTH_LE
#include <QPointer>
#include <QHash>
#include "plugin/deviceplugin.h"
#include "devicemanager.h"
#include "bluetooth/bluetoothlowenergydevice.h"
#include "sensortag.h"
class DevicePluginMultiSensor : public DevicePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "guru.guh.DevicePlugin" FILE "devicepluginmultisensor.json")
Q_INTERFACES(DevicePlugin)
public:
explicit DevicePluginMultiSensor();
DeviceManager::HardwareResources requiredHardware() const override;
DeviceManager::DeviceError discoverDevices(const DeviceClassId &deviceClassId, const ParamList &params) override;
void bluetoothDiscoveryFinished(const QList<QBluetoothDeviceInfo> &deviceInfos) override;
DeviceManager::DeviceSetupStatus setupDevice(Device *device) override;
void deviceRemoved(Device *device) override;
private:
bool verifyExistingDevices(const QBluetoothDeviceInfo &deviceInfo);
QHash<QSharedPointer<SensorTag>,QPointer<Device>> m_tags;
};
#endif // BLUETOOTH_LE
#endif // DEVICEPLUGINMULTISENSOR_H

View File

@ -1,118 +0,0 @@
{
"name": "MultiSensor",
"idName": "MultiSensor",
"id": "23bf0d8d-df7d-4bee-80ee-f015c5a7f52e",
"vendors": [
{
"name": "Texas Instruments",
"idName": "texas",
"id": "2edf543e-dc2c-4693-bb0c-e76c0d305fad",
"deviceClasses": [
{
"name": "Sensor Tag",
"idName": "sensortag",
"id": "158a06b6-b27f-4951-957e-6f1e3b44f604",
"createMethods": ["discovery"],
"deviceIcon": "Thermometer",
"criticalStateTypeId": "a9629b11-0f34-47f0-a0f0-f758a6aec2b4",
"basicTags": [
"Device",
"Sensor"
],
"paramTypes": [
{
"id": "bdb9d684-2f98-45f5-889c-f184c1e73dc7",
"idName": "name",
"name": "name",
"type": "QString",
"inputType": "TextLine",
"index" : 0
},
{
"id": "d51ed68e-c84a-4136-a5b5-be2f95fd5a0f",
"idName": "mac",
"name": "mac address",
"type": "QString",
"index": 1,
"inputType": "MacAddress"
}
],
"stateTypes": [
{
"id": "a9629b11-0f34-47f0-a0f0-f758a6aec2b4",
"idName": "connected",
"name": "connected",
"eventTypeName": "connected changed",
"index": 0,
"type": "bool",
"defaultValue": false
},
{
"id": "c664e9ec-a045-49ba-add1-1642ceba7c4f",
"idName": "IRtemperature",
"name": "IR temperature",
"eventTypeName": "IR temperature changed",
"index": 1,
"type": "double",
"unit": "DegreeCelsius",
"defaultValue": 0
},
{
"id": "e83a50ff-96c9-4b6d-889f-f4238353e794",
"idName": "humidity",
"name": "humidity",
"eventTypeName": "humidity changed",
"index": 2,
"type": "double",
"unit": "Percentage",
"defaultValue": 0
},
{
"id": "8359ada9-df1c-4e60-bb87-9e21d05ee2e2",
"idName": "temperature",
"name": "temperature",
"eventTypeName": "temperature changed",
"index": 3,
"type": "double",
"unit": "DegreeCelsius",
"defaultValue": 0
},
{
"id": "645633ad-77d4-45b2-8be8-d6ca7a12eb7a",
"idName": "pressure",
"name": "pressure",
"eventTypeName": "pressure changed",
"index": 4,
"type": "double",
"unit": "HectoPascal",
"defaultValue": 0
},
{
"id": "4be5ca26-0565-419d-b18b-2a5a385d2a3d",
"idName": "moving",
"name": "moving",
"eventTypeName": "moving changed",
"index": 5,
"type": "bool",
"defaultValue": false
}
],
"eventTypes": [
{
"id": "61478490-bed0-4fed-9d58-f13c35b4f220",
"idName": "leftKey",
"index": 0,
"name": "left key pressed"
},
{
"id": "b7e927db-af28-4fdc-8eb7-edb02258ff5a",
"idName": "rightKey",
"index": 1,
"name": "right key pressed"
}
]
}
]
}
]
}

View File

@ -1,15 +0,0 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginmultisensor)
SOURCES += \
devicepluginmultisensor.cpp \
sensortag.cpp
HEADERS += \
devicepluginmultisensor.h \
sensortag.h

View File

@ -1,337 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Simon Stürz <simon.stuerz@guh.io> *
* Copyright (C) 2016 nicc *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifdef BLUETOOTH_LE
#include <QPointer>
#include <QLowEnergyService>
#include <QtMath>
#include "extern-plugininfo.h"
#include "sensortag.h"
SensorTag::SensorTag(const QBluetoothDeviceInfo &deviceInfo, const QLowEnergyController::RemoteAddressType &addressType, QObject *parent) :
BluetoothLowEnergyDevice(deviceInfo, addressType, parent)
{
connect(this, SIGNAL(connectionStatusChanged()), this,SLOT(onConnectionStatusChanged()));
connect(this, SIGNAL(servicesDiscoveryFinished()), this, SLOT(setupServices()));
}
double SensorTag::calculateMeanValue(const QList<double> &list)
{
double sum = 0;
foreach (const double &value, list)
sum += value;
return sum / list.count();
}
void SensorTag::setupServices()
{
foreach (auto id, m_services.keys()) {
if (!controller()->services().contains(id)) {
qCWarning(dcMultiSensor) << "Service not found for device" << name() << address().toString();
return;
}
if (m_services.value(id)) {
qCWarning(dcMultiSensor) << "Attention! bad implementation of service handling!!";
return;
}
qCDebug(dcMultiSensor) << "Setup service";
// service for temperature
QSharedPointer<QLowEnergyService> service{controller()->createServiceObject(id, this)};
if (service.isNull()) {
qCWarning(dcMultiSensor) << "Could not create service for device" << name() << address().toString();
return;
}
m_services.insert(id, service);
connect(service.data(), SIGNAL(error(QLowEnergyService::ServiceError)), this, SLOT(onServiceError(QLowEnergyService::ServiceError)));
connect(service.data(), &QLowEnergyService::stateChanged, this, &SensorTag::onServiceStateChanged);
connect(service.data(), &QLowEnergyService::characteristicChanged, this, &SensorTag::onServiceCharacteristicChanged);
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
connect(service.data(), &QLowEnergyService::characteristicRead, this, &SensorTag::onServiceCharacteristicChanged);
#endif
service->discoverDetails();
}
}
void SensorTag::onConnectionStatusChanged()
{
if (!isConnected()) {
// delete the services, they need to be recreated and
// rediscovered once the device will be reconnected
foreach (QSharedPointer<QLowEnergyService> service, m_services)
service->deleteLater();
emit valueChanged(connectedStateTypeId, false);
} else {
emit valueChanged(connectedStateTypeId, true);
}
}
void SensorTag::onServiceStateChanged(const QLowEnergyService::ServiceState &state)
{
QPointer<QLowEnergyService> service = qobject_cast<QLowEnergyService *>(sender());
switch (state) {
case QLowEnergyService::DiscoveringServices:
qCDebug(dcMultiSensor) << "Start discovering service" << service->serviceUuid();
break;
case QLowEnergyService::ServiceDiscovered:
if (m_services.contains(service->serviceUuid())) {
qCDebug(dcMultiSensor) << "... service discovered.";
auto dataId = service->serviceUuid();
dataId.data1 += 1;
auto sensorCharacteristic = service->characteristic(dataId);
if (!sensorCharacteristic.isValid()) {
qCWarning(dcMultiSensor) << "Characteristic not found for device " << name() << address().toString();
break;
}
const auto notificationDescriptor = sensorCharacteristic.descriptor(
QBluetoothUuid::ClientCharacteristicConfiguration);
if (notificationDescriptor.isValid()) {
service->writeDescriptor(notificationDescriptor, QByteArray::fromHex("0100"));
qCDebug(dcMultiSensor) << "Measuring";
}
if (service->serviceUuid().data1 == 0xffe0)
break;
auto configId = service->serviceUuid();
configId.data1 += 2;
auto sensorConfig = service->characteristic(configId);
if (!sensorConfig.isValid()) {
qCWarning(dcMultiSensor) << "Characteristic not found for device " << name() << address().toString();
break;
}
if (service->serviceUuid().data1 == 0xf000aa50) {
service->writeCharacteristic(sensorConfig, QByteArray::fromHex("07"));
} else {
service->writeCharacteristic(sensorConfig, QByteArray::fromHex("01"));
}
if (service->serviceUuid().data1 == 0xf000aa40) {
service->writeCharacteristic(sensorConfig, QByteArray::fromHex("02"));
auto calibId = service->serviceUuid();
calibId.data1 += 3;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
service->readCharacteristic(service->characteristic(calibId));
#endif
}
// TODO: initialize the states with the current value
}
break;
default:
break;
}
}
inline quint16 buildUINT16(quint8 loByte, quint8 hiByte) {
return ((quint16)(((loByte) & 0x00FF) + (((hiByte) & 0x00FF) << 8)));
}
void SensorTag::onServiceCharacteristicChanged(const QLowEnergyCharacteristic &characteristic, const QByteArray &value)
{
qCDebug(dcMultiSensor) << "Service characteristic changed" << characteristic.uuid().toString() << value.toHex();
auto id = characteristic.uuid();
id.data1 -= 1;
switch (characteristic.uuid().data1) {
case 0xf000aa01: {
const quint16 *data = reinterpret_cast<const quint16 *>(value.constData());
qint16 rawTamb = data[1];
m_temperatureValues.append((double)rawTamb / 128);
if (m_temperatureValues.count() % 60 == 0) {
emit valueChanged(temperatureStateTypeId, calculateMeanValue(m_temperatureValues));
m_temperatureValues.clear();
}
qint16 Vobj2 = (double)data[0];
Vobj2 *= 0.00000015625;
double Tdie2 = ((double)rawTamb / 128) + 273.15;
const double S0 = 6.4E-14; // Calibration factor
const double a1 = 1.75E-3;
const double a2 = -1.678E-5;
const double b0 = -2.94E-5;
const double b1 = -5.7E-7;
const double b2 = 4.63E-9;
const double c2 = 13.4;
const double Tref = 298.15;
double S = S0*(1+a1*(Tdie2 - Tref)+a2*qPow((Tdie2 - Tref),2));
double Vos = b0 + b1*(Tdie2 - Tref) + b2*qPow((Tdie2 - Tref),2);
double fObj = (Vobj2 - Vos) + c2*qPow((Vobj2 - Vos),2);
double tObj = qPow(qPow(Tdie2,4) + (fObj/S),.25);
m_irTemperatureValues.append(tObj - 273.15);
if (m_irTemperatureValues.count() % 60 == 0) {
emit valueChanged(IRtemperatureStateTypeId, calculateMeanValue(m_irTemperatureValues));
m_irTemperatureValues.clear();
}
break;
}
case 0xf000aa11: {
// TODO: evaluate movement
// const qint8 *data = reinterpret_cast<const qint8 *>(value.constData());
// emit valueChanged(accelerationXStateTypeId, (double)data[0] / 64);
// emit valueChanged(accelerationYStateTypeId, (double)data[1] / 64);
// emit valueChanged(accelerationZStateTypeId, (double)data[2] / 64);
break;
}
case 0xf000aa21: {
const quint16 *data = reinterpret_cast<const quint16 *>(value.constData());
quint16 rawH = data[1];
rawH &= ~0x0003;
m_humidityValues.append(-6.0 + 125.0/65536 * (double)rawH);
if (m_humidityValues.count() % 60 == 0) {
emit valueChanged(humidityStateTypeId, calculateMeanValue(m_humidityValues));
m_humidityValues.clear();
}
break;
}
case 0xf000aa31: {
// TODO: evaluate movement
// const qint16 *data = reinterpret_cast<const qint16 *>(value.constData());
// emit valueChanged(magneticFieldXStateTypeId, (double)data[0] / 32.768);
// emit valueChanged(magneticFieldYStateTypeId, (double)data[1] / 32.768);
// emit valueChanged(magneticFieldZStateTypeId, (double)data[2] / 32.768);
break;
}
case 0xf000aa41: {
if (m_c.empty())
break;
const quint16 *data = reinterpret_cast<const quint16 *>(value.constData());
quint16 Pr = data[1];
qint16 Tr = data[0];
// Sensitivity
qint64 s = (qint64)m_c[2];
qint64 val = (qint64)m_c[3] * Tr;
s += (val >> 17);
val = (qint64)m_c2[0] * Tr * Tr;
s += (val >> 34);
// Offset
qint64 o = (qint64)m_c2[1] << 14;
val = (qint64)m_c2[2] * Tr;
o += (val >> 3);
val = (qint64)m_c2[3] * Tr * Tr;
o += (val >> 19);
// Pressure (Pa)
qint64 pres = ((qint64)(s * Pr) + o) >> 14;
m_pressureValues.append((double)pres/100);
if (m_pressureValues.count() % 60 == 0) {
emit valueChanged(pressureStateTypeId, calculateMeanValue(m_pressureValues));
m_pressureValues.clear();
}
break;
}
case 0xf000aa43: {
const quint8 *data = reinterpret_cast<const quint8 *>(value.constData());
m_c.resize(4);
m_c2.resize(4);
m_c[0] = buildUINT16(data[0],data[1]);
m_c[1] = buildUINT16(data[2],data[3]);
m_c[2] = buildUINT16(data[4],data[5]);
m_c[3] = buildUINT16(data[6],data[7]);
m_c2[0] = buildUINT16(data[8],data[9]);
m_c2[1] = buildUINT16(data[10],data[11]);
m_c2[2] = buildUINT16(data[12],data[13]);
m_c2[3] = buildUINT16(data[14],data[15]);
break;
}
case 0xf000aa51: {
// TODO: evaluate movement
// const qint16 *data = reinterpret_cast<const qint16 *>(value.constData());
// emit valueChanged(rotationXStateTypeId, (double)data[0] / 131.072);
// emit valueChanged(rotationYStateTypeId, (double)data[1] / 131.072);
// emit valueChanged(rotationZStateTypeId, (double)data[2] / 131.072);
break;
}
case 0xffe1: {
const quint8 *data = reinterpret_cast<const quint8 *>(value.constData());
if (*data & 1)
emit event(leftKeyEventTypeId);
if (*data & 2)
emit event(rightKeyEventTypeId);
break;
}
default:
break;
}
}
void SensorTag::onServiceError(const QLowEnergyService::ServiceError &error)
{
QString errorString;
switch (error) {
case QLowEnergyService::NoError:
errorString = "No error";
break;
case QLowEnergyService::OperationError:
errorString = "Operation error";
break;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
case QLowEnergyService::CharacteristicReadError:
errorString = "Characteristic read error";
break;
#endif
case QLowEnergyService::CharacteristicWriteError:
errorString = "Characteristic write error";
break;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
case QLowEnergyService::DescriptorReadError:
errorString = "Descriptor read error";
break;
#endif
case QLowEnergyService::DescriptorWriteError:
errorString = "Descriptor write error";
break;
#if (QT_VERSION >= QT_VERSION_CHECK(5, 5, 0))
case QLowEnergyService::UnknownError:
errorString = "Unknown error";
break;
#endif
default:
errorString = "Unknown error";
break;
}
qCWarning(dcMultiSensor) << "Service of " << name() << address().toString() << ":" << errorString;
}
#endif // BLUETOOTH_LE

View File

@ -1,79 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2015 Simon Stürz <simon.stuerz@guh.io> *
* Copyright (C) 2016 nicc *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef SENSORTAG_H
#define SENSORTAG_H
#ifdef BLUETOOTH_LE
#include <QHash>
#include <QList>
#include <QSharedPointer>
#include <QLowEnergyService>
#include "bluetooth/bluetoothlowenergydevice.h"
#include "extern-plugininfo.h"
class SensorTag : public BluetoothLowEnergyDevice
{
Q_OBJECT
public:
explicit SensorTag(const QBluetoothDeviceInfo &deviceInfo, const QLowEnergyController::RemoteAddressType &addressType, QObject *parent = 0);
signals:
void valueChanged(StateTypeId state, QVariant value);
void event(EventTypeId event);
private:
QHash<QBluetoothUuid, QSharedPointer<QLowEnergyService>> m_services{
{QBluetoothUuid(QUuid("f000aa00-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("f000aa10-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("f000aa20-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("f000aa30-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("f000aa40-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("f000aa50-0451-4000-b000-000000000000")), QSharedPointer<QLowEnergyService>()},
{QBluetoothUuid(QUuid("0000ffe0-0000-1000-8000-00805f9b34fb")), QSharedPointer<QLowEnergyService>()}
};
QVector<quint16> m_c;
QVector<qint16> m_c2;
QList<double> m_temperatureValues;
QList<double> m_irTemperatureValues;
QList<double> m_humidityValues;
QList<double> m_pressureValues;
double calculateMeanValue(const QList<double> &list);
private slots:
void setupServices();
void onConnectionStatusChanged();
// Service
void onServiceStateChanged(const QLowEnergyService::ServiceState &state);
void onServiceCharacteristicChanged(const QLowEnergyCharacteristic &characteristic, const QByteArray &value);
void onServiceError(const QLowEnergyService::ServiceError &error);
};
#endif // BLUETOOTH_LE
#endif // SENSORTAG_H

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>MultiSensor</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="49"/>
<source>MultiSensor</source>
<extracomment>The name of the plugin MultiSensor (23bf0d8d-df7d-4bee-80ee-f015c5a7f52e)</extracomment>
<translation>Multi Sensor</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="52"/>
<source>Texas Instruments</source>
<extracomment>The name of the vendor (2edf543e-dc2c-4693-bb0c-e76c0d305fad)</extracomment>
<translation>Texas Instruments</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="55"/>
<source>Sensor Tag</source>
<extracomment>The name of the DeviceClass (158a06b6-b27f-4951-957e-6f1e3b44f604)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="58"/>
<source>name</source>
<extracomment>The name of the paramType (bdb9d684-2f98-45f5-889c-f184c1e73dc7) of Sensor Tag</extracomment>
<translation>Name</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="61"/>
<source>mac address</source>
<extracomment>The name of the paramType (d51ed68e-c84a-4136-a5b5-be2f95fd5a0f) of Sensor Tag</extracomment>
<translation>Mac Adresse</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="64"/>
<source>connected changed</source>
<extracomment>The name of the autocreated EventType (a9629b11-0f34-47f0-a0f0-f758a6aec2b4)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="67"/>
<source>connected</source>
<extracomment>The name of the ParamType of StateType (a9629b11-0f34-47f0-a0f0-f758a6aec2b4) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="70"/>
<source>IR temperature changed</source>
<extracomment>The name of the autocreated EventType (c664e9ec-a045-49ba-add1-1642ceba7c4f)</extracomment>
<translation>IR Temperatur geändert</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="73"/>
<source>IR temperature</source>
<extracomment>The name of the ParamType of StateType (c664e9ec-a045-49ba-add1-1642ceba7c4f) of DeviceClass Sensor Tag</extracomment>
<translation>IR Temperatur</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="76"/>
<source>humidity changed</source>
<extracomment>The name of the autocreated EventType (e83a50ff-96c9-4b6d-889f-f4238353e794)</extracomment>
<translation>Luftfeuchtigkeit geändert</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="79"/>
<source>humidity</source>
<extracomment>The name of the ParamType of StateType (e83a50ff-96c9-4b6d-889f-f4238353e794) of DeviceClass Sensor Tag</extracomment>
<translation>Luftfeuchtigkeit</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="82"/>
<source>temperature changed</source>
<extracomment>The name of the autocreated EventType (8359ada9-df1c-4e60-bb87-9e21d05ee2e2)</extracomment>
<translation>Temperatur geändert</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="85"/>
<source>temperature</source>
<extracomment>The name of the ParamType of StateType (8359ada9-df1c-4e60-bb87-9e21d05ee2e2) of DeviceClass Sensor Tag</extracomment>
<translation>Temperatur</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="88"/>
<source>pressure changed</source>
<extracomment>The name of the autocreated EventType (645633ad-77d4-45b2-8be8-d6ca7a12eb7a)</extracomment>
<translation>Luftdruck geändert</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="91"/>
<source>pressure</source>
<extracomment>The name of the ParamType of StateType (645633ad-77d4-45b2-8be8-d6ca7a12eb7a) of DeviceClass Sensor Tag</extracomment>
<translation>Luftdruck</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="94"/>
<source>moving changed</source>
<extracomment>The name of the autocreated EventType (4be5ca26-0565-419d-b18b-2a5a385d2a3d)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="97"/>
<source>moving</source>
<extracomment>The name of the ParamType of StateType (4be5ca26-0565-419d-b18b-2a5a385d2a3d) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="100"/>
<source>left key pressed</source>
<extracomment>The name of the EventType 61478490-bed0-4fed-9d58-f13c35b4f220 of deviceClass Sensor Tag</extracomment>
<translation>Linke Taste gedrückt</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="103"/>
<source>right key pressed</source>
<extracomment>The name of the EventType b7e927db-af28-4fdc-8eb7-edb02258ff5a of deviceClass Sensor Tag</extracomment>
<translation>Rechte Taste gedrückt</translation>
</message>
</context>
</TS>

View File

@ -1,121 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>MultiSensor</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="49"/>
<source>MultiSensor</source>
<extracomment>The name of the plugin MultiSensor (23bf0d8d-df7d-4bee-80ee-f015c5a7f52e)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="52"/>
<source>Texas Instruments</source>
<extracomment>The name of the vendor (2edf543e-dc2c-4693-bb0c-e76c0d305fad)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="55"/>
<source>Sensor Tag</source>
<extracomment>The name of the DeviceClass (158a06b6-b27f-4951-957e-6f1e3b44f604)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="58"/>
<source>name</source>
<extracomment>The name of the paramType (bdb9d684-2f98-45f5-889c-f184c1e73dc7) of Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="61"/>
<source>mac address</source>
<extracomment>The name of the paramType (d51ed68e-c84a-4136-a5b5-be2f95fd5a0f) of Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="64"/>
<source>connected changed</source>
<extracomment>The name of the autocreated EventType (a9629b11-0f34-47f0-a0f0-f758a6aec2b4)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="67"/>
<source>connected</source>
<extracomment>The name of the ParamType of StateType (a9629b11-0f34-47f0-a0f0-f758a6aec2b4) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="70"/>
<source>IR temperature changed</source>
<extracomment>The name of the autocreated EventType (c664e9ec-a045-49ba-add1-1642ceba7c4f)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="73"/>
<source>IR temperature</source>
<extracomment>The name of the ParamType of StateType (c664e9ec-a045-49ba-add1-1642ceba7c4f) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="76"/>
<source>humidity changed</source>
<extracomment>The name of the autocreated EventType (e83a50ff-96c9-4b6d-889f-f4238353e794)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="79"/>
<source>humidity</source>
<extracomment>The name of the ParamType of StateType (e83a50ff-96c9-4b6d-889f-f4238353e794) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="82"/>
<source>temperature changed</source>
<extracomment>The name of the autocreated EventType (8359ada9-df1c-4e60-bb87-9e21d05ee2e2)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="85"/>
<source>temperature</source>
<extracomment>The name of the ParamType of StateType (8359ada9-df1c-4e60-bb87-9e21d05ee2e2) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="88"/>
<source>pressure changed</source>
<extracomment>The name of the autocreated EventType (645633ad-77d4-45b2-8be8-d6ca7a12eb7a)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="91"/>
<source>pressure</source>
<extracomment>The name of the ParamType of StateType (645633ad-77d4-45b2-8be8-d6ca7a12eb7a) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="94"/>
<source>moving changed</source>
<extracomment>The name of the autocreated EventType (4be5ca26-0565-419d-b18b-2a5a385d2a3d)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="97"/>
<source>moving</source>
<extracomment>The name of the ParamType of StateType (4be5ca26-0565-419d-b18b-2a5a385d2a3d) of DeviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="100"/>
<source>left key pressed</source>
<extracomment>The name of the EventType 61478490-bed0-4fed-9d58-f13c35b4f220 of deviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/multisensor/plugininfo.h" line="103"/>
<source>right key pressed</source>
<extracomment>The name of the EventType b7e927db-af28-4fdc-8eb7-edb02258ff5a of deviceClass Sensor Tag</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,80 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2016 Alexander Lampret <alexander.lampret@gmail.com> *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "devicepluginpushbullet.h"
#include "plugin/device.h"
#include "plugininfo.h"
DevicePluginPushbullet::DevicePluginPushbullet() {
}
DeviceManager::HardwareResources DevicePluginPushbullet::requiredHardware() const {
return DeviceManager::HardwareResourceNetworkManager;
}
DeviceManager::DeviceSetupStatus DevicePluginPushbullet::setupDevice(Device *device) {
Q_UNUSED(device);
return DeviceManager::DeviceSetupStatusSuccess;
}
void DevicePluginPushbullet::networkManagerReplyReady(QNetworkReply *reply)
{
if (m_asyncActions.keys().contains(reply)) {
ActionId actionId = m_asyncActions.value(reply);
if (reply->error()) {
qCWarning(dcPushbullet) << "Pushbullet reply error: " << reply->errorString();
emit actionExecutionFinished(actionId, DeviceManager::DeviceErrorInvalidParameter);
reply->deleteLater();
return;
}
if (reply->readAll().contains("error")) {
emit actionExecutionFinished(actionId, DeviceManager::DeviceErrorHardwareFailure);
} else {
emit actionExecutionFinished(actionId, DeviceManager::DeviceErrorNoError);
}
}
reply->deleteLater();
}
DeviceManager::DeviceError DevicePluginPushbullet::executeAction(Device *device, const Action &action) {
if (device->deviceClassId() == pushNotificationDeviceClassId) {
if (action.actionTypeId() == notifyActionTypeId) {
QNetworkReply* reply = sendNotification(device, action.params());
m_asyncActions.insert(reply, action.id());
return DeviceManager::DeviceErrorAsync;
}
return DeviceManager::DeviceErrorActionTypeNotFound;
}
return DeviceManager::DeviceErrorDeviceClassNotFound;
}
QNetworkReply* DevicePluginPushbullet::sendNotification(Device* device, ParamList params) {
QUrlQuery urlParams;
urlParams.addQueryItem("body", params.paramValue(bodyParamTypeId).toByteArray());
urlParams.addQueryItem("title", params.paramValue(titleParamTypeId).toByteArray());
urlParams.addQueryItem("type", "note");
QNetworkRequest request(QUrl("https://api.pushbullet.com/v2/pushes"));
request.setHeader(QNetworkRequest::ContentTypeHeader, "application/x-www-form-urlencoded");
request.setRawHeader(QByteArray("Access-Token"), device->paramValue(tokenParamTypeId).toByteArray());
return networkManagerPost(request, urlParams.toString(QUrl::FullyEncoded).toUtf8());
}

View File

@ -1,53 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2016 Alexander Lampret <alexander.lampret@gmail.com> *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef DEVICEPLUGINPUSHBULLET_H
#define DEVICEPLUGINPUSHBULLET_H
#include "plugin/deviceplugin.h"
#include "devicemanager.h"
#include <QDebug>
#include <QNetworkInterface>
#include <QProcess>
#include <QUrlQuery>
class DevicePluginPushbullet: public DevicePlugin {
Q_OBJECT
Q_PLUGIN_METADATA(IID "guru.guh.DevicePlugin" FILE "devicepluginpushbullet.json")
Q_INTERFACES(DevicePlugin)
public:
DevicePluginPushbullet();
DeviceManager::HardwareResources requiredHardware() const override;
DeviceManager::DeviceSetupStatus setupDevice(Device *device) override;
void networkManagerReplyReady(QNetworkReply *reply) override;
public slots:
DeviceManager::DeviceError executeAction(Device *device, const Action &action) override;
private:
QHash<QNetworkReply *, ActionId> m_asyncActions;
QNetworkReply* sendNotification(Device* device, ParamList params);
};
#endif // DEVICEPLUGINPUSHBULLET_H

View File

@ -1,61 +0,0 @@
{
"name": "Pushbullet",
"idName": "Pushbullet",
"id": "46986575-0e62-483d-b5a8-76ac356fcce7",
"vendors": [
{
"name": "Pushbullet",
"idName": "pushbullet",
"id": "b5e1896e-b7fa-4c19-ac2b-10bd489f8302",
"deviceClasses": [
{
"id": "56029c6d-777b-4889-9e17-29f813d34da4",
"idName": "pushNotification",
"name": "Push Notification",
"createMethods": ["user"],
"basicTags": [
"Service",
"Notification"
],
"paramTypes": [
{
"id": "1f37ce22-50b8-4183-8b74-557fdb2d3076",
"idName": "token",
"name": "access token",
"index": 0,
"type": "QString"
}
],
"actionTypes": [
{
"id": "1378480f-6583-44e2-8fdd-22afe979a9a3",
"idName": "notify",
"name": "notify",
"index": 0,
"paramTypes": [
{
"id": "ceed6e66-0dcb-4405-832d-e9091f882acc",
"idName": "title",
"name": "title",
"type": "QString",
"index": 0,
"inputType": "TextLine",
"defaultValue": ""
},
{
"id": "f72cc56c-4d0b-4b96-ab9b-ff3ca92b00e2",
"idName": "body",
"name": "body",
"type": "QString",
"index": 1,
"inputType": "TextArea",
"defaultValue": ""
}
]
}
]
}
]
}
]
}

View File

@ -1,15 +0,0 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
# Note: include after the TRANSLATIONS definition
include(../plugins.pri)
TARGET = $$qtLibraryTarget(guh_devicepluginpushbullet)
QT += network
SOURCES += \
devicepluginpushbullet.cpp
HEADERS += \
devicepluginpushbullet.h

View File

@ -1 +0,0 @@
<クd<>箆!ソ`。スン

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>Pushbullet</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="31"/>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="34"/>
<source>Pushbullet</source>
<extracomment>The name of the plugin Pushbullet (46986575-0e62-483d-b5a8-76ac356fcce7)
----------
The name of the vendor (b5e1896e-b7fa-4c19-ac2b-10bd489f8302)</extracomment>
<translation>Pushbullet</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="37"/>
<source>Push Notification</source>
<extracomment>The name of the DeviceClass (56029c6d-777b-4889-9e17-29f813d34da4)</extracomment>
<translation>Push Benachrichtigung</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="40"/>
<source>access token</source>
<extracomment>The name of the paramType (1f37ce22-50b8-4183-8b74-557fdb2d3076) of Push Notification</extracomment>
<translation>Zugangstoken</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="43"/>
<source>notify</source>
<extracomment>The name of the ActionType 1378480f-6583-44e2-8fdd-22afe979a9a3 of deviceClass Push Notification</extracomment>
<translation>Benachrichtigen</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="46"/>
<source>title</source>
<extracomment>The name of the paramType (ceed6e66-0dcb-4405-832d-e9091f882acc) of Push Notification</extracomment>
<translation>Titel</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="49"/>
<source>body</source>
<extracomment>The name of the paramType (f72cc56c-4d0b-4b96-ab9b-ff3ca92b00e2) of Push Notification</extracomment>
<translation>Nachricht</translation>
</message>
</context>
</TS>

View File

@ -1,46 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>Pushbullet</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="31"/>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="34"/>
<source>Pushbullet</source>
<extracomment>The name of the plugin Pushbullet (46986575-0e62-483d-b5a8-76ac356fcce7)
----------
The name of the vendor (b5e1896e-b7fa-4c19-ac2b-10bd489f8302)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="37"/>
<source>Push Notification</source>
<extracomment>The name of the DeviceClass (56029c6d-777b-4889-9e17-29f813d34da4)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="40"/>
<source>access token</source>
<extracomment>The name of the paramType (1f37ce22-50b8-4183-8b74-557fdb2d3076) of Push Notification</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="43"/>
<source>notify</source>
<extracomment>The name of the ActionType 1378480f-6583-44e2-8fdd-22afe979a9a3 of deviceClass Push Notification</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="46"/>
<source>title</source>
<extracomment>The name of the paramType (ceed6e66-0dcb-4405-832d-e9091f882acc) of Push Notification</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/pushbullet/plugininfo.h" line="49"/>
<source>body</source>
<extracomment>The name of the paramType (f72cc56c-4d0b-4b96-ab9b-ff3ca92b00e2) of Push Notification</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,146 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2016 Alexander Lampret <alexander.lampret@gmail.com> *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#include "devicepluginusbwde.h"
#include "plugin/device.h"
#include "devicemanager.h"
#include "plugininfo.h"
DevicePluginUsbWde::DevicePluginUsbWde() :
m_bridgeDevice(0)
{
}
DeviceManager::HardwareResources DevicePluginUsbWde::requiredHardware() const
{
return DeviceManager::HardwareResourceTimer;
}
DeviceManager::DeviceSetupStatus DevicePluginUsbWde::setupDevice(Device *device)
{
if (device->deviceClassId() == wdeBridgeDeviceClassId) {
if (m_bridgeDevice != 0) {
qCWarning(dcUsbWde) << "Only one USB WDE device can be configured.";
return DeviceManager::DeviceSetupStatusFailure;
}
m_serialPort = new QSerialPort(this);
m_serialPort->setPortName(device->paramValue(interfaceParamTypeId).toString());
m_serialPort->setBaudRate(device->paramValue(baudrateParamTypeId).toInt());
if (!m_serialPort->open(QIODevice::ReadOnly)) {
qCWarning(dcUsbWde) << device->name() << "can't bind to interface" << device->paramValue(interfaceParamTypeId);
return DeviceManager::DeviceSetupStatusFailure;
}
m_bridgeDevice = device;
connect(m_serialPort, SIGNAL(readyRead()), SLOT(handleReadyRead()));
connect(m_serialPort, SIGNAL(error(QSerialPort::SerialPortError)), SLOT(handleError(QSerialPort::SerialPortError)));
} else {
m_deviceList.insert(device->paramValue(channelParamTypeId).toInt(), device);
}
return DeviceManager::DeviceSetupStatusSuccess;
}
void DevicePluginUsbWde::deviceRemoved(Device *device)
{
if (device->deviceClassId() == wdeBridgeDeviceClassId) {
m_serialPort->close();
m_bridgeDevice = 0;
} else {
m_deviceList.remove(device->paramValue(channelParamTypeId).toInt());
}
}
void DevicePluginUsbWde::handleReadyRead()
{
m_readData.append(m_serialPort->readAll());
}
void DevicePluginUsbWde::handleError(QSerialPort::SerialPortError serialPortError)
{
if (serialPortError == QSerialPort::ReadError) {
qCWarning(dcUsbWde) << "An I/O error occurred while reading the data from port " << m_serialPort->portName() << ", error: " << m_serialPort->errorString();
}
}
void DevicePluginUsbWde::guhTimer()
{
if (!m_readData.isEmpty()) {
// Handle data
QList<QByteArray> parts = m_readData.split(';');
QLocale german(QLocale::German);
// Check if received string is valid (should start with $1 and ends with 0)
if (parts.size() != 25 || !parts.at(0).contains("$1") || !parts.at(24).contains("0")) {
m_readData.clear();
return;
}
// Loop through 8 possible sensor channels
for (int i = 1; i < 9; i++) {
if (!parts.at(2 + i).isEmpty()) {
// Create new device if it does not exist
if (!m_deviceList.contains(i)) {
createNewSensor(i);
} else {
Device* device = m_deviceList.value(i);
device->setStateValue(temperatureStateTypeId, german.toDouble(parts.at(2+i)));
device->setStateValue(humidityStateTypeId, parts.at(2+i+8).toInt());
device->setStateValue(lastUpdateStateTypeId, QDateTime::currentDateTime().toTime_t());
}
}
}
// Check if wind data is available
if (!parts.at(19).isEmpty()) {
// Create new device if it does not exist
if (!m_deviceList.contains(9)) {
createNewSensor(9);
} else {
Device* device = m_deviceList.value(9);
device->setStateValue(temperatureStateTypeId, german.toDouble(parts.at(19)));
device->setStateValue(humidityStateTypeId, parts.at(20).toInt());
device->setStateValue(windStrengthStateTypeId, german.toDouble(parts.at(21)));
device->setStateValue(rainStrengthStateTypeId, german.toDouble(parts.at(22)));
device->setStateValue(isRainStateTypeId, (parts.at(23) == "1"));
device->setStateValue(lastUpdateStateTypeId, QDateTime::currentDateTime().toTime_t());
}
}
m_readData.clear();
}
}
void DevicePluginUsbWde::createNewSensor(int channel)
{
DeviceClassId createClassId;
QString deviceName;
QList<DeviceDescriptor> deviceDescriptors;
createClassId = temperatureSensorDeviceClassId;
deviceName = "Sensor channel " + QString::number(channel);
if (channel == 9) {
createClassId = windRainSensorDeviceClassId;
deviceName = "Weather station";
}
DeviceDescriptor descriptor(createClassId, deviceName, deviceName);
ParamList params;
params.append(Param(nameParamTypeId, "Sensor " + QString::number(channel)));
params.append(Param(channelParamTypeId, channel));
descriptor.setParams(params);
deviceDescriptors.append(descriptor);
emit autoDevicesAppeared(createClassId, deviceDescriptors);
}

View File

@ -1,57 +0,0 @@
/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
* *
* Copyright (C) 2016 Alexander Lampret <alexander.lampret@gmail.com> *
* *
* This file is part of guh. *
* *
* This library is free software; you can redistribute it and/or *
* modify it under the terms of the GNU Lesser General Public *
* License as published by the Free Software Foundation; either *
* version 2.1 of the License, or (at your option) any later version. *
* *
* This library 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 *
* Lesser General Public License for more details. *
* *
* You should have received a copy of the GNU Lesser General Public *
* License along with this library; If not, see *
* <http://www.gnu.org/licenses/>. *
* *
* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
#ifndef DEVICEPLUGINUSBWDE_H
#define DEVICEPLUGINUSBWDE_H
#include "plugin/deviceplugin.h"
#include "devicemanager.h"
#include <QSerialPort>
class DevicePluginUsbWde : public DevicePlugin
{
Q_OBJECT
Q_PLUGIN_METADATA(IID "guru.guh.DevicePlugin" FILE "devicepluginusbwde.json")
Q_INTERFACES(DevicePlugin)
public:
DevicePluginUsbWde();
DeviceManager::HardwareResources requiredHardware() const override;
DeviceManager::DeviceSetupStatus setupDevice(Device *device) override;
void deviceRemoved(Device *device) override;
void guhTimer() override;
private:
Device* m_bridgeDevice;
QSerialPort *m_serialPort;
QByteArray m_readData;
QHash<int, Device *> m_deviceList;
void createNewSensor(int channel);
private slots:
void handleReadyRead();
void handleError(QSerialPort::SerialPortError error);
};
#endif // DEVICEPLUGINUSBWDE_H

View File

@ -1,202 +0,0 @@
{
"name": "USB WDE",
"idName": "UsbWde",
"id": "b01bc368-d674-41ef-a368-6b6a76c96365",
"vendors": [
{
"name": "ELV",
"idName": "ELV",
"id": "55500c7c-9b09-4462-8d71-e5b4b42f6940",
"deviceClasses": [
{
"id": "20e1b650-41d1-41b7-891f-1e68130d1403",
"idName": "wdeBridge",
"name": "USB WDE",
"interfaces": ["gateway"],
"basicTags": [
"Gateway"
],
"createMethods": ["user"],
"paramTypes": [
{
"id": "be6b6bd5-9495-45f0-93d7-80f74f633420",
"idName": "name",
"name": "name",
"type": "QString",
"inputType": "TextLine",
"index": 0
},
{
"id": "965fd538-8e8a-4a84-97d0-5f8fc9ea115e",
"idName": "interface",
"name": "interface",
"type": "QString",
"inputType": "TextLine",
"defaultValue": "/dev/ttyUSB0",
"index": 1
},
{
"id": "b8239c85-8f09-40d5-9ab9-03b3bd0c8fcc",
"idName": "baudrate",
"name": "baudrate",
"type": "int",
"inputType": "TextLine",
"defaultValue": "9600",
"index": 2
}
]
},
{
"id": "e3d839f5-f2a7-48fa-8675-389645413954",
"idName": "temperatureSensor",
"name": "Temperature sensor",
"basicTags": [
"Device",
"Sensor"
],
"createMethods": ["auto"],
"paramTypes": [
{
"id": "bc2baa99-85fe-4f69-b46f-6b32b33db084",
"idName": "name",
"name": "name",
"type": "QString",
"inputType": "TextLine",
"index": 0
},
{
"id": "fc611e60-d975-4d1f-9977-19d2b90c3838",
"idName": "channel",
"name": "channel",
"type": "int",
"readonly": true,
"inputType": "None",
"index": 1
}
],
"stateTypes": [
{
"id": "046e5ffe-7d75-4a8a-ac0a-9310814a800e",
"idName": "lastUpdate",
"name" :"last update",
"type": "unsignedInt",
"unit": "UnixTime",
"defaultValue": 0,
"index": 0,
"eventTypeName": "last update changed"
},
{
"id": "0023a9c1-0d84-499d-88c4-c06b6d793e27",
"idName": "temperature",
"name": "temperature",
"type": "double",
"unit": "DegreeCelsius",
"defaultValue": 0,
"index": 1,
"eventTypeName": "temperature changed"
},
{
"id": "452400e8-89ac-4419-94a8-d6eeb97f694d",
"idName": "humidity",
"name": "humidity",
"type": "int",
"unit": "Percentage",
"defaultValue": 0,
"index": 2,
"eventTypeName": "humidity changed"
}
]
},
{
"id": "2ea29c16-44ad-4cf2-b08d-18c7c6826386",
"idName": "windRainSensor",
"name": "Wind/Rain sensor",
"basicTags": [
"Device",
"Sensor"
],
"createMethods": ["auto"],
"paramTypes": [
{
"id": "bc2baa99-85fe-4f69-b46f-6b32b33db084",
"idName": "name",
"name": "name",
"type": "QString",
"inputType": "TextLine",
"index": 0
},
{
"id": "fc611e60-d975-4d1f-9977-19d2b90c3838",
"idName": "channel",
"name": "channel",
"type": "int",
"readonly": true,
"inputType": "None",
"index": 1
}
],
"stateTypes": [
{
"id": "046e5ffe-7d75-4a8a-ac0a-9310814a800e",
"idName": "lastUpdate",
"name" :"last update",
"type": "unsignedInt",
"unit": "UnixTime",
"defaultValue": 0,
"index": 0,
"eventTypeName": "last update changed"
},
{
"id": "0023a9c1-0d84-499d-88c4-c06b6d793e27",
"idName": "temperature",
"name": "temperature",
"type": "double",
"unit": "DegreeCelsius",
"defaultValue": 0,
"index": 1,
"eventTypeName": "temperature changed"
},
{
"id": "452400e8-89ac-4419-94a8-d6eeb97f694d",
"idName": "humidity",
"name": "humidity",
"type": "int",
"unit": "Percentage",
"defaultValue": 0,
"index": 2,
"eventTypeName": "humidity changed"
},
{
"id": "8e058c13-b5bf-4558-b24e-e3197ba7a9de",
"idName": "windStrength",
"name": "wind strength",
"type": "double",
"unit": "KiloMeterPerHour",
"defaultValue": 0,
"index": 3,
"eventTypeName": "wind strength changed"
},
{
"id": "a6116ea9-1db9-4071-9daf-ae79aab62375",
"idName": "rainStrength",
"name": "rain strength",
"type": "double",
"defaultValue": 0,
"index": 4,
"eventTypeName": "rain strength changed"
},
{
"id": "a9660178-926b-4f86-9593-67678b337039",
"idName": "isRain",
"name": "is raining",
"type": "bool",
"defaultValue": false,
"index": 5,
"eventTypeName": "is raining changed"
}
]
}
]
}
]
}

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1" language="de_DE">
<context>
<name>UsbWde</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="54"/>
<source>ELV</source>
<extracomment>The name of the vendor (55500c7c-9b09-4462-8d71-e5b4b42f6940)</extracomment>
<translation>ELV</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="51"/>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="57"/>
<source>USB WDE</source>
<extracomment>The name of the plugin USB WDE (b01bc368-d674-41ef-a368-6b6a76c96365)
----------
The name of the DeviceClass (20e1b650-41d1-41b7-891f-1e68130d1403)</extracomment>
<translation>USB WDE</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="60"/>
<source>name</source>
<extracomment>The name of the paramType (be6b6bd5-9495-45f0-93d7-80f74f633420) of USB WDE</extracomment>
<translation>Name</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="63"/>
<source>interface</source>
<extracomment>The name of the paramType (965fd538-8e8a-4a84-97d0-5f8fc9ea115e) of USB WDE</extracomment>
<translation>Name</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="66"/>
<source>baudrate</source>
<extracomment>The name of the paramType (b8239c85-8f09-40d5-9ab9-03b3bd0c8fcc) of USB WDE</extracomment>
<translation>Baudrate</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="69"/>
<source>Temperature sensor</source>
<extracomment>The name of the DeviceClass (e3d839f5-f2a7-48fa-8675-389645413954)</extracomment>
<translation>Temperatursensor</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="72"/>
<source>channel</source>
<extracomment>The name of the paramType (fc611e60-d975-4d1f-9977-19d2b90c3838) of Temperature sensor</extracomment>
<translation>Kanal</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="75"/>
<source>last update changed</source>
<extracomment>The name of the autocreated EventType (046e5ffe-7d75-4a8a-ac0a-9310814a800e)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="78"/>
<source>last update</source>
<extracomment>The name of the ParamType of StateType (046e5ffe-7d75-4a8a-ac0a-9310814a800e) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="81"/>
<source>temperature changed</source>
<extracomment>The name of the autocreated EventType (0023a9c1-0d84-499d-88c4-c06b6d793e27)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="84"/>
<source>temperature</source>
<extracomment>The name of the ParamType of StateType (0023a9c1-0d84-499d-88c4-c06b6d793e27) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="87"/>
<source>humidity changed</source>
<extracomment>The name of the autocreated EventType (452400e8-89ac-4419-94a8-d6eeb97f694d)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="90"/>
<source>humidity</source>
<extracomment>The name of the ParamType of StateType (452400e8-89ac-4419-94a8-d6eeb97f694d) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="93"/>
<source>Wind/Rain sensor</source>
<extracomment>The name of the DeviceClass (2ea29c16-44ad-4cf2-b08d-18c7c6826386)</extracomment>
<translation>Wind-/Regensensor</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="96"/>
<source>wind strength changed</source>
<extracomment>The name of the autocreated EventType (8e058c13-b5bf-4558-b24e-e3197ba7a9de)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="99"/>
<source>wind strength</source>
<extracomment>The name of the ParamType of StateType (8e058c13-b5bf-4558-b24e-e3197ba7a9de) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="102"/>
<source>rain strength changed</source>
<extracomment>The name of the autocreated EventType (a6116ea9-1db9-4071-9daf-ae79aab62375)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="105"/>
<source>rain strength</source>
<extracomment>The name of the ParamType of StateType (a6116ea9-1db9-4071-9daf-ae79aab62375) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="108"/>
<source>is raining changed</source>
<extracomment>The name of the autocreated EventType (a9660178-926b-4f86-9593-67678b337039)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="111"/>
<source>is raining</source>
<extracomment>The name of the ParamType of StateType (a9660178-926b-4f86-9593-67678b337039) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,130 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE TS>
<TS version="2.1">
<context>
<name>UsbWde</name>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="54"/>
<source>ELV</source>
<extracomment>The name of the vendor (55500c7c-9b09-4462-8d71-e5b4b42f6940)</extracomment>
<translation>ELV</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="51"/>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="57"/>
<source>USB WDE</source>
<extracomment>The name of the plugin USB WDE (b01bc368-d674-41ef-a368-6b6a76c96365)
----------
The name of the DeviceClass (20e1b650-41d1-41b7-891f-1e68130d1403)</extracomment>
<translation>USB WDE</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="60"/>
<source>name</source>
<extracomment>The name of the paramType (be6b6bd5-9495-45f0-93d7-80f74f633420) of USB WDE</extracomment>
<translation>Name</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="63"/>
<source>interface</source>
<extracomment>The name of the paramType (965fd538-8e8a-4a84-97d0-5f8fc9ea115e) of USB WDE</extracomment>
<translation>Interface</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="66"/>
<source>baudrate</source>
<extracomment>The name of the paramType (b8239c85-8f09-40d5-9ab9-03b3bd0c8fcc) of USB WDE</extracomment>
<translation>Baudrate</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="69"/>
<source>Temperature sensor</source>
<extracomment>The name of the DeviceClass (e3d839f5-f2a7-48fa-8675-389645413954)</extracomment>
<translation>Temperature sensor</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="72"/>
<source>channel</source>
<extracomment>The name of the paramType (fc611e60-d975-4d1f-9977-19d2b90c3838) of Temperature sensor</extracomment>
<translation>Channel</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="75"/>
<source>last update changed</source>
<extracomment>The name of the autocreated EventType (046e5ffe-7d75-4a8a-ac0a-9310814a800e)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="78"/>
<source>last update</source>
<extracomment>The name of the ParamType of StateType (046e5ffe-7d75-4a8a-ac0a-9310814a800e) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="81"/>
<source>temperature changed</source>
<extracomment>The name of the autocreated EventType (0023a9c1-0d84-499d-88c4-c06b6d793e27)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="84"/>
<source>temperature</source>
<extracomment>The name of the ParamType of StateType (0023a9c1-0d84-499d-88c4-c06b6d793e27) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="87"/>
<source>humidity changed</source>
<extracomment>The name of the autocreated EventType (452400e8-89ac-4419-94a8-d6eeb97f694d)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="90"/>
<source>humidity</source>
<extracomment>The name of the ParamType of StateType (452400e8-89ac-4419-94a8-d6eeb97f694d) of DeviceClass Temperature sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="93"/>
<source>Wind/Rain sensor</source>
<extracomment>The name of the DeviceClass (2ea29c16-44ad-4cf2-b08d-18c7c6826386)</extracomment>
<translation>Wind/Rain sensor</translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="96"/>
<source>wind strength changed</source>
<extracomment>The name of the autocreated EventType (8e058c13-b5bf-4558-b24e-e3197ba7a9de)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="99"/>
<source>wind strength</source>
<extracomment>The name of the ParamType of StateType (8e058c13-b5bf-4558-b24e-e3197ba7a9de) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="102"/>
<source>rain strength changed</source>
<extracomment>The name of the autocreated EventType (a6116ea9-1db9-4071-9daf-ae79aab62375)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="105"/>
<source>rain strength</source>
<extracomment>The name of the ParamType of StateType (a6116ea9-1db9-4071-9daf-ae79aab62375) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="108"/>
<source>is raining changed</source>
<extracomment>The name of the autocreated EventType (a9660178-926b-4f86-9593-67678b337039)</extracomment>
<translation type="unfinished"></translation>
</message>
<message>
<location filename="../../../build-guh-plugins-5_8_desktop-Debug/usbwde/plugininfo.h" line="111"/>
<source>is raining</source>
<extracomment>The name of the ParamType of StateType (a9660178-926b-4f86-9593-67678b337039) of DeviceClass Wind/Rain sensor</extracomment>
<translation type="unfinished"></translation>
</message>
</context>
</TS>

View File

@ -1,16 +0,0 @@
TRANSLATIONS = translations/en_US.ts \
translations/de_DE.ts
include(../plugins.pri)
QT += serialport
TARGET = $$qtLibraryTarget(guh_devicepluginusbwde)
SOURCES += \
devicepluginusbwde.cpp
HEADERS += \
devicepluginusbwde.h