From 8aeb18fb5bb9f2d7d383b1c99243b7ebfa548ff3 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 26 Nov 2021 22:59:00 +0100 Subject: [PATCH] New Plugin: myStrom --- debian/control | 10 + debian/nymea-plugin-mystrom.install.in | 1 + mystrom/README.md | 14 ++ mystrom/integrationpluginmystrom.cpp | 212 ++++++++++++++++++ mystrom/integrationpluginmystrom.h | 66 ++++++ mystrom/integrationpluginmystrom.json | 82 +++++++ mystrom/meta.json | 14 ++ mystrom/myStrom.png | Bin 0 -> 2496 bytes mystrom/mystrom.pro | 9 + ...fc7f1a24-42a8-45ce-9ffb-136292eb0164-de.ts | 135 +++++++++++ ...f1a24-42a8-45ce-9ffb-136292eb0164-en_US.ts | 135 +++++++++++ nymea-plugins.pro | 1 + 12 files changed, 679 insertions(+) create mode 100644 debian/nymea-plugin-mystrom.install.in create mode 100644 mystrom/README.md create mode 100644 mystrom/integrationpluginmystrom.cpp create mode 100644 mystrom/integrationpluginmystrom.h create mode 100644 mystrom/integrationpluginmystrom.json create mode 100644 mystrom/meta.json create mode 100644 mystrom/myStrom.png create mode 100644 mystrom/mystrom.pro create mode 100644 mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-de.ts create mode 100644 mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-en_US.ts diff --git a/debian/control b/debian/control index b92711ac..7c1af86e 100644 --- a/debian/control +++ b/debian/control @@ -516,6 +516,15 @@ Description: nymea.io plugin for a generic MQTT client This package will install a generic MQTT client plugin for nymea.io +Package: nymea-plugin-mystrom +Architecture: any +Depends: ${shlibs:Depends}, + ${misc:Depends}, + nymea-plugins-translations, +Description: nymea.io plugin for myStrom devices + This package will add support for myStrom devices to nymea. + + Package: nymea-plugin-neatobotvac Architecture: any Depends: ${shlibs:Depends}, @@ -1266,6 +1275,7 @@ Depends: nymea-plugin-anel, nymea-plugin-mailnotification, nymea-plugin-texasinstruments, nymea-plugin-telegram, + nymea-plugin-mystrom, nymea-plugin-nanoleaf, nymea-plugin-neatobotvac, nymea-plugin-netatmo, diff --git a/debian/nymea-plugin-mystrom.install.in b/debian/nymea-plugin-mystrom.install.in new file mode 100644 index 00000000..5fa1df35 --- /dev/null +++ b/debian/nymea-plugin-mystrom.install.in @@ -0,0 +1 @@ +usr/lib/@DEB_HOST_MULTIARCH@/nymea/plugins/libnymea_integrationpluginmystrom.so diff --git a/mystrom/README.md b/mystrom/README.md new file mode 100644 index 00000000..6f6cb791 --- /dev/null +++ b/mystrom/README.md @@ -0,0 +1,14 @@ +# myStrom + +This plugin adds support for the following myStrom devices. + +* myStrom WiFi Switch (CH and EU version) + +In order to use such a device, it must be connected to the same network as nymea. + +To connect the device to the WiFi, connect to the my-XXXXXX WiFi network and open +the configuration web interface at http://192.168.254.1. Alternatively the +"+" button may be pressed for 2 seconds to use WPS setup with a WPS capable WiFi router. + +To factory reset the device, hold the "+" button for 10 seconds. + diff --git a/mystrom/integrationpluginmystrom.cpp b/mystrom/integrationpluginmystrom.cpp new file mode 100644 index 00000000..bc885790 --- /dev/null +++ b/mystrom/integrationpluginmystrom.cpp @@ -0,0 +1,212 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* +* Copyright 2013 - 2021, 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 "integrationpluginmystrom.h" +#include "plugininfo.h" + +#include +#include +#include +#include + +#include +#include +#include +#include + +// API doc: +// https://api.mystrom.ch/ + +IntegrationPluginMyStrom::IntegrationPluginMyStrom() +{ +} + +IntegrationPluginMyStrom::~IntegrationPluginMyStrom() +{ +} + +void IntegrationPluginMyStrom::init() +{ + m_zeroConf = hardwareManager()->zeroConfController()->createServiceBrowser("_hap._tcp"); +} + +void IntegrationPluginMyStrom::discoverThings(ThingDiscoveryInfo *info) +{ + foreach (const ZeroConfServiceEntry &entry, m_zeroConf->serviceEntries()) { + qCDebug(dcMyStrom()) << "Found myStrom device:" << entry; + if (entry.protocol() != QAbstractSocket::IPv4Protocol) { + continue; + } + ThingDescriptor descriptor(switchThingClassId, entry.name(), entry.hostAddress().toString()); + descriptor.setParams({Param(switchThingIdParamTypeId, entry.txt("id"))}); + info->addThingDescriptor(descriptor); + } + info->finish(Thing::ThingErrorNoError); +} + +void IntegrationPluginMyStrom::setupThing(ThingSetupInfo *info) +{ + QUrl infoUrl = composeUrl(info->thing(), "/api/v1/info"); + if (infoUrl.isEmpty()) { + info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("Device cannot be found on the network.")); + return; + } + + QNetworkRequest request(infoUrl); + QNetworkReply *reply = hardwareManager()->networkManager()->get(request); + connect(reply, &QNetworkReply::finished, info, [=](){ + if (reply->error() != QNetworkReply::NoError) { + qCWarning(dcMyStrom()) << "Error fetching device info from myStrom device" << info->thing()->name(); + info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error fetching device information from myStrom device.")); + return; + } + QByteArray data = reply->readAll(); + QJsonParseError error; + QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error); + if (error.error != QJsonParseError::NoError) { + qCWarning(dcMyStrom()) << "Error parsing JSON from myStrom device:" << error.errorString() << data; + info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error processing response from myStrom device.")); + return; + } + + qCDebug(dcMyStrom()) << "Device info:" << qUtf8Printable(jsonDoc.toJson(QJsonDocument::Indented)); + info->finish(Thing::ThingErrorNoError); + + info->thing()->setStateValue("connected", true); + + pluginStorage()->beginGroup(info->thing()->id().toString()); + pluginStorage()->setValue("cachedAddress", infoUrl.host()); + pluginStorage()->endGroup(); + }); +} + +void IntegrationPluginMyStrom::postSetupThing(Thing *thing) +{ + Q_UNUSED(thing) + if (!m_pluginTimer) { + m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(1); + connect(m_pluginTimer, &PluginTimer::timeout, this, [=]{ + + foreach (Thing *thing, myThings().filterByThingClassId(switchThingClassId)) { + QUrl url = composeUrl(thing, "/report"); + QNetworkReply *reply = hardwareManager()->networkManager()->get(QNetworkRequest(url)); + connect(reply, &QNetworkReply::finished, thing, [reply, thing](){ + if (reply->error() != QNetworkReply::NoError) { + qCWarning(dcMyStrom()) << "Error fetching report from myStrom device:" << reply->errorString(); + thing->setStateValue(switchConnectedStateTypeId, false); + return; + } + QByteArray data = reply->readAll(); + QJsonParseError error; + QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error); + if (error.error != QJsonParseError::NoError) { + qCWarning(dcMyStrom()) << "Error parsing JSON from myStrom device" << thing->name() << data; + return; + } + thing->setStateValue(switchConnectedStateTypeId, true); + qCDebug(dcMyStrom()) << "Switch report:" << qUtf8Printable(jsonDoc.toJson(QJsonDocument::Indented)); + QVariantMap map = jsonDoc.toVariant().toMap(); + thing->setStateValue(switchPowerStateTypeId, map.value("relay").toBool()); + thing->setStateValue(switchCurrentPowerStateTypeId, map.value("power").toDouble()); + double totalEnergyConsumed = thing->stateValue(switchTotalEnergyConsumedStateTypeId).toDouble(); + double Ws = map.value("Ws").toDouble(); + double kWh = Ws / 1000 / 3600; + totalEnergyConsumed += kWh; + thing->setStateValue(switchTotalEnergyConsumedStateTypeId, totalEnergyConsumed); + }); + } + }); + } +} + +void IntegrationPluginMyStrom::thingRemoved(Thing *thing) +{ + Q_UNUSED(thing) + if (myThings().isEmpty() && m_pluginTimer) { + hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer); + m_pluginTimer = nullptr; + } +} + + +void IntegrationPluginMyStrom::executeAction(ThingActionInfo *info) +{ + if (info->thing()->thingClassId() == switchThingClassId) { + if (info->action().actionTypeId() == switchPowerActionTypeId) { + bool power = info->action().paramValue(switchPowerActionPowerParamTypeId).toBool(); + QUrl powerUrl = composeUrl(info->thing(), "/relay"); + QUrlQuery query; + query.addQueryItem("state", power ? "1" : "0"); + powerUrl.setQuery(query); + + QNetworkReply *reply = hardwareManager()->networkManager()->get(QNetworkRequest(powerUrl)); + connect(reply, &QNetworkReply::finished, this, [info, reply, power](){ + if (reply->error() != QNetworkReply::NoError) { + qCWarning(dcMyStrom()) << "Error switching myStrom switch:" << reply->error() << reply->errorString(); + info->finish(Thing::ThingErrorHardwareFailure, QT_TR_NOOP("Error communicating with myStrom device.")); + return; + } + + qCDebug(dcMyStrom()) << "Power action executed"; + info->thing()->setStateValue(switchPowerStateTypeId, power); + info->finish(Thing::ThingErrorNoError); + }); + } + } +} + +QUrl IntegrationPluginMyStrom::composeUrl(Thing *thing, const QString &path) +{ + QHostAddress address; + foreach (const ZeroConfServiceEntry &entry, m_zeroConf->serviceEntries()) { + if (entry.protocol() == QAbstractSocket::IPv4Protocol && entry.txt("id") == thing->paramValue(switchThingIdParamTypeId).toString()) { + address = entry.hostAddress(); + break; + } + } + + if (address.isNull()) { + pluginStorage()->beginGroup(thing->id().toString()); + address = pluginStorage()->value("cachedAddress").toString(); + pluginStorage()->endGroup(); + } + + if (address.isNull()) { + qCWarning(dcMyStrom()) << "Error finding myStrom device in the network"; + return QUrl(); + } + + QUrl url; + url.setScheme("http"); + url.setHost(address.toString()); + url.setPath(path); + return url; +} + diff --git a/mystrom/integrationpluginmystrom.h b/mystrom/integrationpluginmystrom.h new file mode 100644 index 00000000..4084a7d3 --- /dev/null +++ b/mystrom/integrationpluginmystrom.h @@ -0,0 +1,66 @@ +/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * +* +* Copyright 2013 - 2021, 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 INTEGRATIONPLUGINMYSTROM_H +#define INTEGRATIONPLUGINMYSTROM_H + +#include "integrations/integrationplugin.h" + +#include + +class PluginTimer; +class ZeroConfServiceBrowser; + +class IntegrationPluginMyStrom: public IntegrationPlugin +{ + Q_OBJECT + + Q_PLUGIN_METADATA(IID "io.nymea.IntegrationPlugin" FILE "integrationpluginmystrom.json") + Q_INTERFACES(IntegrationPlugin) + +public: + explicit IntegrationPluginMyStrom(); + ~IntegrationPluginMyStrom(); + + void init() override; + void discoverThings(ThingDiscoveryInfo *info) override; + void setupThing(ThingSetupInfo *info) override; + void postSetupThing(Thing *thing) override; + void thingRemoved(Thing *thing) override; + void executeAction(ThingActionInfo *info) override; + +private: + QUrl composeUrl(Thing *thing, const QString &path); + + ZeroConfServiceBrowser *m_zeroConf = nullptr; + PluginTimer *m_pluginTimer = nullptr; +}; + +#endif // INTEGRATIONPLUGINMYSTROM_H diff --git a/mystrom/integrationpluginmystrom.json b/mystrom/integrationpluginmystrom.json new file mode 100644 index 00000000..95adaaba --- /dev/null +++ b/mystrom/integrationpluginmystrom.json @@ -0,0 +1,82 @@ +{ + "name": "myStrom", + "displayName": "myStrom", + "id": "fc7f1a24-42a8-45ce-9ffb-136292eb0164", + "vendors": [ + { + "name": "myStrom", + "displayName": "myStrom", + "id": "884b2875-759a-4373-aca4-6a8cb7220f85", + "thingClasses": [ + { + "id": "27dc49c0-58cd-4d5f-a95b-0c437dd828cf", + "name": "switch", + "displayName": "myStrom WiFi Switch", + "createMethods": ["discovery"], + "interfaces": [ "powersocket", "smartmeterconsumer", "wirelessconnectable" ], + "paramTypes": [ + { + "id": "44144c44-a447-4cee-b77a-18454a779a9c", + "name": "id", + "displayName": "ID", + "type": "QString", + "defaultValue": "" + } + ], + "stateTypes": [ + { + "id": "8864755d-4e6a-4e45-b2db-3eb5d4f3d53d", + "name": "connected", + "displayName": "Connected", + "displayNameEvent": "Connected changed", + "type": "bool", + "defaultValue": false, + "cached": false + }, + { + "id": "71723ea3-d2a1-48c4-9a2c-532d938e5022", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, + { + "id": "717f2593-1544-483b-aac8-f9800b299e4d", + "name": "power", + "displayName": "Power", + "displayNameEvent": "Turned on or off", + "displayNameAction": "Turn on or off", + "type": "bool", + "defaultValue": false, + "writable": true, + "ioType": "digitalOutput" + }, + { + "id": "a3533121-69ee-44fd-8394-13373e8f960e", + "name": "totalEnergyConsumed", + "displayName": "Total energy consumed", + "displayNameEvent": "Total energy consumed changed", + "type": "double", + "unit": "KiloWattHour", + "defaultValue": 0 + }, + { + "id": "ccb52b57-5800-4f03-b7fa-f36dcebe1d4e", + "name": "currentPower", + "displayName": "Current power consumption", + "displayNameEvent": "Current power consumption changed", + "type": "double", + "unit": "Watt", + "defaultValue": 0, + "filter": "adaptive" + } + ] + } + ] + } + ] +} diff --git a/mystrom/meta.json b/mystrom/meta.json new file mode 100644 index 00000000..8f78c6ee --- /dev/null +++ b/mystrom/meta.json @@ -0,0 +1,14 @@ +{ + "title": "myStrom", + "tagline": "myStrom", + "icon": "mystrom.png", + "stability": "consumer", + "offline": true, + "technologies": [ + "network" + ], + "categories": [ + "sensor", + "socket" + ] +} diff --git a/mystrom/myStrom.png b/mystrom/myStrom.png new file mode 100644 index 0000000000000000000000000000000000000000..eafc15d29aeab141eeda035ea92bd416b74c6b8b GIT binary patch literal 2496 zcmV;x2|xCUP)B z(&)*>;klpAi>T6;nahHeU2~2A00{s|L_t(|ob8?IVyZe6g-t>R1W_Dt0vvGY`#<5$ zPQaq=trgIMXMew{g3U6?&b;XL5ClOG1VIo4K@bE%5ClOG1VIo4K@bE%5ClOG1VIo4 zc?w~Fy-bILQ}rEfEeSWhmp)OZ~r2Su-rB zf|2i_N{st|ox1ug3D0wnI$Q{;5w2qSdrYo6t}&Wgebfn~AdZ;nZ}a zE8e@*HPIO~nw;i|bV+0P2Nd5EK&+WGnx5u4u{zOW%-UZ}M=+kPeD_*+7F5Mb{31df zN!dre+vg3Yr+E%K6L^jO^Q2Z0cm+cpN@b0~`c_v&x7G8fbLf-SSXfGRG!?C$l+vZF z)=>SR8yo)cu;i7Hn*FXsv^|*8TA@@2Q=NxS+E{X$CxB`=tMLWCj>XQfvGg?0KcaA3 z;|rjasy3I>UfsEtu=SBfcT4H6#{GR!uTS)RcC_jM-vV84_g9M@e}x%5)#!CWug`7u z@CiogZjH&LJyhi8lJf*&QEwiCwthk}s5j?nexRyzATMG?>r_OjhHalQh2alBR=vC4 z9LQ^cd5Frz6bfm}Coy_<2}xEQ!@~Gk9GXo}^DNxT9XIH*)#@+22(!tlQYOwTuj#y& zfsTij`liq)C8`U%hpR0C+nGew^2X4Tf<))xHgTwLqit_0ayHPpe6*ZGOVNQqYBB5F z{ISUlA9fA1_Aig-3}L&8d?+eHzLO5^`|@CivwWcQW^ZWq(D#~v&_{AHn1Ddh_SN4j z60^No{%&3{9DzXIjom^QVzWn|uYS>h9|Y~7KpjwxL^irBabb2#cTb=$ds8TT?%nBK zTV+qLNK(@TJKboAyU}J!3GK|b%Ugz-oZKy?hfGdey(ao2VKL`&9*vjf#cw}4Po{as z`7NKA`4t06nUc)gpU#8f`D3+_u0v_o-K_h=axuRxk}mmu4;QvHR9?;GGoqmHWjt zLUr{7_xA+r^NP4oM4`h~l{n+F-Fu$u z0!vKdjV3R?V$47~wF2`fV?}88hE4q^!CuhHd%`+G7j}~%2!bF8f*=TjAV?L0b(&sQ znZnuo4e^J{RZ5V2f^Dj@4xEa4h#k*Ot<71HAgkv{&_d2|&`W?RyIBwQC2`(Mp;kor zIZ4LcT6eym!XwWQKA+SMX4&3P;n^wN$?Pm*XB0xB1HYL148GsU1#fDFqP*an2*OUm z)#biloyN$YZ0r@NVyl|UT?w6jy%DH8xL$3 zmY@2YNzzMBBc|vizgxeeig;-*Byz-Z0PpN!9Uz@hPIs?a)k$5#ly#J!ge&W*t{9}^ zC`qv@v5*iw18`&UipPoR4mFLO(*S^oTh4Qwb~ZyBMJ?FpJj zbM~HaGT!c4HZaRlM3M2w%7w;rohziye7iB71}gR^5A17Ra5Tf5^o3pMu{kpWi3xRj zg--WCfGWb%>7l7F<%jg6^R zn4iwqx^mZ=h!g(&y$+uW`=W5j3zUs9kuZJ(I{DW|I#4gYTZN^~`fFbH+S8dx1Ff*| z9~e4?nR(>C!jtbOg*Mj2;)}0>E@(Q@R|?Di2|CkDrSHt3e6~~}#G2)tnYd&7H5MIu zxPPOtWT<;oWq&ArvGUuh5Ip6k#Kx80D!Xi+8MCi>SW>7J%zo-DZ(Xr{w+F%K$kjP>K=@#?X1{nQL`gW>RN z7dlD@$Ip|cgUc0*Ss^Q${rR>yn0)Glk4|MKwDs2b^@wE`p2AUw`DN()rUarhW=|Cf zGukbmna5euw>q$eAP9mW2!bF8f*=TjAP9mW2!bF8f*=U;5dQ&{NNnO=N1k8+0000< KMNUMnLSTaYnDOQS literal 0 HcmV?d00001 diff --git a/mystrom/mystrom.pro b/mystrom/mystrom.pro new file mode 100644 index 00000000..f00894ab --- /dev/null +++ b/mystrom/mystrom.pro @@ -0,0 +1,9 @@ +include(../plugins.pri) + +QT += network + +SOURCES += \ + integrationpluginmystrom.cpp \ + +HEADERS += \ + integrationpluginmystrom.h \ diff --git a/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-de.ts b/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-de.ts new file mode 100644 index 00000000..0bf735c5 --- /dev/null +++ b/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-de.ts @@ -0,0 +1,135 @@ + + + + + IntegrationPluginMyStrom + + + Device cannot be found on the network. + Das Gerät konnte nicht im Netzwerk gefunden werden. + + + + Error fetching device information from myStrom device. + Fehler beim Empfangen der Geräteinformationen. + + + + Error processing response from myStrom device. + Fehler beim Bearbeiten der Antwort des myStrom Gerätes. + + + + Error communicating with myStrom device. + Fehler in der Kommunikation zum myStrom Gerät. + + + + myStrom + + + + Connected + The name of the ParamType (ThingClass: switch, EventType: connected, ID: {8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) +---------- +The name of the StateType ({8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) of ThingClass switch + Verbunden + + + + Connected changed + The name of the EventType ({8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) of ThingClass switch + Verbindung hergestellt oder getrennt + + + + + Current power consumption + The name of the ParamType (ThingClass: switch, EventType: currentPower, ID: {ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) +---------- +The name of the StateType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass switch + Aktueller Stromverbrauch + + + + Current power consumption changed + The name of the EventType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass switch + Aktueller Stromverbrauch geändert + + + + ID + The name of the ParamType (ThingClass: switch, Type: thing, ID: {44144c44-a447-4cee-b77a-18454a779a9c}) + ID + + + + + + Power + The name of the ParamType (ThingClass: switch, ActionType: power, ID: {717f2593-1544-483b-aac8-f9800b299e4d}) +---------- +The name of the ParamType (ThingClass: switch, EventType: power, ID: {717f2593-1544-483b-aac8-f9800b299e4d}) +---------- +The name of the StateType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + An + + + + + Signal strength + The name of the ParamType (ThingClass: switch, EventType: signalStrength, ID: {71723ea3-d2a1-48c4-9a2c-532d938e5022}) +---------- +The name of the StateType ({71723ea3-d2a1-48c4-9a2c-532d938e5022}) of ThingClass switch + Signalstärke + + + + Signal strength changed + The name of the EventType ({71723ea3-d2a1-48c4-9a2c-532d938e5022}) of ThingClass switch + Signalstärke geändert + + + + + Total energy consumed + The name of the ParamType (ThingClass: switch, EventType: totalEnergyConsumed, ID: {a3533121-69ee-44fd-8394-13373e8f960e}) +---------- +The name of the StateType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass switch + Gesamtenergieverbrauch + + + + Total energy consumed changed + The name of the EventType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass switch + Gesamtenergieverbrauch geändert + + + + Turn on or off + The name of the ActionType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + Ein- oder ausschalten + + + + Turned on or off + The name of the EventType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + Ein- oder ausgeschaltet + + + + + myStrom + The name of the vendor ({884b2875-759a-4373-aca4-6a8cb7220f85}) +---------- +The name of the plugin myStrom ({fc7f1a24-42a8-45ce-9ffb-136292eb0164}) + myStrom + + + + myStrom WiFi Switch + The name of the ThingClass ({27dc49c0-58cd-4d5f-a95b-0c437dd828cf}) + myStrom WiFi Switch + + + diff --git a/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-en_US.ts b/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-en_US.ts new file mode 100644 index 00000000..3e30f8f8 --- /dev/null +++ b/mystrom/translations/fc7f1a24-42a8-45ce-9ffb-136292eb0164-en_US.ts @@ -0,0 +1,135 @@ + + + + + IntegrationPluginMyStrom + + + Device cannot be found on the network. + + + + + Error fetching device information from myStrom device. + + + + + Error processing response from myStrom device. + + + + + Error communicating with myStrom device. + + + + + myStrom + + + + Connected + The name of the ParamType (ThingClass: switch, EventType: connected, ID: {8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) +---------- +The name of the StateType ({8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) of ThingClass switch + + + + + Connected changed + The name of the EventType ({8864755d-4e6a-4e45-b2db-3eb5d4f3d53d}) of ThingClass switch + + + + + + Current power consumption + The name of the ParamType (ThingClass: switch, EventType: currentPower, ID: {ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) +---------- +The name of the StateType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass switch + + + + + Current power consumption changed + The name of the EventType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass switch + + + + + ID + The name of the ParamType (ThingClass: switch, Type: thing, ID: {44144c44-a447-4cee-b77a-18454a779a9c}) + + + + + + + Power + The name of the ParamType (ThingClass: switch, ActionType: power, ID: {717f2593-1544-483b-aac8-f9800b299e4d}) +---------- +The name of the ParamType (ThingClass: switch, EventType: power, ID: {717f2593-1544-483b-aac8-f9800b299e4d}) +---------- +The name of the StateType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + + + + + + Signal strength + The name of the ParamType (ThingClass: switch, EventType: signalStrength, ID: {71723ea3-d2a1-48c4-9a2c-532d938e5022}) +---------- +The name of the StateType ({71723ea3-d2a1-48c4-9a2c-532d938e5022}) of ThingClass switch + + + + + Signal strength changed + The name of the EventType ({71723ea3-d2a1-48c4-9a2c-532d938e5022}) of ThingClass switch + + + + + + Total energy consumed + The name of the ParamType (ThingClass: switch, EventType: totalEnergyConsumed, ID: {a3533121-69ee-44fd-8394-13373e8f960e}) +---------- +The name of the StateType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass switch + + + + + Total energy consumed changed + The name of the EventType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass switch + + + + + Turn on or off + The name of the ActionType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + + + + + Turned on or off + The name of the EventType ({717f2593-1544-483b-aac8-f9800b299e4d}) of ThingClass switch + + + + + + myStrom + The name of the vendor ({884b2875-759a-4373-aca4-6a8cb7220f85}) +---------- +The name of the plugin myStrom ({fc7f1a24-42a8-45ce-9ffb-136292eb0164}) + + + + + myStrom WiFi Switch + The name of the ThingClass ({27dc49c0-58cd-4d5f-a95b-0c437dd828cf}) + + + + diff --git a/nymea-plugins.pro b/nymea-plugins.pro index a8f3990e..112ab42c 100644 --- a/nymea-plugins.pro +++ b/nymea-plugins.pro @@ -35,6 +35,7 @@ PLUGIN_DIRS = \ lifx \ mailnotification \ mqttclient \ + mystrom \ neatobotvac \ nanoleaf \ netatmo \