diff --git a/conrad/README.md b/conrad/README.md deleted file mode 100644 index c06a9672..00000000 --- a/conrad/README.md +++ /dev/null @@ -1,17 +0,0 @@ -# Conrad - -This plugin allows to controll RF 433 MHz actors an receive remote signals from Conrad devices - -## Supported Things - -* Conrad Shutter (RSM900R) - * Up/Down/Sync - -## Requirements - -* 433 MHz Transceiver - -## More - -http://www.conrad.de - diff --git a/conrad/conrad.pro b/conrad/conrad.pro deleted file mode 100644 index 999c7841..00000000 --- a/conrad/conrad.pro +++ /dev/null @@ -1,11 +0,0 @@ -include(../plugins.pri) - -TARGET = $$qtLibraryTarget(nymea_integrationpluginconrad) - -SOURCES += \ - integrationpluginconrad.cpp - -HEADERS += \ - integrationpluginconrad.h - - diff --git a/conrad/integrationpluginconrad.cpp b/conrad/integrationpluginconrad.cpp deleted file mode 100644 index f860574b..00000000 --- a/conrad/integrationpluginconrad.cpp +++ /dev/null @@ -1,176 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "integrationpluginconrad.h" - -#include "integrations/thing.h" -#include "plugininfo.h" -#include "hardware/radio433/radio433.h" - -#include -#include - - -IntegrationPluginConrad::IntegrationPluginConrad(): IntegrationPlugin() -{ - -} - -void IntegrationPluginConrad::setupThing(ThingSetupInfo *info) -{ - if (info->thing()->thingClassId() == conradShutterThingClassId) { - info->finish(Thing::ThingErrorNoError); - return; - } - - info->finish(Thing::ThingErrorThingClassNotFound); -} - -void IntegrationPluginConrad::executeAction(ThingActionInfo *info) -{ - Thing *thing = info->thing(); - Action action = info->action(); - - if (!hardwareManager()->radio433()->available()) { - info->finish(Thing::ThingErrorHardwareNotAvailable); - return; - } - - QList rawData; - QByteArray binCode; - - int repetitions = 10; - - if (action.actionTypeId() == conradShutterUpActionTypeId) { - binCode = "10101000"; - } else if (action.actionTypeId() == conradShutterDownActionTypeId) { - binCode = "10100000"; - } else if (action.actionTypeId() == conradShutterSyncActionTypeId) { - binCode = "10100000"; - repetitions = 20; - } else { - info->finish(Thing::ThingErrorActionTypeNotFound); - return; - } - - // append ID - binCode.append("100101010110011000000001"); - - //QByteArray remoteId = "100101010110011000000001"; - // QByteArray motionDetectorId = "100100100101101101101010"; - //QByteArray wallSwitchId = "000001001101000010110110"; - // QByteArray randomID = "100010101010111010101010"; - - - - // ======================================= - //create rawData timings list - int delay = 650; - - // sync signal - rawData.append(1); - rawData.append(10); - - // add the code - foreach (QChar c, binCode) { - if(c == '0'){ - rawData.append(1); - rawData.append(2); - } - if(c == '1'){ - rawData.append(2); - rawData.append(1); - } - } - - // ======================================= - // send data to driver - if(hardwareManager()->radio433()->sendData(delay, rawData, repetitions)){ - qCDebug(dcConrad) << "Transmitted successfully" << thing->name() << action.actionTypeId(); - }else{ - qCWarning(dcConrad) << "Could not transmitt" << pluginName() << thing->name() << action.actionTypeId(); - info->finish(Thing::ThingErrorHardwareNotAvailable); - return; - } - info->finish(Thing::ThingErrorNoError); -} - -void IntegrationPluginConrad::radioData(const QList &rawData) -{ - // filter right here a wrong signal length - if(rawData.length() != 65){ - return; - } - - qCDebug(dcConrad) << rawData; - - int delay = rawData.first()/10; - QByteArray binCode; - - // ======================================= - // average 650 - if(delay > 600 && delay < 750){ - // go trough all 64 timings (without sync signal) - for(int i = 1; i <= 64; i+=2 ){ - int div; - int divNext; - - // if short - if(rawData.at(i) <= 900){ - div = 1; - }else{ - div = 2; - } - // if long - if(rawData.at(i+1) < 900){ - divNext = 1; - }else{ - divNext = 2; - } - - // _ - // if we have | |__ = 0 -> in 4 delays => 100 - // __ - // if we have | |_ = 1 -> in 4 delays => 110 - - if(div == 1 && divNext == 2){ - binCode.append('0'); - }else if(div == 2 && divNext == 1){ - binCode.append('1'); - }else{ - return; - } - } - }else{ - return; - } - - qCDebug(dcConrad) << binCode.left(binCode.length() - 24) << " ID = " << binCode.right(24); -} diff --git a/conrad/integrationpluginconrad.h b/conrad/integrationpluginconrad.h deleted file mode 100644 index b18877c1..00000000 --- a/conrad/integrationpluginconrad.h +++ /dev/null @@ -1,53 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef INTEGRATIONPLUGINCONRAD_H -#define INTEGRATIONPLUGINCONRAD_H - -#include "integrations/integrationplugin.h" - -class IntegrationPluginConrad : public IntegrationPlugin -{ - Q_OBJECT - - Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginconrad.json") - Q_INTERFACES(IntegrationPlugin) - -public: - explicit IntegrationPluginConrad(); - - void setupThing(ThingSetupInfo *info) override; - void radioData(const QList &rawData); - - void executeAction(ThingActionInfo *info) override; - -}; - -#endif // INTEGRATIONPLUGINCONRAD_H diff --git a/conrad/integrationpluginconrad.json b/conrad/integrationpluginconrad.json deleted file mode 100644 index a2f864c5..00000000 --- a/conrad/integrationpluginconrad.json +++ /dev/null @@ -1,38 +0,0 @@ -{ - "name": "Conrad", - "displayName": "Conrad", - "id": "1fd1a076-f229-4ec6-b501-48ddd15935e4", - "vendors": [ - { - "name": "Conrad", - "displayName": "Conrad Electronic", - "id": "986cf06f-3ef1-4271-b2a3-2cc277ebecb6", - "thingClasses": [ - { - "id": "2bb14180-aa5d-4999-992d-e6d464cff486", - "name": "conradShutter", - "displayName": "Shutter (RSM900R)", - "createMethods": ["user"], - "paramTypes": [ ], - "actionTypes": [ - { - "id": "e015419c-9df9-4bf5-a439-f1f32aedd1db", - "name": "up", - "displayName": "up" - }, - { - "id": "c58a463a-f765-4a61-b2e2-883cc23878c0", - "name": "down", - "displayName": "down" - }, - { - "id": "4125a18e-fa2d-4b25-acd1-e148d5d665f5", - "name": "sync", - "displayName": "Send sync signal" - } - ] - } - ] - } - ] -} diff --git a/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-de_DE.ts b/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-de_DE.ts deleted file mode 100644 index 965f4f80..00000000 --- a/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-de_DE.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Conrad - - - Conrad - The name of the plugin Conrad ({1fd1a076-f229-4ec6-b501-48ddd15935e4}) - Conrad - - - - Conrad Electronic - The name of the vendor ({986cf06f-3ef1-4271-b2a3-2cc277ebecb6}) - Conrad Electronic - - - - Shutter (RSM900R) - The name of the ThingClass ({2bb14180-aa5d-4999-992d-e6d464cff486}) - Jalousieschalter (RSM900R) - - - - up - The name of the ActionType ({e015419c-9df9-4bf5-a439-f1f32aedd1db}) of ThingClass conradShutter - - - - - down - The name of the ActionType ({c58a463a-f765-4a61-b2e2-883cc23878c0}) of ThingClass conradShutter - - - - - Send sync signal - The name of the ActionType ({4125a18e-fa2d-4b25-acd1-e148d5d665f5}) of ThingClass conradShutter - - - - diff --git a/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-en_US.ts b/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-en_US.ts deleted file mode 100644 index a14fa821..00000000 --- a/conrad/translations/1fd1a076-f229-4ec6-b501-48ddd15935e4-en_US.ts +++ /dev/null @@ -1,43 +0,0 @@ - - - - - Conrad - - - Conrad - The name of the plugin Conrad ({1fd1a076-f229-4ec6-b501-48ddd15935e4}) - - - - - Conrad Electronic - The name of the vendor ({986cf06f-3ef1-4271-b2a3-2cc277ebecb6}) - - - - - Shutter (RSM900R) - The name of the ThingClass ({2bb14180-aa5d-4999-992d-e6d464cff486}) - - - - - up - The name of the ActionType ({e015419c-9df9-4bf5-a439-f1f32aedd1db}) of ThingClass conradShutter - - - - - down - The name of the ActionType ({c58a463a-f765-4a61-b2e2-883cc23878c0}) of ThingClass conradShutter - - - - - Send sync signal - The name of the ActionType ({4125a18e-fa2d-4b25-acd1-e148d5d665f5}) of ThingClass conradShutter - - - - diff --git a/debian/control b/debian/control index 4f42fc1c..8c4c3847 100644 --- a/debian/control +++ b/debian/control @@ -151,22 +151,6 @@ Description: nymea.io plugin for commandlauncher This package will install the nymea.io plugin for commandlauncher -Package: nymea-plugin-conrad -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - nymea-plugins-translations, -Replaces: guh-plugin-conrad -Description: nymea.io plugin for conrad - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the nymea.io plugin for conrad - - Package: nymea-plugin-datetime Architecture: any Depends: ${shlibs:Depends}, @@ -262,22 +246,6 @@ Description: nymea.io plugin for elgato This package will install the nymea.io plugin for elgato -Package: nymea-plugin-elro -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - nymea-plugins-translations, -Replaces: guh-plugin-elro -Description: nymea.io plugin for elro - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the nymea.io plugin for elro - - Package: nymea-plugin-flowercare Architecture: any Depends: ${shlibs:Depends}, @@ -357,22 +325,6 @@ Description: nymea.io plugin for gpio This package will install the nymea.io plugin for gpio -Package: nymea-plugin-intertechno -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - nymea-plugins-translations, -Replaces: guh-plugin-intertechno -Description: nymea.io plugin for intertechno - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the nymea.io plugin for intertechno - - Package: nymea-plugin-kodi Architecture: any Depends: ${shlibs:Depends}, @@ -389,22 +341,6 @@ Description: nymea.io plugin for kodi This package will install the nymea.io plugin for kodi -Package: nymea-plugin-leynew -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - nymea-plugins-translations, -Replaces: guh-plugin-leynew -Description: nymea.io plugin for leynew - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the nymea.io plugin for leynew - - Package: nymea-plugin-lgsmarttv Architecture: any Depends: ${shlibs:Depends}, @@ -704,22 +640,6 @@ Description: nymea.io plugin for UniFi network controllers This package will install the nymea.io plugin for UniFi network controllers -Package: nymea-plugin-unitec -Architecture: any -Depends: ${shlibs:Depends}, - ${misc:Depends}, - nymea-plugins-translations, -Replaces: guh-plugin-unitec -Description: nymea.io plugin for unitec - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the nymea.io plugin for unitec - - Package: nymea-plugin-usbrelay Architecture: any Multi-Arch: same @@ -1078,32 +998,12 @@ Description: Plugins for nymea IoT server - Meta package for 6LoWPAN Merkur boar This package will install the 6LoWPAN Merkur board plugins for nymea. -Package: nymea-plugins-433mhz -Section: libs -Architecture: all -Depends: nymea-plugin-elro, - nymea-plugin-conrad, - nymea-plugin-intertechno, - nymea-plugin-leynew, - nymea-plugin-unitec, -Replaces: guh-plugins-433mhz -Description: Plugins for nymea IoT server - Meta package for RF 433 MHz plugins - The nymea daemon is a plugin based IoT (Internet of Things) server. The - server works like a translator for devices, things and services and - allows them to interact. - With the powerful rule engine you are able to connect any device available - in the system and create individual scenes and behaviors for your environment. - . - This package will install the RF 433 MHz plugins for nymea. - - Package: nymea-plugins-all Section: libs Architecture: all Depends: nymea-plugins, nymea-plugin-simulation, nymea-plugin-snapd, - nymea-plugins-433mhz, nymea-plugins-maker, nymea-plugins-merkurboard, Replaces: guh-plugins-all diff --git a/debian/nymea-plugin-conrad.install.in b/debian/nymea-plugin-conrad.install.in deleted file mode 100644 index 3900f48e..00000000 --- a/debian/nymea-plugin-conrad.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginconrad.so \ No newline at end of file diff --git a/debian/nymea-plugin-elro.install.in b/debian/nymea-plugin-elro.install.in deleted file mode 100644 index 7cbb1906..00000000 --- a/debian/nymea-plugin-elro.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginelro.so \ No newline at end of file diff --git a/debian/nymea-plugin-intertechno.install.in b/debian/nymea-plugin-intertechno.install.in deleted file mode 100644 index 4528d42c..00000000 --- a/debian/nymea-plugin-intertechno.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginintertechno.so \ No newline at end of file diff --git a/debian/nymea-plugin-leynew.install.in b/debian/nymea-plugin-leynew.install.in deleted file mode 100644 index 7d4c6373..00000000 --- a/debian/nymea-plugin-leynew.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginleynew.so \ No newline at end of file diff --git a/debian/nymea-plugin-unitec.install.in b/debian/nymea-plugin-unitec.install.in deleted file mode 100644 index 9fbc13be..00000000 --- a/debian/nymea-plugin-unitec.install.in +++ /dev/null @@ -1 +0,0 @@ -usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginunitec.so diff --git a/elro/README.md b/elro/README.md deleted file mode 100644 index 9e5de8bb..00000000 --- a/elro/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Elro - -This plugin allows to controll RF 433 MHz actors an receive remote signals from [Elro](http://www.elroshop.eu/) devices. - diff --git a/elro/elro.pro b/elro/elro.pro deleted file mode 100644 index ae30152e..00000000 --- a/elro/elro.pro +++ /dev/null @@ -1,11 +0,0 @@ -include(../plugins.pri) - -TARGET = $$qtLibraryTarget(nymea_integrationpluginelro) - -SOURCES += \ - integrationpluginelro.cpp - -HEADERS += \ - integrationpluginelro.h - - diff --git a/elro/integrationpluginelro.cpp b/elro/integrationpluginelro.cpp deleted file mode 100644 index 1dfa3f73..00000000 --- a/elro/integrationpluginelro.cpp +++ /dev/null @@ -1,246 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "integrationpluginelro.h" -#include "plugininfo.h" -#include "hardware/radio433/radio433.h" - - -#include -#include - -IntegrationPluginElro::IntegrationPluginElro() -{ -} - -void IntegrationPluginElro::executeAction(ThingActionInfo *info) -{ - Thing *thing = info->thing(); - Action action = info->action(); - - if (!hardwareManager()->radio433()->available()) - return info->finish(Thing::ThingErrorHardwareNotAvailable); - - if (action.actionTypeId() != elroSocketPowerActionTypeId) - return info->finish(Thing::ThingErrorActionTypeNotFound); - - QList rawData; - QByteArray binCode; - - // create the bincode - // channels - if (thing->paramValue(elroSocketThingChan1ParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingChan2ParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingChan3ParamTypeId).toBool()) { - binCode.append("00"); - }else{ - binCode.append("01"); - } - if(thing->paramValue(elroSocketThingChan4ParamTypeId).toBool()){ - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingChan5ParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - - // Buttons - if (thing->paramValue(elroSocketThingAParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingBParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingCParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingDParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - if (thing->paramValue(elroSocketThingEParamTypeId).toBool()) { - binCode.append("00"); - } else { - binCode.append("01"); - } - - // Power - if (action.param(elroSocketPowerActionPowerParamTypeId).value().toBool()) { - binCode.append("0001"); - } else { - binCode.append("0100"); - } - - //create rawData timings list - int delay = 350; - - // sync signal - rawData.append(1); - rawData.append(31); - - // add the code - foreach (QChar c, binCode) { - if (c == '0') { - rawData.append(1); - rawData.append(3); - } else { - rawData.append(3); - rawData.append(1); - } - } - - // send data to hardware resource - if (hardwareManager()->radio433()->sendData(delay, rawData, 10)) { - qCDebug(dcElro) << "Transmitted" << pluginName() << thing->name() << "power: " << action.param(elroSocketPowerActionPowerParamTypeId).value().toBool(); - } else { - qCWarning(dcElro) << "Could not transmitt" << pluginName() << thing->name() << "power: " << action.param(elroSocketPowerActionPowerParamTypeId).value().toBool(); - return info->finish(Thing::ThingErrorHardwareNotAvailable); - } - - info->finish(Thing::ThingErrorNoError); -} - -void IntegrationPluginElro::radioData(const QList &rawData) -{ - // filter right here a wrong signal length - if (rawData.length() != 49) { - return; - } - - int delay = rawData.first()/31; - QByteArray binCode; - - // average 314 - if (delay > 290 && delay < 400) { - // go trough all 48 timings (without sync signal) - for (int i = 1; i <= 48; i+=2 ) { - int div; - int divNext; - - // if short - if (rawData.at(i) <= 700) { - div = 1; - } else { - div = 3; - } - // if long - if (rawData.at(i+1) < 700) { - divNext = 1; - } else { - divNext = 3; - } - - // _ - // | |___ = 0 -> in 4 delays => 1000 - // _ - // ___| | = 1 -> in 4 delays => 0001 - - if (div == 1 && divNext == 3) { - binCode.append('0'); - } else if(div == 3 && divNext == 1) { - binCode.append('1'); - } else { - return; - } - } - } else { - return; - } - - qCDebug(dcElro) << "Understands this protocol: " << binCode; - - if (binCode.left(20) == "00000100000000000001") { - if (binCode.right(4) == "0100") { - qCDebug(dcElro) << "Motion Detector OFF"; - } else { - qCDebug(dcElro) << "Motion Detector ON"; - } - } - - // get the channel of the remote signal (5 channels, true=1, false=0) - QList group; - for (int i = 1; i < 10; i+=2) { - if (binCode.at(i-1) == '0' && binCode.at(i) == '1') { - group << false; - } else if(binCode.at(i-1) == '0' && binCode.at(i) == '0') { - group << true; - } else { - return; - } - } - - // get the button letter - QString button; - QByteArray buttonCode = binCode.mid(10,10); - - if (buttonCode == "0001010101") { - button = "A"; - } else if (buttonCode == "0100010101") { - button = "B"; - } else if (buttonCode == "0101000101") { - button = "C"; - } else if(buttonCode == "0101010001") { - button = "D"; - } else if(buttonCode == "0101010100") { - button = "E"; - } else { - return; - } - - // get power status -> On = 0100, Off = 0001 - bool power; - if (binCode.right(4).toInt(0,2) == 1) { - power = true; - } else if(binCode.right(4).toInt(0,2) == 4) { - power = false; - } else { - return; - } - - qCDebug(dcElro) << group << buttonCode << power; -} diff --git a/elro/integrationpluginelro.h b/elro/integrationpluginelro.h deleted file mode 100644 index 0ba59af0..00000000 --- a/elro/integrationpluginelro.h +++ /dev/null @@ -1,53 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef INTEGRATIONPLUGINELRO_H -#define INTEGRATIONPLUGINELRO_H - -#include "integrations/integrationplugin.h" - -class IntegrationPluginElro : public IntegrationPlugin -{ - Q_OBJECT - - Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginelro.json") - Q_INTERFACES(IntegrationPlugin) - -public: - explicit IntegrationPluginElro(); - - void radioData(const QList &rawData); - -public slots: - void executeAction(ThingActionInfo *info) override; - -}; - -#endif // INTEGRATIONPLUGINELRO_H diff --git a/elro/integrationpluginelro.json b/elro/integrationpluginelro.json deleted file mode 100644 index 32605c56..00000000 --- a/elro/integrationpluginelro.json +++ /dev/null @@ -1,97 +0,0 @@ - { - "name": "Elro", - "displayName": "Elro", - "id": "2b267f81-d9ae-4f4f-89a0-7386b547cfd3", - "vendors": [ - { - "name": "Elro", - "displayName": "Elro", - "id": "435a13a0-65ca-4f0c-94c1-e5873b258db5", - "thingClasses": [ - { - "id": "308ae6e6-38b3-4b3a-a513-3199da2764f8", - "name": "elroSocket", - "displayName": "Elro Power Socket", - "createMethods": ["user"], - "paramTypes": [ - { - "id": "66b2a017-658a-46d9-9e98-33aaed6345ad", - "name": "chan1", - "displayName": "channel 1", - "type": "bool" - }, - { - "id": "bda44f42-b608-4c70-a370-8d8d2e406205", - "name": "chan2", - "displayName": "channel 2", - "type": "bool" - }, - { - "id": "4165bfb7-f1db-49ce-bad7-34956ea45d03", - "name": "chan3", - "displayName": "channel 3", - "type": "bool" - }, - { - "id": "69960183-8fba-4f94-94b4-6d536e28f3a0", - "name": "chan4", - "displayName": "channel 4", - "type": "bool" - }, - { - "id": "41a9706c-e6e8-4de8-b280-789f1434f6ed", - "name": "chan5", - "displayName": "channel 5", - "type": "bool" - }, - { - "id": "906811d6-e232-42e6-829c-2cdaa9ee5340", - "name": "a", - "displayName": "A", - "type": "bool" - }, - { - "id": "0d9b27f7-01cc-44bc-99f6-65612dee0027", - "name": "b", - "displayName": "B", - "type": "bool" - }, - { - "id": "d82d95db-b6b5-4d0b-9ea6-a00fc455a0ff", - "name": "c", - "displayName": "C", - "type": "bool" - }, - { - "id": "a4a13ee3-605f-4b42-b81b-a26e66f74b26", - "name": "d", - "displayName": "D", - "type": "bool" - }, - { - "id": "e71ee50f-5c54-4a35-877a-743fe928a528", - "name": "e", - "displayName": "E", - "type": "bool" - } - ], - "actionTypes": [ - { - "id": "31c9758e-6567-4f89-85bb-29e1a7c55d44", - "name": "power", - "displayName": "set power", - "paramTypes": [ - { - "id": "004ad008-0084-40be-9b1a-b60e1b30579d", - "name": "power", - "displayName": "power", - "type": "bool" - } - ] - } - ] - } - ] - } - ] -} diff --git a/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-de_DE.ts b/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-de_DE.ts deleted file mode 100644 index 9b1c5e95..00000000 --- a/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-de_DE.ts +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Elro - - - - Elro - The name of the vendor ({435a13a0-65ca-4f0c-94c1-e5873b258db5}) ----------- -The name of the plugin Elro ({2b267f81-d9ae-4f4f-89a0-7386b547cfd3}) - Elro - - - - Elro Power Socket - The name of the ThingClass ({308ae6e6-38b3-4b3a-a513-3199da2764f8}) - Elro Steckdose - - - - channel 1 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {66b2a017-658a-46d9-9e98-33aaed6345ad}) - - - - - channel 2 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {bda44f42-b608-4c70-a370-8d8d2e406205}) - - - - - channel 3 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {4165bfb7-f1db-49ce-bad7-34956ea45d03}) - - - - - channel 4 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {69960183-8fba-4f94-94b4-6d536e28f3a0}) - - - - - channel 5 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {41a9706c-e6e8-4de8-b280-789f1434f6ed}) - - - - - A - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {906811d6-e232-42e6-829c-2cdaa9ee5340}) - - - - - B - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {0d9b27f7-01cc-44bc-99f6-65612dee0027}) - - - - - C - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {d82d95db-b6b5-4d0b-9ea6-a00fc455a0ff}) - - - - - D - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {a4a13ee3-605f-4b42-b81b-a26e66f74b26}) - - - - - E - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {e71ee50f-5c54-4a35-877a-743fe928a528}) - - - - - set power - The name of the ActionType ({31c9758e-6567-4f89-85bb-29e1a7c55d44}) of ThingClass elroSocket - - - - - power - The name of the ParamType (ThingClass: elroSocket, ActionType: power, ID: {004ad008-0084-40be-9b1a-b60e1b30579d}) - - - - diff --git a/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-en_US.ts b/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-en_US.ts deleted file mode 100644 index acf2cdd5..00000000 --- a/elro/translations/2b267f81-d9ae-4f4f-89a0-7386b547cfd3-en_US.ts +++ /dev/null @@ -1,94 +0,0 @@ - - - - - Elro - - - - Elro - The name of the vendor ({435a13a0-65ca-4f0c-94c1-e5873b258db5}) ----------- -The name of the plugin Elro ({2b267f81-d9ae-4f4f-89a0-7386b547cfd3}) - - - - - Elro Power Socket - The name of the ThingClass ({308ae6e6-38b3-4b3a-a513-3199da2764f8}) - - - - - channel 1 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {66b2a017-658a-46d9-9e98-33aaed6345ad}) - - - - - channel 2 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {bda44f42-b608-4c70-a370-8d8d2e406205}) - - - - - channel 3 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {4165bfb7-f1db-49ce-bad7-34956ea45d03}) - - - - - channel 4 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {69960183-8fba-4f94-94b4-6d536e28f3a0}) - - - - - channel 5 - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {41a9706c-e6e8-4de8-b280-789f1434f6ed}) - - - - - A - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {906811d6-e232-42e6-829c-2cdaa9ee5340}) - - - - - B - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {0d9b27f7-01cc-44bc-99f6-65612dee0027}) - - - - - C - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {d82d95db-b6b5-4d0b-9ea6-a00fc455a0ff}) - - - - - D - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {a4a13ee3-605f-4b42-b81b-a26e66f74b26}) - - - - - E - The name of the ParamType (ThingClass: elroSocket, Type: thing, ID: {e71ee50f-5c54-4a35-877a-743fe928a528}) - - - - - set power - The name of the ActionType ({31c9758e-6567-4f89-85bb-29e1a7c55d44}) of ThingClass elroSocket - - - - - power - The name of the ParamType (ThingClass: elroSocket, ActionType: power, ID: {004ad008-0084-40be-9b1a-b60e1b30579d}) - - - - diff --git a/intertechno/README.md b/intertechno/README.md deleted file mode 100644 index d8ca8789..00000000 --- a/intertechno/README.md +++ /dev/null @@ -1,4 +0,0 @@ -# Intertechno - -This plugin allows to control RF 433 MHz actors an receive remote signals from [Intertechno](http://www.intertechno.at) devices. - diff --git a/intertechno/integrationpluginintertechno.cpp b/intertechno/integrationpluginintertechno.cpp deleted file mode 100644 index 01d26191..00000000 --- a/intertechno/integrationpluginintertechno.cpp +++ /dev/null @@ -1,375 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "integrationpluginintertechno.h" - -#include "integrations/thing.h" -#include "hardware/radio433/radio433.h" -#include "plugininfo.h" - -#include -#include - -IntegrationPluginIntertechno::IntegrationPluginIntertechno() -{ - -} - - -void IntegrationPluginIntertechno::executeAction(ThingActionInfo *info) -{ - Thing *thing = info->thing(); - Action action = info->action(); - - if (!hardwareManager()->radio433()->available()) - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("No 433MHz radio available on this system.")); - - QList rawData; - QByteArray binCode; - - QString familyCode = thing->paramValue(switchThingFamilyCodeParamTypeId).toString(); - - // ======================================= - // generate bin from family code - if (familyCode == "A") { - binCode.append("00000000"); - } else if (familyCode == "B") { - binCode.append("01000000"); - } else if (familyCode == "C") { - binCode.append("00010000"); - } else if (familyCode == "D") { - binCode.append("01010000"); - } else if (familyCode == "E") { - binCode.append("00000100"); - } else if (familyCode == "F") { - binCode.append("01000100"); - } else if (familyCode == "G") { - binCode.append("01000000"); - } else if (familyCode == "H") { - binCode.append("01010100"); - } else if (familyCode == "I") { - binCode.append("00000001"); - } else if (familyCode == "J") { - binCode.append("01000001"); - } else if (familyCode == "K") { - binCode.append("00010001"); - } else if (familyCode == "L") { - binCode.append("01010001"); - } else if (familyCode == "M") { - binCode.append("00000101"); - } else if (familyCode == "N") { - binCode.append("01000101"); - } else if (familyCode == "O") { - binCode.append("00010101"); - } else if (familyCode == "P") { - binCode.append("01010101"); - } - - QString buttonCode = thing->paramValue(switchThingButtonCodeParamTypeId).toString(); - - // ======================================= - // generate bin from button code - if (buttonCode == "1") { - binCode.append("00000000"); - } else if (buttonCode == "2") { - binCode.append("01000000"); - } else if (buttonCode == "3") { - binCode.append("00010000"); - } else if (buttonCode == "4") { - binCode.append("01010000"); - } else if (buttonCode == "5") { - binCode.append("00000100"); - } else if (buttonCode == "6") { - binCode.append("01000100"); - } else if (buttonCode == "7") { - binCode.append("01000000"); - } else if (buttonCode == "8") { - binCode.append("01010100"); - } else if (buttonCode == "9") { - binCode.append("00000001"); - } else if (buttonCode == "10") { - binCode.append("01000001"); - } else if (buttonCode == "11") { - binCode.append("00010001"); - } else if (buttonCode == "12") { - binCode.append("01010001"); - } else if (buttonCode == "13") { - binCode.append("00000101"); - } else if (buttonCode == "14") { - binCode.append("01000101"); - } else if (buttonCode == "15") { - binCode.append("00010101"); - } else if (buttonCode == "16") { - binCode.append("01010101"); - } - - if (binCode.length() != 16){ - return info->finish(Thing::ThingErrorInvalidParameter); - } - - // ======================================= - // add fix nibble (0F) - binCode.append("0001"); - - // ======================================= - // add power nibble - if (action.param(switchSetPowerActionPowerParamTypeId).value().toBool()) { - binCode.append("0101"); - } else { - binCode.append("0100"); - } - // ======================================= - //create rawData timings list - int delay = 350; - - // sync signal - rawData.append(1); - rawData.append(31); - - // add the code - foreach (QChar c, binCode) { - if (c == '0') { - rawData.append(1); - rawData.append(3); - } else { - rawData.append(3); - rawData.append(1); - } - } - - // ======================================= - // send data to hardware resource - if (hardwareManager()->radio433()->sendData(delay, rawData, 10)) { - qCDebug(dcIntertechno) << "transmitted" << pluginName() << thing->name() << "power: " << action.param(switchSetPowerActionPowerParamTypeId).value().toBool(); - } else { - qCWarning(dcIntertechno) << "could not transmitt" << pluginName() << thing->name() << "power: " << action.param(switchSetPowerActionPowerParamTypeId).value().toBool(); - return info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error sending data.")); - } - return info->finish(Thing::ThingErrorNoError); -} - -void IntegrationPluginIntertechno::radioData(const QList &rawData) -{ - // filter right here a wrong signal length - if (rawData.length() != 49) { - return; - } - - // QList deviceList = deviceManager()->findConfiguredDevices(intertechnoRemoteThingClassId); - // if (deviceList.isEmpty()) { - // return; - // } - - int delay = rawData.first()/31; - QByteArray binCode; - - // ======================================= - // average 314 - if (delay > 300 && delay < 400) { - // go trough all 48 timings (without sync signal) - for (int i = 1; i <= 48; i+=2 ) { - int div; - int divNext; - - // if short - if (rawData.at(i) <= 700) { - div = 1; - } else { - div = 3; - } - // if long - if (rawData.at(i+1) < 700) { - divNext = 1; - } else { - divNext = 3; - } - - // _ - // if we have | |___ = 0 -> in 4 delays => 1000 - // _ - // if we have ___| | = 1 -> in 4 delays => 0001 - - if (div == 1 && divNext == 3) { - binCode.append('0'); - } else if (div == 3 && divNext == 1) { - binCode.append('1'); - } else { - return; - } - } - } else { - return; - } - - // ======================================= - // Check nibble 16-19, must be 0001 - if (binCode.mid(16,4) != "0001") { - return; - } - - // ======================================= - // Get family code - QString familyCode; - bool ok; - QByteArray familyCodeBin = binCode.left(8); - int famiyCodeInt = familyCodeBin.toInt(&ok,2); - - if (!ok) - return; - - switch (famiyCodeInt) { - case 0b00000000: - familyCode = "A"; - break; - case 0b01000000: - familyCode = "B"; - break; - case 0b00010000: - familyCode = "C"; - break; - case 0b01010000: - familyCode = "D"; - break; - case 0b00000100: - familyCode = "E"; - break; - case 0b01000100: - familyCode = "F"; - break; - case 0b00010100: - familyCode = "G"; - break; - case 0b01010100: - familyCode = "H"; - break; - case 0b00000001: - familyCode = "I"; - break; - case 0b01000001: - familyCode = "J"; - break; - case 0b00010001: - familyCode = "K"; - break; - case 0b01010001: - familyCode = "L"; - break; - case 0b00000101: - familyCode = "M"; - break; - case 0b01000101: - familyCode = "N"; - break; - case 0b00010101: - familyCode = "O"; - break; - case 0b01010101: - familyCode = "P"; - break; - default: - return; - } - - // ======================================= - // Get button code - QString buttonCode; - QByteArray buttonCodeBin = binCode.mid(8,8); - int buttonCodeInt = buttonCodeBin.toInt(&ok,2); - - if (!ok) - return; - - switch (buttonCodeInt) { - case 0b00000000: - buttonCode = "1"; - break; - case 0b01000000: - buttonCode = "2"; - break; - case 0b00010000: - buttonCode = "3"; - break; - case 0b01010000: - buttonCode = "4"; - break; - case 0b00000100: - buttonCode = "5"; - break; - case 0b01000100: - buttonCode = "6"; - break; - case 0b00010100: - buttonCode = "7"; - break; - case 0b01010100: - buttonCode = "8"; - break; - case 0b00000001: - buttonCode = "9"; - break; - case 0b01000001: - buttonCode = "10"; - break; - case 0b00010001: - buttonCode = "11"; - break; - case 0b01010001: - buttonCode = "12"; - break; - case 0b00000101: - buttonCode = "13"; - break; - case 0b01000101: - buttonCode = "14"; - break; - case 0b00010101: - buttonCode = "15"; - break; - case 0b01010101: - buttonCode = "16"; - break; - default: - return; - } - - // ======================================= - // get power status -> On = 0100, Off = 0001 - bool power; - if (binCode.right(4).toInt(0,2) == 5) { - power = true; - } else if (binCode.right(4).toInt(0,2) == 4) { - power = false; - } else { - return; - } - - qCDebug(dcIntertechno) << "Intertechno: family code = " << familyCode << "button code =" << buttonCode << power; - -} diff --git a/intertechno/integrationpluginintertechno.h b/intertechno/integrationpluginintertechno.h deleted file mode 100644 index 94c9c8a6..00000000 --- a/intertechno/integrationpluginintertechno.h +++ /dev/null @@ -1,53 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef INTEGRATIONPLUGININTERTECHNO_H -#define INTEGRATIONPLUGININTERTECHNO_H - -#include "integrations/integrationplugin.h" - -class IntegrationPluginIntertechno : public IntegrationPlugin -{ - Q_OBJECT - - Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginintertechno.json") - Q_INTERFACES(IntegrationPlugin) - -public: - explicit IntegrationPluginIntertechno(); - - void radioData(const QList &rawData); - -public slots: - void executeAction(ThingActionInfo *info) override; - -}; - -#endif // INTEGRATIONPLUGININTERTECHNO_H diff --git a/intertechno/integrationpluginintertechno.json b/intertechno/integrationpluginintertechno.json deleted file mode 100644 index dc4027f5..00000000 --- a/intertechno/integrationpluginintertechno.json +++ /dev/null @@ -1,52 +0,0 @@ -{ - "name": "Intertechno", - "displayName": "Intertechno", - "id": "e998d934-0397-42c1-ad63-9141bcac8563", - "vendors": [ - { - "name": "Intertechno", - "displayName": "Intertechno", - "id": "6a852bc2-34dd-4f4c-9ac9-dd4c32ddbcba", - "thingClasses": [ - { - "id": "324219e8-7c53-41b5-b314-c2900cd15252", - "name": "switch", - "displayName": "Intertechno switch", - "createMethods": ["user"], - "paramTypes": [ - { - "id": "c4e2ec44-5e8e-4168-9f6d-a905ea3329c9", - "name": "familyCode", - "displayName": "family code", - "type": "QString", - "allowedValues": ["A", "B", "C", "D", "E", "F", "G", "H", "I", "J", "K", "L", "M", "N", "O", "P"] - }, - { - "id": "abb67f92-2e3b-40e2-9106-e538e1882d11", - "name": "buttonCode", - "displayName": "button code", - "type": "int", - "minValue": 1, - "maxValue": 16 - } - ], - "actionTypes": [ - { - "id": "df19fb51-c3cd-4b95-8d88-ebbb535f4789", - "name": "setPower", - "displayName": "set power", - "paramTypes": [ - { - "id": "8de21063-631c-4419-be5d-235cea3cd906", - "name": "power", - "displayName": "power", - "type": "bool" - } - ] - } - ] - } - ] - } - ] -} diff --git a/intertechno/intertechno.pro b/intertechno/intertechno.pro deleted file mode 100644 index 7fe8eebf..00000000 --- a/intertechno/intertechno.pro +++ /dev/null @@ -1,11 +0,0 @@ -include(../plugins.pri) - -TARGET = $$qtLibraryTarget(nymea_integrationpluginintertechno) - -SOURCES += \ - integrationpluginintertechno.cpp - -HEADERS += \ - integrationpluginintertechno.h - - diff --git a/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-de_DE.ts b/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-de_DE.ts deleted file mode 100644 index 9a5f7847..00000000 --- a/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-de_DE.ts +++ /dev/null @@ -1,59 +0,0 @@ - - - - - IntegrationPluginIntertechno - - - No 433MHz radio available on this system. - - - - - Error sending data. - - - - - Intertechno - - - - Intertechno - The name of the vendor ({6a852bc2-34dd-4f4c-9ac9-dd4c32ddbcba}) ----------- -The name of the plugin Intertechno ({e998d934-0397-42c1-ad63-9141bcac8563}) - Intertechno - - - - Intertechno switch - The name of the ThingClass ({324219e8-7c53-41b5-b314-c2900cd15252}) - Intertechno Steckdose - - - - family code - The name of the ParamType (ThingClass: switch, Type: thing, ID: {c4e2ec44-5e8e-4168-9f6d-a905ea3329c9}) - - - - - button code - The name of the ParamType (ThingClass: switch, Type: thing, ID: {abb67f92-2e3b-40e2-9106-e538e1882d11}) - - - - - set power - The name of the ActionType ({df19fb51-c3cd-4b95-8d88-ebbb535f4789}) of ThingClass switch - - - - - power - The name of the ParamType (ThingClass: switch, ActionType: setPower, ID: {8de21063-631c-4419-be5d-235cea3cd906}) - - - - diff --git a/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-en_US.ts b/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-en_US.ts deleted file mode 100644 index c5cda6e0..00000000 --- a/intertechno/translations/e998d934-0397-42c1-ad63-9141bcac8563-en_US.ts +++ /dev/null @@ -1,59 +0,0 @@ - - - - - IntegrationPluginIntertechno - - - No 433MHz radio available on this system. - - - - - Error sending data. - - - - - Intertechno - - - - Intertechno - The name of the vendor ({6a852bc2-34dd-4f4c-9ac9-dd4c32ddbcba}) ----------- -The name of the plugin Intertechno ({e998d934-0397-42c1-ad63-9141bcac8563}) - - - - - Intertechno switch - The name of the ThingClass ({324219e8-7c53-41b5-b314-c2900cd15252}) - - - - - family code - The name of the ParamType (ThingClass: switch, Type: thing, ID: {c4e2ec44-5e8e-4168-9f6d-a905ea3329c9}) - - - - - button code - The name of the ParamType (ThingClass: switch, Type: thing, ID: {abb67f92-2e3b-40e2-9106-e538e1882d11}) - - - - - set power - The name of the ActionType ({df19fb51-c3cd-4b95-8d88-ebbb535f4789}) of ThingClass switch - - - - - power - The name of the ParamType (ThingClass: switch, ActionType: setPower, ID: {8de21063-631c-4419-be5d-235cea3cd906}) - - - - diff --git a/leynew/README.md b/leynew/README.md deleted file mode 100644 index 554025dd..00000000 --- a/leynew/README.md +++ /dev/null @@ -1,8 +0,0 @@ -# Leynew - -This plugin allows to control RF 433 MHz actors an receive remote signals from [Leynew](http://www.leynew.com/en/) -devices. - -Currently only the following device is supported: - -[http://www.leynew.com/en/productview.asp?id=589](http://www.leynew.com/en/productview.asp?id=589) diff --git a/leynew/integrationpluginleynew.cpp b/leynew/integrationpluginleynew.cpp deleted file mode 100644 index df9dc1e0..00000000 --- a/leynew/integrationpluginleynew.cpp +++ /dev/null @@ -1,160 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "integrationpluginleynew.h" -#include "plugininfo.h" -#include "hardware/radio433/radio433.h" - -#include -#include - -IntegrationPluginLeynew::IntegrationPluginLeynew() -{ -} - -void IntegrationPluginLeynew::setupThing(ThingSetupInfo *info) -{ - if (!hardwareManager()->radio433()->available()) { - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("No 433 MHz radio available on this system.")); - } -} - -void IntegrationPluginLeynew::executeAction(ThingActionInfo *info) -{ - if (!hardwareManager()->radio433()->available()) { - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("No 433 MHz radio available on this system.")); - } - - Thing *thing = info->thing(); - Action action = info->action(); - - QList rawData; - QByteArray binCode; - - - // TODO: find out how the id will be calculated to bin code or make it discoverable - // ======================================= - // bincode depending on the id - if (thing->paramValue(rfControllerThingIdParamTypeId) == "0115"){ - binCode.append("001101000001"); - } else if (thing->paramValue(rfControllerThingIdParamTypeId) == "0014") { - binCode.append("110000010101"); - } else if (thing->paramValue(rfControllerThingIdParamTypeId) == "0008") { - binCode.append("111101010101"); - } else { - qCWarning(dcLeynew) << "Could not get id of thing: invalid parameter" << thing->paramValue(rfControllerThingIdParamTypeId); - return info->finish(Thing::ThingErrorInvalidParameter); - } - - int repetitions = 12; - // ======================================= - // bincode depending on the action - if (action.actionTypeId() == rfControllerBrightnessUpActionTypeId) { - binCode.append("000000000011"); - repetitions = 8; - } else if (action.actionTypeId() == rfControllerBrightnessDownActionTypeId) { - binCode.append("000000001100"); - repetitions = 8; - } else if (action.actionTypeId() == rfControllerPowerActionTypeId) { - binCode.append("000011000000"); - } else if (action.actionTypeId() == rfControllerRedActionTypeId) { - binCode.append("000000001111"); - } else if (action.actionTypeId() == rfControllerGreenActionTypeId) { - binCode.append("000000110011"); - } else if (action.actionTypeId() == rfControllerBlueActionTypeId) { - binCode.append("000011000011"); - } else if (action.actionTypeId() == rfControllerWhiteActionTypeId) { - binCode.append("000000111100"); - } else if (action.actionTypeId() == rfControllerOrangeActionTypeId) { - binCode.append("000011001100"); - } else if (action.actionTypeId() == rfControllerYellowActionTypeId) { - binCode.append("000011110000"); - } else if (action.actionTypeId() == rfControllerCyanActionTypeId) { - binCode.append("001100000011"); - } else if (action.actionTypeId() == rfControllerPurpleActionTypeId) { - binCode.append("110000000011"); - } else if (action.actionTypeId() == rfControllerPlayPauseActionTypeId) { - binCode.append("000000110000"); - } else if (action.actionTypeId() == rfControllerSpeedUpActionTypeId) { - binCode.append("001100110000"); - repetitions = 8; - } else if (action.actionTypeId() == rfControllerSpeedDownActionTypeId) { - binCode.append("110000000000"); - repetitions = 8; - } else if (action.actionTypeId() == rfControllerAutoActionTypeId) { - binCode.append("001100001100"); - } else if (action.actionTypeId() == rfControllerFlashActionTypeId) { - binCode.append("110011000000"); - } else if (action.actionTypeId() == rfControllerJump3ActionTypeId) { - binCode.append("111100001100"); - } else if (action.actionTypeId() == rfControllerJump7ActionTypeId) { - binCode.append("001111000000"); - } else if (action.actionTypeId() == rfControllerFade3ActionTypeId) { - binCode.append("110000110000"); - } else if (action.actionTypeId() == rfControllerFade7ActionTypeId) { - binCode.append("001100000000"); - } else { - return info->finish(Thing::ThingErrorActionTypeNotFound); - } - - // ======================================= - //create rawData timings list - int delay = 50; - - // sync signal (starting with ON) - rawData.append(3); - rawData.append(90); - - // add the code - foreach (QChar c, binCode) { - if(c == '0'){ - // _ - // | |_ _ - rawData.append(3); - rawData.append(9); - }else{ - // _ _ - // | |_ - rawData.append(9); - rawData.append(3); - } - } - - // ======================================= - // send data to hardware resource - if(hardwareManager()->radio433()->sendData(delay, rawData, repetitions)){ - qCDebug(dcLeynew) << "Transmitted" << pluginName() << thing->name(); - }else{ - qCWarning(dcLeynew) << "Could not transmitt" << pluginName() << thing->name(); - return info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error sending data.")); - } - - info->finish(Thing::ThingErrorNoError); -} diff --git a/leynew/integrationpluginleynew.h b/leynew/integrationpluginleynew.h deleted file mode 100644 index 0cc1e80b..00000000 --- a/leynew/integrationpluginleynew.h +++ /dev/null @@ -1,52 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef INTEGRATIONPLUGINLEYNEW_H -#define INTEGRATIONPLUGINLEYNEW_H - -#include "integrations/integrationplugin.h" - -class IntegrationPluginLeynew : public IntegrationPlugin -{ - Q_OBJECT - - Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginleynew.json") - Q_INTERFACES(IntegrationPlugin) - -public: - explicit IntegrationPluginLeynew(); - - void setupThing(ThingSetupInfo *info) override; - - void executeAction(ThingActionInfo *info) override; - -}; - -#endif // INTEGRATIONPLUGINLEYNEW_H diff --git a/leynew/integrationpluginleynew.json b/leynew/integrationpluginleynew.json deleted file mode 100644 index 8ce8378e..00000000 --- a/leynew/integrationpluginleynew.json +++ /dev/null @@ -1,132 +0,0 @@ - { - "displayName": "Leynew", - "name": "Leynew", - "id": "9a6d23e6-fad8-4203-aeab-2e6e5c756990", - "vendors": [ - { - "displayName": "Leynew", - "name": "leynew", - "id": "83c649b4-49b0-4482-9334-d86a85bfbd2a", - "thingClasses": [ - { - "id": "6b1f8f37-7eb4-46c4-9f15-a6eb4904999c", - "name": "rfController", - "displayName": "RF Controller (LN-CON-RF20B)", - "createMethods": ["user"], - "paramTypes": [ - { - "id": "09e28309-693c-4c89-9ad8-58b643794e85", - "name": "id", - "displayName": "id", - "type": "QString", - "inputType": "TextLine", - "allowedValues": ["0008", "0115", "0014"] - } - ], - "actionTypes": [ - { - "id": "18a30ff1-28d7-4cd0-8388-290db52cd48d", - "name": "brightnessUp", - "displayName": "brightness up" - }, - { - "id": "d1d251b6-ffe6-4b0c-bf03-bfa8947caa1d", - "name": "brightnessDown", - "displayName": "brightness down" - }, - { - "id": "b8b4ef78-126f-431b-b33f-742754da5af4", - "name": "playPause", - "displayName": "play / pause" - }, - { - "id": "35495871-3b80-458b-b60d-5dc614c9fbf1", - "name": "power", - "displayName": "power" - }, - { - "id": "737f77b6-fe2a-45ad-9945-8f0197e57741", - "name": "red", - "displayName": "red" - }, - { - "id": "6471e804-fd54-41dd-88ed-ec46d6cc33db", - "name": "green", - "displayName": "green" - }, - { - "id": "3abfe3c4-f9b3-4b22-aa3a-86ef99adedbe", - "name": "blue", - "displayName": "blue" - }, - { - "id": "6a92d30d-7bce-4238-8e05-d25d3475699c", - "name": "white", - "displayName": "white" - }, - { - "id": "10a145db-adea-4eff-921d-4ce1ceb940cd", - "name": "orange", - "displayName": "orange" - }, - { - "id": "46bbfb97-1600-4e91-930d-6ef4be7bdd9c", - "name": "yellow", - "displayName": "yellow" - }, - { - "id": "7e1db150-c68f-4c54-8259-61d050f31555", - "name": "cyan", - "displayName": "cyan" - }, - { - "id": "4008076e-ff8c-400b-8983-0a452ed66509", - "name": "purple", - "displayName": "purple" - }, - { - "id": "c692b7b0-f891-4729-8e76-4e67f1f6ff4a", - "name": "auto", - "displayName": "auto" - }, - { - "id": "14e696ef-6f9f-4095-9731-5f9e541dd416", - "name": "jump3", - "displayName": "jump 3" - }, - { - "id": "1e764e9f-5ff1-4cd1-b3a8-7feb2a3f204c", - "name": "fade3", - "displayName": "fade 3" - }, - { - "id": "85b37c46-a44c-4989-add2-06b5537fe1a1", - "name": "speedUp", - "displayName": "speed up" - }, - { - "id": "7fdb9f73-e773-4839-9137-3771feabe3e9", - "name": "speedDown", - "displayName": "speed down" - }, - { - "id": "851e024b-0eee-4eec-8261-478c28c03557", - "name": "fade7", - "displayName": "fade 7" - }, - { - "id": "c40392be-323d-48db-a076-40cf4d8cc7eb", - "name": "jump7", - "displayName": "jump 7" - }, - { - "id": "db700960-2b02-4ad3-8257-a28cb5fc6356", - "name": "flash", - "displayName": "flash" - } - ] - } - ] - } - ] -} diff --git a/leynew/leynew.pro b/leynew/leynew.pro deleted file mode 100644 index 55566890..00000000 --- a/leynew/leynew.pro +++ /dev/null @@ -1,11 +0,0 @@ -include(../plugins.pri) - -TARGET = $$qtLibraryTarget(nymea_integrationpluginleynew) - -SOURCES += \ - integrationpluginleynew.cpp - -HEADERS += \ - integrationpluginleynew.h - - diff --git a/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-de_DE.ts b/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-de_DE.ts deleted file mode 100644 index 74c58f91..00000000 --- a/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-de_DE.ts +++ /dev/null @@ -1,162 +0,0 @@ - - - - - IntegrationPluginLeynew - - - - No 433 MHz radio available on this system. - - - - - Error sending data. - - - - - Leynew - - - - Leynew - The name of the vendor ({83c649b4-49b0-4482-9334-d86a85bfbd2a}) ----------- -The name of the plugin Leynew ({9a6d23e6-fad8-4203-aeab-2e6e5c756990}) - Leynew - - - - RF Controller (LN-CON-RF20B) - The name of the ThingClass ({6b1f8f37-7eb4-46c4-9f15-a6eb4904999c}) - RF Kontroller (LN-CON-RF20B) - - - - id - The name of the ParamType (ThingClass: rfController, Type: thing, ID: {09e28309-693c-4c89-9ad8-58b643794e85}) - - - - - brightness up - The name of the ActionType ({18a30ff1-28d7-4cd0-8388-290db52cd48d}) of ThingClass rfController - - - - - brightness down - The name of the ActionType ({d1d251b6-ffe6-4b0c-bf03-bfa8947caa1d}) of ThingClass rfController - - - - - play / pause - The name of the ActionType ({b8b4ef78-126f-431b-b33f-742754da5af4}) of ThingClass rfController - - - - - power - The name of the ActionType ({35495871-3b80-458b-b60d-5dc614c9fbf1}) of ThingClass rfController - - - - - red - The name of the ActionType ({737f77b6-fe2a-45ad-9945-8f0197e57741}) of ThingClass rfController - - - - - green - The name of the ActionType ({6471e804-fd54-41dd-88ed-ec46d6cc33db}) of ThingClass rfController - - - - - blue - The name of the ActionType ({3abfe3c4-f9b3-4b22-aa3a-86ef99adedbe}) of ThingClass rfController - - - - - white - The name of the ActionType ({6a92d30d-7bce-4238-8e05-d25d3475699c}) of ThingClass rfController - - - - - orange - The name of the ActionType ({10a145db-adea-4eff-921d-4ce1ceb940cd}) of ThingClass rfController - - - - - yellow - The name of the ActionType ({46bbfb97-1600-4e91-930d-6ef4be7bdd9c}) of ThingClass rfController - - - - - cyan - The name of the ActionType ({7e1db150-c68f-4c54-8259-61d050f31555}) of ThingClass rfController - - - - - purple - The name of the ActionType ({4008076e-ff8c-400b-8983-0a452ed66509}) of ThingClass rfController - - - - - auto - The name of the ActionType ({c692b7b0-f891-4729-8e76-4e67f1f6ff4a}) of ThingClass rfController - - - - - jump 3 - The name of the ActionType ({14e696ef-6f9f-4095-9731-5f9e541dd416}) of ThingClass rfController - - - - - fade 3 - The name of the ActionType ({1e764e9f-5ff1-4cd1-b3a8-7feb2a3f204c}) of ThingClass rfController - - - - - speed up - The name of the ActionType ({85b37c46-a44c-4989-add2-06b5537fe1a1}) of ThingClass rfController - - - - - speed down - The name of the ActionType ({7fdb9f73-e773-4839-9137-3771feabe3e9}) of ThingClass rfController - - - - - fade 7 - The name of the ActionType ({851e024b-0eee-4eec-8261-478c28c03557}) of ThingClass rfController - - - - - jump 7 - The name of the ActionType ({c40392be-323d-48db-a076-40cf4d8cc7eb}) of ThingClass rfController - - - - - flash - The name of the ActionType ({db700960-2b02-4ad3-8257-a28cb5fc6356}) of ThingClass rfController - - - - diff --git a/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-en_US.ts b/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-en_US.ts deleted file mode 100644 index 5e71492e..00000000 --- a/leynew/translations/9a6d23e6-fad8-4203-aeab-2e6e5c756990-en_US.ts +++ /dev/null @@ -1,162 +0,0 @@ - - - - - IntegrationPluginLeynew - - - - No 433 MHz radio available on this system. - - - - - Error sending data. - - - - - Leynew - - - - Leynew - The name of the vendor ({83c649b4-49b0-4482-9334-d86a85bfbd2a}) ----------- -The name of the plugin Leynew ({9a6d23e6-fad8-4203-aeab-2e6e5c756990}) - - - - - RF Controller (LN-CON-RF20B) - The name of the ThingClass ({6b1f8f37-7eb4-46c4-9f15-a6eb4904999c}) - - - - - id - The name of the ParamType (ThingClass: rfController, Type: thing, ID: {09e28309-693c-4c89-9ad8-58b643794e85}) - - - - - brightness up - The name of the ActionType ({18a30ff1-28d7-4cd0-8388-290db52cd48d}) of ThingClass rfController - - - - - brightness down - The name of the ActionType ({d1d251b6-ffe6-4b0c-bf03-bfa8947caa1d}) of ThingClass rfController - - - - - play / pause - The name of the ActionType ({b8b4ef78-126f-431b-b33f-742754da5af4}) of ThingClass rfController - - - - - power - The name of the ActionType ({35495871-3b80-458b-b60d-5dc614c9fbf1}) of ThingClass rfController - - - - - red - The name of the ActionType ({737f77b6-fe2a-45ad-9945-8f0197e57741}) of ThingClass rfController - - - - - green - The name of the ActionType ({6471e804-fd54-41dd-88ed-ec46d6cc33db}) of ThingClass rfController - - - - - blue - The name of the ActionType ({3abfe3c4-f9b3-4b22-aa3a-86ef99adedbe}) of ThingClass rfController - - - - - white - The name of the ActionType ({6a92d30d-7bce-4238-8e05-d25d3475699c}) of ThingClass rfController - - - - - orange - The name of the ActionType ({10a145db-adea-4eff-921d-4ce1ceb940cd}) of ThingClass rfController - - - - - yellow - The name of the ActionType ({46bbfb97-1600-4e91-930d-6ef4be7bdd9c}) of ThingClass rfController - - - - - cyan - The name of the ActionType ({7e1db150-c68f-4c54-8259-61d050f31555}) of ThingClass rfController - - - - - purple - The name of the ActionType ({4008076e-ff8c-400b-8983-0a452ed66509}) of ThingClass rfController - - - - - auto - The name of the ActionType ({c692b7b0-f891-4729-8e76-4e67f1f6ff4a}) of ThingClass rfController - - - - - jump 3 - The name of the ActionType ({14e696ef-6f9f-4095-9731-5f9e541dd416}) of ThingClass rfController - - - - - fade 3 - The name of the ActionType ({1e764e9f-5ff1-4cd1-b3a8-7feb2a3f204c}) of ThingClass rfController - - - - - speed up - The name of the ActionType ({85b37c46-a44c-4989-add2-06b5537fe1a1}) of ThingClass rfController - - - - - speed down - The name of the ActionType ({7fdb9f73-e773-4839-9137-3771feabe3e9}) of ThingClass rfController - - - - - fade 7 - The name of the ActionType ({851e024b-0eee-4eec-8261-478c28c03557}) of ThingClass rfController - - - - - jump 7 - The name of the ActionType ({c40392be-323d-48db-a076-40cf4d8cc7eb}) of ThingClass rfController - - - - - flash - The name of the ActionType ({db700960-2b02-4ad3-8257-a28cb5fc6356}) of ThingClass rfController - - - - diff --git a/nymea-plugins.pro b/nymea-plugins.pro index 65651f13..7ce410f8 100644 --- a/nymea-plugins.pro +++ b/nymea-plugins.pro @@ -16,17 +16,14 @@ PLUGIN_DIRS = \ dweetio \ dynatrace \ elgato \ - elro \ eq-3 \ flowercare \ genericelements \ genericthings \ gpio \ httpcommander \ - intertechno \ keba \ kodi \ - leynew \ lgsmarttv \ mailnotification \ mqttclient \ @@ -56,7 +53,6 @@ PLUGIN_DIRS = \ tuya \ udpcommander \ unifi \ - unitec \ usbrelay \ wakeonlan \ wemo \ diff --git a/unitec/README.md b/unitec/README.md deleted file mode 100644 index 4198d54a..00000000 --- a/unitec/README.md +++ /dev/null @@ -1,27 +0,0 @@ -# Unitec - -This plugin allows to controll RF 433 MHz actors an receive remote signals from Unitec devices. - -## Usage - -The unitec socket units have a teach function. If you plug in the switch, a red light will start blinking. That means the socket is now in teaching mode. This Unitec switch (48111) can now be added to nymea with the desired Channel (A,B,C or D). - -To pair the socket the power ON button must be pressed, and the switch needs to be in the pairing mode. If the pairing was successful, the switch will turn on. - -NOTE: If a switch loses power once, it needs to be repaired, the devices do not store the teached channel. - -## Supported Things - -* Unitec switch (48111) - * Select channel - * Power on/off - * No internet connection required - -## Requirements - -* 433MHz RF transceiver -* The package “nymea-plugin-anel” must be installed - -## More - -Unitec: http://www.unitec-elektro.de diff --git a/unitec/integrationpluginunitec.cpp b/unitec/integrationpluginunitec.cpp deleted file mode 100644 index 67358386..00000000 --- a/unitec/integrationpluginunitec.cpp +++ /dev/null @@ -1,119 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#include "integrationpluginunitec.h" -#include "plugininfo.h" -#include "hardwaremanager.h" -#include "hardware/radio433/radio433.h" - -#include -#include - -IntegrationPluginUnitec::IntegrationPluginUnitec() -{ -} - -void IntegrationPluginUnitec::setupThing(ThingSetupInfo *info) -{ - if (!hardwareManager()->radio433()->available()) - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("No 433 MHz radio available on this system.")); - - Thing *thing = info->thing(); - - foreach (Thing* d, myThings()) { - if (d->paramValue(switchThingChannelParamTypeId).toString() == thing->paramValue(switchThingChannelParamTypeId).toString()) { - qCWarning(dcUnitec) << "Unitec switch with channel " << thing->paramValue(switchThingChannelParamTypeId).toString() << "already added."; - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("There is already a unitec switch on this channel")); - } - } - - return info->finish(Thing::ThingErrorNoError); -} - -void IntegrationPluginUnitec::executeAction(ThingActionInfo *info) -{ - if (!hardwareManager()->radio433()->available()) - return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("No 433 MHz radio available on this system.")); - - Thing *thing = info->thing(); - Action action = info->action(); - - QList rawData; - QByteArray binCode; - - // Bin codes for buttons - if (thing->paramValue(switchThingChannelParamTypeId).toString() == "A" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == true) { - binCode.append("111011000100111010111111"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "A" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == false) { - binCode.append("111001100110100001011111"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "B" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == true) { - binCode.append("111011000100111010111011"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "B" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == false) { - binCode.append("111000111001100111101011"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "C" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == true) { - binCode.append("111000000011011111000011"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "C" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == false) { - binCode.append("111001100110100001010011"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "D" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == true) { - binCode.append("111001100110100001011101"); - } else if (thing->paramValue(switchThingChannelParamTypeId).toString() == "D" && action.param(switchPowerActionPowerParamTypeId).value().toBool() == false) { - binCode.append("111000000011011111001101"); - } - - // ======================================= - //create rawData timings list - int delay = 500; - - // add sync code - rawData.append(6); - rawData.append(14); - - // add the code - foreach (QChar c, binCode) { - if(c == '0'){ - rawData.append(2); - rawData.append(1); - }else{ - rawData.append(1); - rawData.append(2); - } - } - - // ======================================= - // send data to hardware resource - if(hardwareManager()->radio433()->sendData(delay, rawData, 10)){ - qCDebug(dcUnitec) << "transmitted" << pluginName() << thing->name() << "power: " << action.param(switchPowerActionPowerParamTypeId).value().toBool(); - }else{ - qCWarning(dcUnitec) << "could not transmitt" << pluginName() << thing->name() << "power: " << action.param(switchPowerActionPowerParamTypeId).value().toBool(); - return info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error sending data.")); - } - - return info->finish(Thing::ThingErrorNoError); -} diff --git a/unitec/integrationpluginunitec.h b/unitec/integrationpluginunitec.h deleted file mode 100644 index f5194719..00000000 --- a/unitec/integrationpluginunitec.h +++ /dev/null @@ -1,52 +0,0 @@ -/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * -* -* Copyright 2013 - 2020, nymea GmbH -* Contact: contact@nymea.io -* -* This file is part of nymea. -* This project including source code and documentation is protected by -* copyright law, and remains the property of nymea GmbH. All rights, including -* reproduction, publication, editing and translation, are reserved. The use of -* this project is subject to the terms of a license agreement to be concluded -* with nymea GmbH in accordance with the terms of use of nymea GmbH, available -* under https://nymea.io/license -* -* GNU Lesser General Public License Usage -* Alternatively, this project may be redistributed and/or modified under the -* terms of the GNU Lesser General Public License as published by the Free -* Software Foundation; version 3. This project 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 project. If not, see . -* -* For any further details and any questions please contact us under -* contact@nymea.io or see our FAQ/Licensing Information on -* https://nymea.io/license/faq -* -* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ - -#ifndef INTEGRATIONPLUGINUNITEC_H -#define INTEGRATIONPLUGINUNITEC_H - -#include "integrations/integrationplugin.h" - -class IntegrationPluginUnitec : public IntegrationPlugin -{ - Q_OBJECT - - Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginunitec.json") - Q_INTERFACES(IntegrationPlugin) - -public: - explicit IntegrationPluginUnitec(); - - void setupThing(ThingSetupInfo *info) override; - - void executeAction(ThingActionInfo *info) override; - -}; - -#endif // INTEGRATIONPLUGINUNITEC_H diff --git a/unitec/integrationpluginunitec.json b/unitec/integrationpluginunitec.json deleted file mode 100644 index 0bae2cdc..00000000 --- a/unitec/integrationpluginunitec.json +++ /dev/null @@ -1,44 +0,0 @@ - { - "name": "Unitec", - "displayName": "Unitec", - "id": "aefca391-f8bf-4f6c-a205-6764de3c2c3c", - "vendors": [ - { - "name": "unitec", - "displayName": "Unitec", - "id": "f2cd9a76-5a7f-4c01-bf8c-5eae8b12e95c", - "thingClasses": [ - { - "id": "8468a15d-ecc0-43b6-98ca-e1e4ac9e2df3", - "displayName": "Unitec switch (48111)", - "name": "switch", - "createMethods": ["user"], - "paramTypes": [ - { - "id": "2cb59323-bc01-477c-ac0d-312b25c53463", - "name": "channel", - "displayName": "channel", - "type": "QString", - "allowedValues": ["A", "B", "C", "D"] - } - ], - "actionTypes": [ - { - "id": "3ca1ebc2-bb8e-4429-9664-a7bc4569e73b", - "name": "power", - "displayName": "set power", - "paramTypes": [ - { - "id": "c101c199-314d-420f-a302-0ae29c599047", - "name": "power", - "displayName": "power", - "type": "bool" - } - ] - } - ] - } - ] - } - ] -} diff --git a/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-de_DE.ts b/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-de_DE.ts deleted file mode 100644 index 0a512fb2..00000000 --- a/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-de_DE.ts +++ /dev/null @@ -1,59 +0,0 @@ - - - - - IntegrationPluginUnitec - - - - No 433 MHz radio available on this system. - - - - - There is already a unitec switch on this channel - - - - - Error sending data. - - - - - Unitec - - - - Unitec - The name of the vendor ({f2cd9a76-5a7f-4c01-bf8c-5eae8b12e95c}) ----------- -The name of the plugin Unitec ({aefca391-f8bf-4f6c-a205-6764de3c2c3c}) - Unitec - - - - Unitec switch (48111) - The name of the ThingClass ({8468a15d-ecc0-43b6-98ca-e1e4ac9e2df3}) - Unitec Steckdose (48111) - - - - channel - The name of the ParamType (ThingClass: switch, Type: thing, ID: {2cb59323-bc01-477c-ac0d-312b25c53463}) - - - - - set power - The name of the ActionType ({3ca1ebc2-bb8e-4429-9664-a7bc4569e73b}) of ThingClass switch - - - - - power - The name of the ParamType (ThingClass: switch, ActionType: power, ID: {c101c199-314d-420f-a302-0ae29c599047}) - - - - diff --git a/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-en_US.ts b/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-en_US.ts deleted file mode 100644 index 1e5a8aea..00000000 --- a/unitec/translations/aefca391-f8bf-4f6c-a205-6764de3c2c3c-en_US.ts +++ /dev/null @@ -1,59 +0,0 @@ - - - - - IntegrationPluginUnitec - - - - No 433 MHz radio available on this system. - - - - - There is already a unitec switch on this channel - - - - - Error sending data. - - - - - Unitec - - - - Unitec - The name of the vendor ({f2cd9a76-5a7f-4c01-bf8c-5eae8b12e95c}) ----------- -The name of the plugin Unitec ({aefca391-f8bf-4f6c-a205-6764de3c2c3c}) - - - - - Unitec switch (48111) - The name of the ThingClass ({8468a15d-ecc0-43b6-98ca-e1e4ac9e2df3}) - - - - - channel - The name of the ParamType (ThingClass: switch, Type: thing, ID: {2cb59323-bc01-477c-ac0d-312b25c53463}) - - - - - set power - The name of the ActionType ({3ca1ebc2-bb8e-4429-9664-a7bc4569e73b}) of ThingClass switch - - - - - power - The name of the ParamType (ThingClass: switch, ActionType: power, ID: {c101c199-314d-420f-a302-0ae29c599047}) - - - - diff --git a/unitec/unitec.pro b/unitec/unitec.pro deleted file mode 100644 index 1668171e..00000000 --- a/unitec/unitec.pro +++ /dev/null @@ -1,11 +0,0 @@ -include(../plugins.pri) - -TARGET = $$qtLibraryTarget(nymea_integrationpluginunitec) - -SOURCES += \ - integrationpluginunitec.cpp - -HEADERS += \ - integrationpluginunitec.h - -