Remove generic things plugins (Moved to new repository)
parent
eff66ea2f4
commit
7622a38ee5
|
|
@ -360,35 +360,6 @@ Description: nymea.io plugin for Garadget
|
|||
This package will install the nymea.io plugin for Garadget Garage Door Opener
|
||||
|
||||
|
||||
Package: nymea-plugin-genericelements
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
nymea-plugins-translations,
|
||||
Description: nymea.io plugin for genericelements
|
||||
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 genericelements
|
||||
|
||||
|
||||
Package: nymea-plugin-genericthings
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
${misc:Depends},
|
||||
nymea-plugins-translations,
|
||||
Replaces: nymea-plugin-genericinterfaces
|
||||
Conflicts: nymea-plugin-genericinterfaces
|
||||
Description: nymea.io plugin for generic things
|
||||
Use the generic things plugin to create visually appealing thing setups
|
||||
containing lights, shutter, sensors etc which are connected to GPIOs.
|
||||
.
|
||||
This package will install the nymea.io plugin for genericthings
|
||||
|
||||
|
||||
Package: nymea-plugin-gpio
|
||||
Architecture: any
|
||||
Depends: ${shlibs:Depends},
|
||||
|
|
@ -1317,7 +1288,6 @@ Depends: nymea-plugin-anel,
|
|||
nymea-plugin-eq-3,
|
||||
nymea-plugin-flowercare,
|
||||
nymea-plugin-fronius,
|
||||
nymea-plugin-genericthings,
|
||||
nymea-plugin-homeconnect,
|
||||
nymea-plugin-kodi,
|
||||
nymea-plugin-lgsmarttv,
|
||||
|
|
|
|||
|
|
@ -1 +0,0 @@
|
|||
usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationplugingenericelements.so
|
||||
|
|
@ -1 +0,0 @@
|
|||
usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationplugingenericthings.so
|
||||
|
|
@ -1,15 +0,0 @@
|
|||
# Generic elements
|
||||
|
||||
The generic elements plugin allows you create virtual buttons, which can be connected with a rule. This gives you
|
||||
the possibility to execute multiple actions with one signal. Without a rule this generic elements are
|
||||
useless.
|
||||
|
||||
## Toggle Button
|
||||
With the "Toggle Button" you can create a button with one action toggle. In the `state` you can find out,
|
||||
what happens if the button will be pressed. The states can be true or false.
|
||||
|
||||
## Button
|
||||
With the "Button" you can create a button with one action `press`. This button just creates one event.
|
||||
|
||||
## ON/OFF Button
|
||||
With the "ON/OFF Button" you create a button pair with the actions `ON` and `OFF`.
|
||||
|
|
@ -1,11 +0,0 @@
|
|||
include(../plugins.pri)
|
||||
|
||||
TARGET = $$qtLibraryTarget(nymea_integrationplugingenericelements)
|
||||
|
||||
SOURCES += \
|
||||
integrationplugingenericelements.cpp
|
||||
|
||||
HEADERS += \
|
||||
integrationplugingenericelements.h
|
||||
|
||||
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="512px" height="512px" viewBox="0 0 512 512" enable-background="new 0 0 512 512" xml:space="preserve">
|
||||
<g>
|
||||
<g>
|
||||
<path d="M128,320c26.467,0,48,21.533,48,48s-21.533,48-48,48s-48-21.533-48-48S101.533,320,128,320 M128,304
|
||||
c-35.346,0-64,28.654-64,64c0,35.347,28.654,64,64,64s64-28.653,64-64C192,332.654,163.346,304,128,304L128,304z"/>
|
||||
<path d="M383.25,288c44.388,0,80.625,36.112,80.625,80.5S427.888,448,383.5,448h-255C84.112,448,48,412.888,48,368.5
|
||||
S84.112,288,128.5,288H383 M383.5,272h-255C75.205,272,32,315.205,32,368.5S75.205,464,128.5,464h255
|
||||
c53.295,0,96.5-42.205,96.5-95.5S436.795,272,383.5,272L383.5,272z"/>
|
||||
</g>
|
||||
<g>
|
||||
<path d="M384,96c26.467,0,48,21.533,48,48s-21.533,48-48,48s-48-21.533-48-48S357.533,96,384,96 M384,80
|
||||
c-35.346,0-64,28.654-64,64c0,35.347,28.654,64,64,64s64-28.653,64-64C448,108.654,419.346,80,384,80L384,80z"/>
|
||||
<path d="M129,64h254.5c44.388,0,80.5,36.112,80.5,80.5S427.888,224,383.5,224h-255c-44.388,0-80.375-35.112-80.375-79.5
|
||||
S84.362,64,128.75,64 M128.5,48C75.205,48,32,91.205,32,144.5S75.205,240,128.5,240h255c53.295,0,96.5-42.205,96.5-95.5
|
||||
S436.795,48,383.5,48H128.5L128.5,48z"/>
|
||||
</g>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.5 KiB |
|
|
@ -1,81 +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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 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 "integrationplugingenericelements.h"
|
||||
#include "plugininfo.h"
|
||||
|
||||
#include <QDebug>
|
||||
|
||||
IntegrationPluginGenericElements::IntegrationPluginGenericElements()
|
||||
{
|
||||
}
|
||||
|
||||
void IntegrationPluginGenericElements::setupThing(ThingSetupInfo *info)
|
||||
{
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
}
|
||||
|
||||
void IntegrationPluginGenericElements::executeAction(ThingActionInfo *info)
|
||||
{
|
||||
Thing *thing = info->thing();
|
||||
Action action = info->action();
|
||||
|
||||
// Power Button
|
||||
if (thing->thingClassId() == powerButtonThingClassId) {
|
||||
if (action.actionTypeId() == powerButtonPowerActionTypeId) {
|
||||
thing->setStateValue(powerButtonPowerStateTypeId, action.params().paramValue(powerButtonPowerActionPowerParamTypeId).toBool());
|
||||
}
|
||||
}
|
||||
|
||||
// Button
|
||||
if (thing->thingClassId() == buttonThingClassId) {
|
||||
if (action.actionTypeId() == buttonPressActionTypeId) {
|
||||
emit emitEvent(Event(buttonPressedEventTypeId, thing->id()));
|
||||
}
|
||||
}
|
||||
|
||||
// Trigger button
|
||||
if (thing->thingClassId() == triggerButtonThingClassId) {
|
||||
if (action.actionTypeId() == triggerButtonTriggerActionTypeId) {
|
||||
emit emitEvent(Event(triggerButtonPressedEventTypeId, thing->id()));
|
||||
}
|
||||
}
|
||||
|
||||
// ON/OFF Button
|
||||
if (thing->thingClassId() == onOffButtonThingClassId) {
|
||||
if (action.actionTypeId() == onOffButtonOnActionTypeId) {
|
||||
emit emitEvent(Event(onOffButtonPressedEventTypeId, thing->id(), ParamList() << Param(onOffButtonPressedEventButtonNameParamTypeId, "On")));
|
||||
} else if (action.actionTypeId() == onOffButtonOffActionTypeId) {
|
||||
emit emitEvent(Event(onOffButtonPressedEventTypeId, thing->id(), ParamList() << Param(onOffButtonPressedEventButtonNameParamTypeId, "Off")));
|
||||
}
|
||||
}
|
||||
|
||||
info->finish(Thing::ThingErrorNoError);
|
||||
}
|
||||
|
|
@ -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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 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 INTEGRATIONPLUGINGENERICELEMENTS_H
|
||||
#define INTEGRATIONPLUGINGENERICELEMENTS_H
|
||||
|
||||
#include "integrations/integrationplugin.h"
|
||||
|
||||
class IntegrationPluginGenericElements : public IntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationplugingenericelements.json")
|
||||
Q_INTERFACES(IntegrationPlugin)
|
||||
|
||||
public:
|
||||
explicit IntegrationPluginGenericElements();
|
||||
void setupThing(ThingSetupInfo *info) override;
|
||||
|
||||
public slots:
|
||||
void executeAction(ThingActionInfo *info) override;
|
||||
|
||||
};
|
||||
|
||||
#endif // INTEGRATIONPLUGINGENERICELEMENTS_H
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
{
|
||||
"name": "GenericElements",
|
||||
"displayName": "Generic Elements",
|
||||
"id": "6e22161e-39b7-4416-8623-39e730721efb",
|
||||
"vendors": [
|
||||
{
|
||||
"name": "nymea",
|
||||
"displayName": "nymea",
|
||||
"id": "2062d64d-3232-433c-88bc-0d33c0ba2ba6",
|
||||
"thingClasses": [
|
||||
{
|
||||
"id": "c0f511f9-70f5-499b-bd70-2c0e9ddd68c4",
|
||||
"name": "powerButton",
|
||||
"displayName": "Power Button",
|
||||
"createMethods": [ "user" ],
|
||||
"interfaces": [ "power" ],
|
||||
"paramTypes": [ ],
|
||||
"stateTypes": [
|
||||
{
|
||||
"id": "b5e90567-54aa-49bd-a78a-3c19fb38aaf5",
|
||||
"name": "power",
|
||||
"displayName": "state",
|
||||
"displayNameEvent": "power changed",
|
||||
"displayNameAction": "set power",
|
||||
"type": "bool",
|
||||
"defaultValue": false,
|
||||
"writable": true,
|
||||
"ioType": "digitalOutput"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "820b2f2d-0d92-48c8-8fd4-f94ce8fc4103",
|
||||
"name": "button",
|
||||
"displayName": "Button",
|
||||
"createMethods": [ "user" ],
|
||||
"interfaces": [ "button" ],
|
||||
"paramTypes": [ ],
|
||||
"actionTypes": [
|
||||
{
|
||||
"id": "01f38af1-b2ab-4ec3-844e-ef52f0f229a9",
|
||||
"name": "press",
|
||||
"displayName": "press"
|
||||
}
|
||||
],
|
||||
"eventTypes": [
|
||||
{
|
||||
"id": "effdbc2d-e467-4b0b-80a9-9dda251bfa5c",
|
||||
"name": "pressed",
|
||||
"displayName": "button pressed"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "5f91923e-fc8e-48db-9de7-9a2fc36798dd",
|
||||
"name": "triggerButton",
|
||||
"displayName": "Trigger button",
|
||||
"createMethods": [ "user" ],
|
||||
"interfaces": [ "outputtrigger", "button" ],
|
||||
"paramTypes": [ ],
|
||||
"actionTypes": [
|
||||
{
|
||||
"id": "da322b8e-2116-4565-805a-03f7726373c8",
|
||||
"name": "trigger",
|
||||
"displayName": "trigger"
|
||||
}
|
||||
],
|
||||
"eventTypes": [
|
||||
{
|
||||
"id": "51197853-0559-42a0-a97b-6ead56ae22f6",
|
||||
"name": "pressed",
|
||||
"displayName": "triggered"
|
||||
}
|
||||
]
|
||||
},
|
||||
{
|
||||
"id": "430d188c-476d-4825-a9bd-86dfa3094b56",
|
||||
"name": "onOffButton",
|
||||
"displayName": "ON/OFF Button",
|
||||
"createMethods": ["user"],
|
||||
"interfaces": [ "multibutton" ],
|
||||
"paramTypes": [ ],
|
||||
"actionTypes": [
|
||||
{
|
||||
"id": "892596d2-0863-4807-97da-469b9f7003f2",
|
||||
"name": "on",
|
||||
"displayName": "on"
|
||||
},
|
||||
{
|
||||
"id": "a8d64050-0b58-4ccf-b052-77ce2b7368ad",
|
||||
"name": "off",
|
||||
"displayName": "off"
|
||||
}
|
||||
],
|
||||
"eventTypes": [
|
||||
{
|
||||
"id": "4eeba6a2-e4c7-4a2e-8360-2797d98114e6",
|
||||
"name": "pressed",
|
||||
"displayName": "Button pressed",
|
||||
"paramTypes": [
|
||||
{
|
||||
"id": "2e6bc343-41a3-4634-b514-4512ae54afbc",
|
||||
"name": "buttonName",
|
||||
"displayName": "Button name",
|
||||
"type": "QString",
|
||||
"allowedValues": ["Off", "On"]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"title": "Generic Elements",
|
||||
"tagline": "Add basic buttons.",
|
||||
"icon": "genericelements.svg",
|
||||
"stability": "community",
|
||||
"offline": true,
|
||||
"technologies": [
|
||||
],
|
||||
"categories": [
|
||||
"tool"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1" language="de">
|
||||
<context>
|
||||
<name>GenericElements</name>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="53"/>
|
||||
<source>Generic Elements</source>
|
||||
<extracomment>The name of the plugin GenericElements ({6e22161e-39b7-4416-8623-39e730721efb})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="68"/>
|
||||
<source>nymea</source>
|
||||
<extracomment>The name of the vendor ({2062d64d-3232-433c-88bc-0d33c0ba2ba6})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="86"/>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="89"/>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="92"/>
|
||||
<source>state</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: powerButton, ActionType: power, ID: {b5e90567-54aa-49bd-a78a-3c19fb38aaf5})
|
||||
----------
|
||||
The name of the ParamType (ThingClass: powerButton, EventType: power, ID: {b5e90567-54aa-49bd-a78a-3c19fb38aaf5})
|
||||
----------
|
||||
The name of the StateType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="44"/>
|
||||
<source>Button</source>
|
||||
<extracomment>The name of the ThingClass ({820b2f2d-0d92-48c8-8fd4-f94ce8fc4103})</extracomment>
|
||||
<translation>Taster</translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="47"/>
|
||||
<source>Button name</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: onOffButton, EventType: pressed, ID: {2e6bc343-41a3-4634-b514-4512ae54afbc})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="50"/>
|
||||
<source>Button pressed</source>
|
||||
<extracomment>The name of the EventType ({4eeba6a2-e4c7-4a2e-8360-2797d98114e6}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="59"/>
|
||||
<source>Power Button</source>
|
||||
<extracomment>The name of the ThingClass ({c0f511f9-70f5-499b-bd70-2c0e9ddd68c4})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="62"/>
|
||||
<source>Trigger button</source>
|
||||
<extracomment>The name of the ThingClass ({5f91923e-fc8e-48db-9de7-9a2fc36798dd})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="71"/>
|
||||
<source>off</source>
|
||||
<extracomment>The name of the ActionType ({a8d64050-0b58-4ccf-b052-77ce2b7368ad}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="74"/>
|
||||
<source>on</source>
|
||||
<extracomment>The name of the ActionType ({892596d2-0863-4807-97da-469b9f7003f2}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="77"/>
|
||||
<source>power changed</source>
|
||||
<extracomment>The name of the EventType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="80"/>
|
||||
<source>press</source>
|
||||
<extracomment>The name of the ActionType ({01f38af1-b2ab-4ec3-844e-ef52f0f229a9}) of ThingClass button</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="83"/>
|
||||
<source>set power</source>
|
||||
<extracomment>The name of the ActionType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="95"/>
|
||||
<source>trigger</source>
|
||||
<extracomment>The name of the ActionType ({da322b8e-2116-4565-805a-03f7726373c8}) of ThingClass triggerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="98"/>
|
||||
<source>triggered</source>
|
||||
<extracomment>The name of the EventType ({51197853-0559-42a0-a97b-6ead56ae22f6}) of ThingClass triggerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="65"/>
|
||||
<source>button pressed</source>
|
||||
<extracomment>The name of the EventType ({effdbc2d-e467-4b0b-80a9-9dda251bfa5c}) of ThingClass button</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="56"/>
|
||||
<source>ON/OFF Button</source>
|
||||
<extracomment>The name of the ThingClass ({430d188c-476d-4825-a9bd-86dfa3094b56})</extracomment>
|
||||
<translation>An/Aus Taster</translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
@ -1,115 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!DOCTYPE TS>
|
||||
<TS version="2.1">
|
||||
<context>
|
||||
<name>GenericElements</name>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="53"/>
|
||||
<source>Generic Elements</source>
|
||||
<extracomment>The name of the plugin GenericElements ({6e22161e-39b7-4416-8623-39e730721efb})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="68"/>
|
||||
<source>nymea</source>
|
||||
<extracomment>The name of the vendor ({2062d64d-3232-433c-88bc-0d33c0ba2ba6})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="86"/>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="89"/>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="92"/>
|
||||
<source>state</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: powerButton, ActionType: power, ID: {b5e90567-54aa-49bd-a78a-3c19fb38aaf5})
|
||||
----------
|
||||
The name of the ParamType (ThingClass: powerButton, EventType: power, ID: {b5e90567-54aa-49bd-a78a-3c19fb38aaf5})
|
||||
----------
|
||||
The name of the StateType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="44"/>
|
||||
<source>Button</source>
|
||||
<extracomment>The name of the ThingClass ({820b2f2d-0d92-48c8-8fd4-f94ce8fc4103})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="47"/>
|
||||
<source>Button name</source>
|
||||
<extracomment>The name of the ParamType (ThingClass: onOffButton, EventType: pressed, ID: {2e6bc343-41a3-4634-b514-4512ae54afbc})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="50"/>
|
||||
<source>Button pressed</source>
|
||||
<extracomment>The name of the EventType ({4eeba6a2-e4c7-4a2e-8360-2797d98114e6}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="59"/>
|
||||
<source>Power Button</source>
|
||||
<extracomment>The name of the ThingClass ({c0f511f9-70f5-499b-bd70-2c0e9ddd68c4})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="62"/>
|
||||
<source>Trigger button</source>
|
||||
<extracomment>The name of the ThingClass ({5f91923e-fc8e-48db-9de7-9a2fc36798dd})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="71"/>
|
||||
<source>off</source>
|
||||
<extracomment>The name of the ActionType ({a8d64050-0b58-4ccf-b052-77ce2b7368ad}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="74"/>
|
||||
<source>on</source>
|
||||
<extracomment>The name of the ActionType ({892596d2-0863-4807-97da-469b9f7003f2}) of ThingClass onOffButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="77"/>
|
||||
<source>power changed</source>
|
||||
<extracomment>The name of the EventType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="80"/>
|
||||
<source>press</source>
|
||||
<extracomment>The name of the ActionType ({01f38af1-b2ab-4ec3-844e-ef52f0f229a9}) of ThingClass button</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="83"/>
|
||||
<source>set power</source>
|
||||
<extracomment>The name of the ActionType ({b5e90567-54aa-49bd-a78a-3c19fb38aaf5}) of ThingClass powerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="95"/>
|
||||
<source>trigger</source>
|
||||
<extracomment>The name of the ActionType ({da322b8e-2116-4565-805a-03f7726373c8}) of ThingClass triggerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="98"/>
|
||||
<source>triggered</source>
|
||||
<extracomment>The name of the EventType ({51197853-0559-42a0-a97b-6ead56ae22f6}) of ThingClass triggerButton</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="65"/>
|
||||
<source>button pressed</source>
|
||||
<extracomment>The name of the EventType ({effdbc2d-e467-4b0b-80a9-9dda251bfa5c}) of ThingClass button</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
<message>
|
||||
<location filename="../../../build-nymea-plugins-Desktop-Debug/genericelements/plugininfo.h" line="56"/>
|
||||
<source>ON/OFF Button</source>
|
||||
<extracomment>The name of the ThingClass ({430d188c-476d-4825-a9bd-86dfa3094b56})</extracomment>
|
||||
<translation type="unfinished"></translation>
|
||||
</message>
|
||||
</context>
|
||||
</TS>
|
||||
|
|
@ -1,17 +0,0 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<!-- Generator: Adobe Illustrator 16.2.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
|
||||
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
||||
<svg version="1.1" id="Layer_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
|
||||
width="512px" height="512px" viewBox="0 0 512 512" style="enable-background:new 0 0 512 512;" xml:space="preserve">
|
||||
<g>
|
||||
<path d="M400,172.9C400,95.1,333.9,32,256,32c-77.9,0-144,63.1-144,141c0,31,13.2,59,30.2,83h-0.3c10.9,15,21.4,27.7,31.5,45
|
||||
c22,37.8,18.6,74.3,18.7,81.6v1.4h128v-1.4c0-8.9-3.6-43.8,18.4-81.6c10.1-17.3,20.6-30,31.5-45h-0.1C386.8,232,400,204,400,172.9z
|
||||
M351,254.4c-0.6,0.8-1.1,1.5-1.7,2.3c-8.1,10.9-16.5,22.2-24.7,36.1c-17.3,29.7-20.4,57.9-20.8,75.1H288V256l32-64h-16.6L272,256
|
||||
v112h-32V256l-31.4-64H192l32,64v112h-15.9c-0.5-17.2-3.9-45.7-20.9-75c-4.5-7.7-9.1-15-13.7-21h0.2l-18.6-25.6
|
||||
c-15.8-21.6-27.1-47.1-27.1-73.6c0-33.4,16-64.8,39.6-88.4s55-36.7,88.4-36.7c33.4,0,64.8,13.1,88.4,36.7
|
||||
c23.6,23.6,39.6,55,39.6,88.4c0,26.5-11.3,51.9-27.1,73.5L351,254.4z"/>
|
||||
<rect x="224" y="464" width="64" height="16"/>
|
||||
<rect x="208" y="432" width="96" height="16"/>
|
||||
<rect x="208" y="400" width="96" height="16"/>
|
||||
</g>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 1.3 KiB |
|
|
@ -1,12 +0,0 @@
|
|||
{
|
||||
"title": "Generic Interfaces",
|
||||
"tagline": "Add generic device types.",
|
||||
"icon": "genericinterfaces.svg",
|
||||
"stability": "community",
|
||||
"offline": true,
|
||||
"technologies": [
|
||||
],
|
||||
"categories": [
|
||||
"tool"
|
||||
]
|
||||
}
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
# Generic things
|
||||
|
||||
This plugin allows to create virtual generic things in nymea. Such things don't have any
|
||||
functionality on their own, but allow to create a visually appealing experience when
|
||||
using general purpose input and outputs, such as GPIOs.
|
||||
|
||||
## Set-up
|
||||
|
||||
First, set up a thing with generic inputs or outputs. For instance from the GPIO plugin.
|
||||
When done, set up the desired generic thing and use the things settings to connect
|
||||
the inputs and/or outputs accordingly.
|
||||
|
||||
### Example: A light switch on a digital output GPIO
|
||||
|
||||
First, set up the GPIO to control the light. Please refer to the documentation of the
|
||||
according plugin for this. Once the lights can be controlled by nymea using the raw
|
||||
GPIO toggle, set up a generic light from this plugin and go to the settings of the
|
||||
newly added generic light. In there, you'll find a section for Input/Output connections
|
||||
which can be used to connect the power state of this generic light to the GPIO that
|
||||
actually controls the light. The light can now be used like any other ready-made light
|
||||
device in nymea.
|
||||
|
||||
### Example: A soil moisture sensor on an analog input GPIO
|
||||
|
||||
First, set up the GPIO to receive the analog GPIO values from the sensor. Normally
|
||||
such an analog input GPIO will dispatch values from 0V to e.g. 3.3V, depending on the
|
||||
hardware. An input value of 0V normally refers to a soil moisture value of 0%, while
|
||||
an input value of 3.3V would refer to the maximum, that is 100% soil moisture. Once
|
||||
those input values are received in nymea, set up a generic soil moisture thing and
|
||||
go to its settings. In there you'll find the Input/Output connections section which
|
||||
allows to map this generic soil moisture sensure to the according GPIO input. Once
|
||||
this connection has been made, the generic soil moisture thing will represent the
|
||||
input from the GPIO in a nice sensor view.
|
||||
Some sensors might not support the full range from 0% to 100% and might output
|
||||
a value of 0V on a minimum soil moisture of e.g. 10% or might only be able to
|
||||
measure the soil moisture up to, say, 90%. Normally the sensor hardware would give
|
||||
that information in the data sheet or user guide. If this is the case, the appropriate
|
||||
input range can also be defined in the generic moisture sensor page.
|
||||
|
||||
|
|
@ -1,10 +0,0 @@
|
|||
include(../plugins.pri)
|
||||
|
||||
SOURCES += \
|
||||
integrationplugingenericthings.cpp
|
||||
|
||||
HEADERS += \
|
||||
integrationplugingenericthings.h
|
||||
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
|
|
@ -1,81 +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 <https://www.gnu.org/licenses/>.
|
||||
*
|
||||
* 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 INTEGRATIONPLUGINGENERICTHINGS_H
|
||||
#define INTEGRATIONPLUGINGENERICTHINGS_H
|
||||
|
||||
#include "integrations/integrationplugin.h"
|
||||
#include "plugintimer.h"
|
||||
#include "extern-plugininfo.h"
|
||||
|
||||
#include <QTimer>
|
||||
|
||||
class IntegrationPluginGenericThings: public IntegrationPlugin
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationplugingenericthings.json")
|
||||
Q_INTERFACES(IntegrationPlugin)
|
||||
|
||||
public:
|
||||
explicit IntegrationPluginGenericThings();
|
||||
void setupThing(ThingSetupInfo *info) override;
|
||||
void executeAction(ThingActionInfo *info) override;
|
||||
void thingRemoved(Thing *thing) override;
|
||||
|
||||
private:
|
||||
QHash<Thing *, int> m_pulsesPerTimeframe;
|
||||
|
||||
double mapDoubleValue(double value, double fromMin, double fromMax, double toMin, double toMax);
|
||||
|
||||
QHash<Thing *, QTimer *> m_extendedBlindPercentageTimer;
|
||||
QHash<Thing *, QTimer *> m_venetianBlindAngleTimer;
|
||||
QHash<Thing *, QTimer *> m_smartMeterTimer;
|
||||
QHash<Thing *, uint> m_extendedBlindTargetPercentage;
|
||||
QHash<Thing *, int> m_venetianBlindTargetAngle;
|
||||
QHash<Thing *, QTimer *> m_statefulGaragePercentageTimer;
|
||||
QHash<Thing *, uint> m_statefulGarageTargetPercentage;
|
||||
|
||||
enum BlindState {
|
||||
BlindStateOpening,
|
||||
BlindStateClosing,
|
||||
BlindStateStopped
|
||||
};
|
||||
void setBlindState(BlindState state, Thing *thing);
|
||||
void moveBlindToPercentage(Action action, Thing *thing);
|
||||
void moveBlindToAngle(Action action, Thing *thing);
|
||||
|
||||
void thermostatCheckPowerOutputState(Thing *thing);
|
||||
|
||||
QString sgReadyOperatingMode(bool relay1, bool relay2);
|
||||
QString sgReadyOperatingModeDescription(const QString &operatingModeString);
|
||||
};
|
||||
|
||||
#endif // INTEGRATIONPLUGINGENERICTHINGS_H
|
||||
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
|
|
@ -23,8 +23,6 @@ PLUGIN_DIRS = \
|
|||
flowercare \
|
||||
fronius \
|
||||
garadget \
|
||||
genericelements \
|
||||
genericthings \
|
||||
goecharger \
|
||||
gpio \
|
||||
i2cdevices \
|
||||
|
|
|
|||
Loading…
Reference in New Issue