From 57f6754d4e4a80a3de8b41a8ff4bc5a1c2aaa212 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Fri, 4 Sep 2020 23:04:02 +0200 Subject: [PATCH] Make use of the wirelessconnectable interface --- eq-3/integrationplugineq-3.json | 6 +- flowercare/integrationpluginflowercare.json | 2 +- philipshue/integrationpluginphilipshue.json | 16 +- shelly/integrationpluginshelly.cpp | 58 ++ shelly/integrationpluginshelly.h | 5 + shelly/integrationpluginshelly.json | 182 +++++- ...2773b-0435-408c-a4f8-7860d38031a9-en_US.ts | 595 +++++++++++------- tasmota/integrationplugintasmota.cpp | 29 +- tasmota/integrationplugintasmota.h | 1 + tasmota/integrationplugintasmota.json | 104 ++- ...6e0c0-0cbf-4731-aabb-b2201088d6cb-en_US.ts | 54 ++ tplink/integrationplugintplink.cpp | 9 + tplink/integrationplugintplink.h | 1 + tplink/integrationplugintplink.json | 39 +- ...024ff2e3-30df-44a1-9c8d-63cc416f1fb8-de.ts | 107 ++-- ...ff2e3-30df-44a1-9c8d-63cc416f1fb8-en_US.ts | 99 ++- 16 files changed, 955 insertions(+), 352 deletions(-) diff --git a/eq-3/integrationplugineq-3.json b/eq-3/integrationplugineq-3.json index f8a0080a..6ae043e6 100644 --- a/eq-3/integrationplugineq-3.json +++ b/eq-3/integrationplugineq-3.json @@ -65,7 +65,7 @@ "id": "ffbfec5d-06e8-4082-b62b-92cc5c3e8c4e", "name": "wallThermostat", "displayName": "Max! Wall Thermostat", - "interfaces": ["heating", "thermostat", "temperaturesensor", "battery", "connectable"], + "interfaces": ["heating", "thermostat", "temperaturesensor", "battery", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -272,7 +272,7 @@ "id": "f80d9481-4827-45ee-a013-b97b22412d92", "name": "radiatorThermostat", "displayName": "Max! Radiator Thermostat", - "interfaces": ["heating", "thermostat", "battery", "connectable"], + "interfaces": ["heating", "thermostat", "battery", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -533,7 +533,7 @@ "id": "3c51327b-a823-4479-bd4b-f4ba64267ed8", "name": "eqivaBluetooth", "displayName": "Eqiva Bluetooth Smart Radiator Thermostat", - "interfaces": ["heating", "thermostat", "connectable", "battery"], + "interfaces": ["heating", "thermostat", "wirelessconnectable", "battery"], "createMethods": ["discovery"], "setupMethod": "JustAdd", "paramTypes": [ diff --git a/flowercare/integrationpluginflowercare.json b/flowercare/integrationpluginflowercare.json index 918ef08a..98f3433e 100644 --- a/flowercare/integrationpluginflowercare.json +++ b/flowercare/integrationpluginflowercare.json @@ -13,7 +13,7 @@ "name": "flowerCare", "displayName": "Flower Care", "createMethods": ["discovery"], - "interfaces": ["temperaturesensor", "lightsensor", "moisturesensor", "conductivitysensor", "connectable", "batterylevel"], + "interfaces": ["temperaturesensor", "lightsensor", "moisturesensor", "conductivitysensor", "wirelessconnectable", "batterylevel"], "paramTypes": [ { "id": "fe2dba0f-2a47-463e-a645-bcd55cf09750", diff --git a/philipshue/integrationpluginphilipshue.json b/philipshue/integrationpluginphilipshue.json index 69779f56..754fb66b 100644 --- a/philipshue/integrationpluginphilipshue.json +++ b/philipshue/integrationpluginphilipshue.json @@ -104,7 +104,7 @@ "id": "0edba26c-96ab-44fb-a6a2-c0574d19630e", "name": "colorLight", "displayName": "Hue color light", - "interfaces": ["colorlight", "colortemperaturelight", "alert", "connectable"], + "interfaces": ["colorlight", "colortemperaturelight", "alert", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -233,7 +233,7 @@ "id": "35f749f7-b60a-4922-bd25-1bdd2eddcbe3", "name": "colorTemperatureLight", "displayName": "Hue color temperature light", - "interfaces": ["colortemperaturelight", "alert", "connectable"], + "interfaces": ["colortemperaturelight", "alert", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -337,7 +337,7 @@ "id": "4fa568ef-7a3a-422b-b0c0-206d37cb4eed", "name": "dimmableLight", "displayName": "Hue dimmable light", - "interfaces": ["dimmablelight", "alert", "connectable"], + "interfaces": ["dimmablelight", "alert", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -429,7 +429,7 @@ "id": "bb482d39-67ef-46dc-88e9-7b181d642b28", "name": "remote", "displayName": "Hue Remote", - "interfaces": ["longpressmultibutton", "batterylevel", "connectable"], + "interfaces": ["longpressmultibutton", "batterylevel", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -526,7 +526,7 @@ "id": "1e34a056-9f37-4741-b249-a5eca7a4ab4e", "name": "smartButton", "displayName": "Hue Smart Button", - "interfaces": ["longpressbutton", "connectable"], + "interfaces": ["longpressbutton", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -605,7 +605,7 @@ "id": "2b8c1fb8-67ee-42e9-947b-16e0a09f0d4e", "name": "tap", "displayName": "Hue Tap", - "interfaces": ["multibutton", "connectable"], + "interfaces": ["multibutton", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -669,7 +669,7 @@ "id": "32dc6390-600f-4eb4-b349-cc2d6796a82a", "name": "outdoorSensor", "displayName": "Hue Outdoor Sensor", - "interfaces": ["presencesensor", "temperaturesensor", "lightsensor", "batterylevel", "connectable"], + "interfaces": ["presencesensor", "temperaturesensor", "lightsensor", "batterylevel", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { @@ -812,7 +812,7 @@ "id": "25b79fff-4b88-4af8-b06c-2fe246238790", "name": "motionSensor", "displayName": "Hue Motion Sensor", - "interfaces": ["presencesensor", "temperaturesensor", "lightsensor", "batterylevel", "connectable"], + "interfaces": ["presencesensor", "temperaturesensor", "lightsensor", "batterylevel", "wirelessconnectable"], "createMethods": ["auto"], "paramTypes": [ { diff --git a/shelly/integrationpluginshelly.cpp b/shelly/integrationpluginshelly.cpp index 4d0132cb..3fd55e10 100644 --- a/shelly/integrationpluginshelly.cpp +++ b/shelly/integrationpluginshelly.cpp @@ -42,6 +42,8 @@ #include "network/mqtt/mqttprovider.h" #include "network/mqtt/mqttchannel.h" +#include "plugintimer.h" + #include "network/zeroconf/zeroconfservicebrowser.h" #include "platform/platformzeroconfcontroller.h" @@ -99,6 +101,21 @@ IntegrationPluginShelly::IntegrationPluginShelly() m_connectedStateTypesMap[shellySocketPMThingClassId] = shellySocketPMConnectedStateTypeId; m_connectedStateTypesMap[shellyRollerThingClassId] = shellyRollerConnectedStateTypeId; + m_signalStrengthStateTypesMap[shelly1ThingClassId] = shelly1SignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shelly1pmThingClassId] = shelly1pmSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shelly25ThingClassId] = shelly25SignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyPlugThingClassId] = shellyPlugSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyRgbw2ThingClassId] = shellyRgbw2SignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyDimmerThingClassId] = shellyDimmerSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellySwitchThingClassId] = shellySwitchSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyGenericThingClassId] = shellyGenericSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyLightThingClassId] = shellyLightSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellySocketThingClassId] = shellySocketSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyGenericPMThingClassId] = shellyGenericPMSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyLightPMThingClassId] = shellyLightPMSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellySocketPMThingClassId] = shellySocketPMSignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[shellyRollerThingClassId] = shellyRollerSignalStrengthStateTypeId; + m_powerStateTypeMap[shellyPlugThingClassId] = shellyPlugPowerStateTypeId; m_powerStateTypeMap[shellyRgbw2ThingClassId] = shellyRgbw2PowerStateTypeId; m_powerStateTypeMap[shellyDimmerThingClassId] = shellyDimmerPowerStateTypeId; @@ -256,6 +273,11 @@ void IntegrationPluginShelly::thingRemoved(Thing *thing) if (m_mqttChannels.contains(thing)) { hardwareManager()->mqttProvider()->releaseChannel(m_mqttChannels.take(thing)); } + + if (myThings().isEmpty() && m_timer) { + hardwareManager()->pluginTimerManager()->unregisterTimer(m_timer); + m_timer = nullptr; + } qCDebug(dcShelly()) << "Device removed" << thing->name(); } @@ -465,6 +487,27 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr qCDebug(dcShelly()) << "Publish received from" << thing->name() << topic << payload; QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString(); + if (topic == "shellies/" + shellyId + "/info") { + QJsonParseError error; + QJsonDocument jsonDoc = QJsonDocument::fromJson(payload, &error); + if (error.error != QJsonParseError::NoError) { + qCWarning(dcShelly()) << "Failed to parse shelly info payload:" << error.errorString(); + qCWarning(dcShelly()) << qUtf8Printable(payload); + return; + } + QVariantMap data = jsonDoc.toVariant().toMap(); + + int signalStrength = -1; + if (data.value("wifi_sta").toMap().contains("rssi")) { + int rssi = data.value("wifi_sta").toMap().value("rssi").toInt(); + signalStrength = qMin(100, qMax(0, (rssi + 100) * 2)); + } + thing->setStateValue(m_signalStrengthStateTypesMap.value(thing->thingClassId()), signalStrength); + foreach (Thing *child, myThings().filterByParentId(thing->id())) { + child->setStateValue(m_signalStrengthStateTypesMap.value(child->thingClassId()), signalStrength); + } + } + if (topic.startsWith("shellies/" + shellyId + "/input/")) { int channel = topic.split("/").last().toInt(); // "1" or "0" @@ -611,6 +654,16 @@ void IntegrationPluginShelly::onPublishReceived(MqttChannel *channel, const QStr } } +void IntegrationPluginShelly::updateStatus() +{ + foreach (Thing *thing, m_mqttChannels.keys()) { + MqttChannel *channel = m_mqttChannels.value(thing); + QString shellyId = thing->paramValue(m_idParamTypeMap.value(thing->thingClassId())).toString(); + qCDebug(dcShelly()) << "Requesting announcement" << QString("shellies/%1/info").arg(shellyId); + channel->publish(QString("shellies/command").arg(shellyId), "announce"); + } +} + void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) { Thing *thing = info->thing(); @@ -819,6 +872,11 @@ void IntegrationPluginShelly::setupShellyGateway(ThingSetupInfo *info) emit autoThingsAppeared(autoChilds); + if (!m_timer) { + m_timer = hardwareManager()->pluginTimerManager()->registerTimer(10); + connect(m_timer, &PluginTimer::timeout, this, &IntegrationPluginShelly::updateStatus); + } + // Make sure authentication is enalbed if the user wants it QString username = info->thing()->paramValue(m_usernameParamTypeMap.value(info->thing()->thingClassId())).toString(); QString password = info->thing()->paramValue(m_passwordParamTypeMap.value(info->thing()->thingClassId())).toString(); diff --git a/shelly/integrationpluginshelly.h b/shelly/integrationpluginshelly.h index a4c5b226..aa1a1aaa 100644 --- a/shelly/integrationpluginshelly.h +++ b/shelly/integrationpluginshelly.h @@ -34,6 +34,7 @@ #include "integrations/integrationplugin.h" class ZeroConfServiceBrowser; +class PluginTimer; class MqttChannel; @@ -60,6 +61,8 @@ private slots: void onClientDisconnected(MqttChannel* channel); void onPublishReceived(MqttChannel* channel, const QString &topic, const QByteArray &payload); + void updateStatus(); + private: void setupShellyGateway(ThingSetupInfo *info); void setupShellyChild(ThingSetupInfo *info); @@ -68,6 +71,7 @@ private: private: ZeroConfServiceBrowser *m_zeroconfBrowser = nullptr; + PluginTimer *m_timer = nullptr; QHash m_mqttChannels; @@ -79,6 +83,7 @@ private: QHash m_channelParamTypeMap; QHash m_connectedStateTypesMap; + QHash m_signalStrengthStateTypesMap; QHash m_powerStateTypeMap; QHash m_currentPowerStateTypeMap; QHash m_totalEnergyConsumedStateTypeMap; diff --git a/shelly/integrationpluginshelly.json b/shelly/integrationpluginshelly.json index c0ffa023..00141134 100644 --- a/shelly/integrationpluginshelly.json +++ b/shelly/integrationpluginshelly.json @@ -13,7 +13,7 @@ "name": "shelly1", "displayName": "Shelly 1", "createMethods": ["discovery"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "1d301dc0-5e48-473f-a611-8e407289e545", @@ -52,6 +52,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "74c631ed-fc3d-49e8-9dec-99cafa70c559", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ], "actionTypes": [ @@ -67,7 +78,7 @@ "name": "shelly1pm", "displayName": "Shelly 1PM", "createMethods": ["discovery"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "6df5db8a-4e27-49e5-8cf9-78cb8497d831", @@ -106,6 +117,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "58531cb9-933e-457e-af07-7c6c22c28e51", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ], "actionTypes": [ @@ -121,7 +143,7 @@ "name": "shelly25", "displayName": "Shelly 2.5", "createMethods": ["discovery"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "d79de2fa-81dd-440f-80b8-f1f71149d1f2", @@ -168,6 +190,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "35503b8a-1919-4df5-91cf-b7e381af654a", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ], "actionTypes": [ @@ -183,7 +216,7 @@ "name": "shellyPlug", "displayName": "Shelly Plug/PlugS", "createMethods": ["discovery"], - "interfaces": [ "powersocket", "extendedsmartmeterconsumer", "connectable" ], + "interfaces": [ "powersocket", "extendedsmartmeterconsumer", "wirelessconnectable" ], "paramTypes": [ { "id": "bd5679fc-b761-4a56-a472-97717418c425", @@ -225,6 +258,17 @@ "defaultValue": false, "cached": false }, + { + "id": "0b0a73a5-d732-47eb-a075-8e22810eea55", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "d813b35f-e11e-4783-b3b3-dbecb956ffb5", "name": "power", @@ -268,7 +312,7 @@ "name": "shellyRgbw2", "displayName": "Shelly RGBW2", "createMethods": ["discovery"], - "interfaces": ["colorlight", "connectable"], + "interfaces": ["colorlight", "wirelessconnectable"], "paramTypes": [ { "id": "2b0cd1b2-1648-4e0d-85d2-34aa9b9b835e", @@ -300,6 +344,17 @@ "defaultValue": false, "cached": false }, + { + "id": "194ecf76-c45f-4c36-8695-08a26ce065f3", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "14abcd30-9db2-4065-ae81-501a55fbb145", "name": "power", @@ -367,7 +422,7 @@ "name": "shellyDimmer", "displayName": "Shelly Dimmer / Dimmer 2", "createMethods": ["discovery"], - "interfaces": ["dimmablelight", "connectable"], + "interfaces": ["dimmablelight", "wirelessconnectable"], "paramTypes": [ { "id": "32e328be-2357-4d94-b438-3fe1ae94d97b", @@ -399,6 +454,17 @@ "defaultValue": false, "cached": false }, + { + "id": "a6855b46-7da8-4160-b698-7707600581b5", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "e4a6ac87-31fb-4516-9cf3-f135621e902c", "name": "power", @@ -445,7 +511,7 @@ "name": "shellySwitch", "displayName": "Shelly switch", "createMethods": ["auto"], - "interfaces": [ "powerswitch", "connectable"], + "interfaces": [ "powerswitch", "wirelessconnectable"], "settingsTypes": [ { "id": "ce9f1650-5e12-40f4-97de-27af86afa40b", @@ -482,6 +548,17 @@ "defaultValue": false, "cached": false }, + { + "id": "5088cd2d-8f71-4cfb-a120-4a2d4a84355d", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "20f74d88-0683-4d3a-9513-6b29b5112b7b", "name": "power", @@ -504,7 +581,7 @@ "name": "shellyGeneric", "displayName": "Shelly connected device", "createMethods": ["auto"], - "interfaces": ["power", "connectable"], + "interfaces": ["power", "wirelessconnectable"], "settingsTypes": [ { "id": "7d35aea3-1444-48c8-9732-a41bfc3b9d75", @@ -534,6 +611,17 @@ "defaultValue": false, "cached": false }, + { + "id": "e48d19f1-e04b-4c5d-b515-15bb22060607", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "72d7dbba-757c-4b03-a092-1d3f374fa961", "name": "power", @@ -552,7 +640,7 @@ "name": "shellyGenericPM", "displayName": "Shelly connected device", "createMethods": ["auto"], - "interfaces": ["power", "extendedsmartmeterconsumer", "connectable"], + "interfaces": ["power", "extendedsmartmeterconsumer", "wirelessconnectable"], "settingsTypes": [ { "id": "8c60a23c-5e5b-42ba-abae-aeeb3d379d79", @@ -591,6 +679,17 @@ "defaultValue": false, "cached": false }, + { + "id": "46cd6c28-b59a-4e20-b706-f202c0848b93", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "bd9480af-eec2-42d7-ab17-15715ee2e8e0", "name": "power", @@ -626,7 +725,7 @@ "name": "shellyLight", "displayName": "Shelly connected light", "createMethods": ["auto"], - "interfaces": ["light", "connectable"], + "interfaces": ["light", "wirelessconnectable"], "settingsTypes": [ { "id": "4fe9ae31-3657-41bf-bd40-a219d58465d3", @@ -656,6 +755,17 @@ "defaultValue": false, "cached": false }, + { + "id": "739a511c-b36d-40c9-b726-acde87f63d9f", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "2ee5bfab-271e-4b95-9464-122a5208f1a5", "name": "power", @@ -673,7 +783,7 @@ "name": "shellyLightPM", "displayName": "Shelly connected light", "createMethods": ["auto"], - "interfaces": ["light", "extendedsmartmeterconsumer", "connectable"], + "interfaces": ["light", "extendedsmartmeterconsumer", "wirelessconnectable"], "settingsTypes": [ { "id": "01cc242a-268d-4dd9-96ce-5502dd1bd430", @@ -703,6 +813,17 @@ "defaultValue": false, "cached": false }, + { + "id": "066de9e4-41f7-4628-a83c-102a2719473a", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "e77d1c75-e856-46bc-9f38-36e59ed7849d", "name": "power", @@ -738,7 +859,7 @@ "name": "shellySocket", "displayName": "Shelly connected power socket", "createMethods": ["auto"], - "interfaces": ["powersocket", "connectable"], + "interfaces": ["powersocket", "wirelessconnectable"], "settingsTypes": [ { "id": "9f365d87-ddb9-4764-9bfb-0e64020646b4", @@ -768,6 +889,17 @@ "defaultValue": false, "cached": false }, + { + "id": "3459cd8a-8e27-48b1-9b14-43c6239ed3a2", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "51e897b3-dd17-4df3-aa42-52b9bb5f0df8", "name": "power", @@ -785,7 +917,7 @@ "name": "shellySocketPM", "displayName": "Shelly connected power socket", "createMethods": ["auto"], - "interfaces": ["powersocket", "extendedsmartmeterconsumer", "connectable"], + "interfaces": ["powersocket", "extendedsmartmeterconsumer", "wirelessconnectable"], "settingsTypes": [ { "id": "9880a51b-57da-4b65-a0ec-23eb0fdcb8ac", @@ -815,6 +947,17 @@ "defaultValue": false, "cached": false }, + { + "id": "e81ee293-9dff-46d0-92dc-5f5627e05962", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "d6adeab6-c91d-44ba-8d01-9b5b9b7368be", "name": "power", @@ -850,7 +993,7 @@ "name": "shellyRoller", "displayName": "Shelly connected Roller Shutter", "createMethods": ["auto"], - "interfaces": ["extendedshutter", "extendedsmartmeterconsumer", "connectable"], + "interfaces": ["extendedshutter", "extendedsmartmeterconsumer", "wirelessconnectable"], "paramTypes": [ { "id": "281385a5-5084-4ded-80a4-66c0dc1096a8", @@ -870,6 +1013,17 @@ "defaultValue": false, "cached": false }, + { + "id": "f46c52ce-58dd-4d07-bb69-e8b8719c41bc", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "a7d88654-7503-474d-9a7c-02150d61a6dc", "name": "totalEnergyConsumed", diff --git a/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts b/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts index 22aa103c..ff3f4340 100644 --- a/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts +++ b/shelly/translations/6162773b-0435-408c-a4f8-7860d38031a9-en_US.ts @@ -4,38 +4,38 @@ IntegrationPluginShelly - + Unable to find the thing in the network. - + Roller shutter mode can't be mixed with relay mode. Please configure both connected devices to control a shutter or relays. - - + + For using a roller shutter, one channel must be set to up, the other to down. - + Error creating MQTT channel. Please check MQTT server settings. - + Username and password not set correctly. - + Error connecting to Shelly device. - + Unexpected data received from Shelly device. @@ -43,12 +43,12 @@ shelly - - - - - - + + + + + + Brightness The name of the ParamType (ThingClass: shellyDimmer, ActionType: brightness, ID: {f41c93ac-6911-45fc-9221-7dd26bf65fd0}) ---------- @@ -64,8 +64,8 @@ The name of the StateType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClass - - + + Brightness changed The name of the EventType ({f41c93ac-6911-45fc-9221-7dd26bf65fd0}) of ThingClass shellyDimmer ---------- @@ -73,26 +73,26 @@ The name of the EventType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClass - + Button type The name of the ParamType (ThingClass: shellySwitch, Type: settings, ID: {ce9f1650-5e12-40f4-97de-27af86afa40b}) - + Calibrate The name of the ActionType ({4e2d8a7b-821e-4ee8-9f9b-f774d631845f}) of ThingClass shellyRoller - - - - - - - - + + + + + + + + Channel The name of the ParamType (ThingClass: shellyRoller, Type: thing, ID: {281385a5-5084-4ded-80a4-66c0dc1096a8}) ---------- @@ -112,15 +112,15 @@ The name of the ParamType (ThingClass: shellySwitch, Type: thing, ID: {be6bdd43- - + Close The name of the ActionType ({87eb0290-615e-4c98-9ec8-a21104fcf05d}) of ThingClass shellyRoller - - - + + + Color The name of the ParamType (ThingClass: shellyRgbw2, ActionType: color, ID: {6ef7c686-350d-4069-9c41-9b90b3906748}) ---------- @@ -130,15 +130,15 @@ The name of the StateType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass - + Color changed The name of the EventType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass shellyRgbw2 - - - + + + Color temperature The name of the ParamType (ThingClass: shellyRgbw2, ActionType: colorTemperature, ID: {a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) ---------- @@ -148,40 +148,40 @@ The name of the StateType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass - + Color temperature changed The name of the EventType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass shellyRgbw2 - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + Connected The name of the ParamType (ThingClass: shellyRoller, EventType: connected, ID: {d446719d-628e-477d-882c-a84210c85869}) ---------- @@ -241,10 +241,10 @@ The name of the StateType ({e5d41e05-2296-457e-97d8-98a5ac0de615}) of ThingClass - - - - + + + + Connected changed The name of the EventType ({584b3558-5fb5-40a9-81ad-dc71ba68fd45}) of ThingClass shellyPlug ---------- @@ -256,38 +256,35 @@ The name of the EventType ({e5d41e05-2296-457e-97d8-98a5ac0de615}) of ThingClass - - - + + Connected device - The name of the ParamType (ThingClass: shellyPlug, Type: thing, ID: {9686b1ca-e71f-4e62-beb0-6a20f21550e9}) ----------- -The name of the ParamType (ThingClass: shelly1pm, Type: thing, ID: {3aacd693-3f1a-4040-be3a-953e600da44f}) + The name of the ParamType (ThingClass: shelly1pm, Type: thing, ID: {3aacd693-3f1a-4040-be3a-953e600da44f}) ---------- The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {d0e0499e-faa0-432a-a760-c295b0aefed0}) - + Connected device 1 The name of the ParamType (ThingClass: shelly25, Type: thing, ID: {dc8a02fb-baa4-40bf-9e00-684b17794287}) - + Connected device 2 The name of the ParamType (ThingClass: shelly25, Type: thing, ID: {1e6925f8-1613-4fe4-8234-e4a4e973ef83}) - - - - - - - - + + + + + + + + Connected or disconnected The name of the EventType ({d446719d-628e-477d-882c-a84210c85869}) of ThingClass shellyRoller ---------- @@ -307,8 +304,8 @@ The name of the EventType ({0c233312-7b8f-4ca3-880d-523cab9b3ccb}) of ThingClass - - + + Connected/disconnected The name of the EventType ({49ff0891-1798-459f-a97c-f1cc4e643a46}) of ThingClass shellyDimmer ---------- @@ -316,24 +313,24 @@ The name of the EventType ({98b6e1ba-8d5c-4cb1-82a0-2d06c71cdba6}) of ThingClass - + Consumed energy changed The name of the EventType ({962fec29-6be0-452e-87c5-5ff71435c40f}) of ThingClass shellyPlug - - - - - - - - - - - - + + + + + + + + + + + + Current power consumption The name of the ParamType (ThingClass: shellyRoller, EventType: currentPower, ID: {0d7cb1cf-3fff-4d0b-96c2-c02e9a92af57}) ---------- @@ -361,8 +358,8 @@ The name of the StateType ({82ce0c4f-cb81-43c7-bc07-003f8a3cfbc8}) of ThingClass - - + + Current power consumption changed The name of the EventType ({b3336ca6-1577-4230-8708-98875148606e}) of ThingClass shellyDimmer ---------- @@ -370,13 +367,13 @@ The name of the EventType ({82ce0c4f-cb81-43c7-bc07-003f8a3cfbc8}) of ThingClass - - - - - - - + + + + + + + Default state The name of the ParamType (ThingClass: shellySocketPM, Type: settings, ID: {9880a51b-57da-4b65-a0ec-23eb0fdcb8ac}) ---------- @@ -394,14 +391,14 @@ The name of the ParamType (ThingClass: shellyPlug, Type: settings, ID: {40f251db - + Invert button The name of the ParamType (ThingClass: shellySwitch, Type: settings, ID: {f31eb52b-9aaf-409d-8bba-badda7c1a249}) - - + + Moving The name of the ParamType (ThingClass: shellyRoller, EventType: moving, ID: {2729d4e0-c38c-47b8-a0e8-26959090fe74}) ---------- @@ -409,18 +406,18 @@ The name of the StateType ({2729d4e0-c38c-47b8-a0e8-26959090fe74}) of ThingClass - + Moving changed The name of the EventType ({2729d4e0-c38c-47b8-a0e8-26959090fe74}) of ThingClass shellyRoller - - - - - - + + + + + + On The name of the ParamType (ThingClass: shellyDimmer, ActionType: power, ID: {e4a6ac87-31fb-4516-9cf3-f135621e902c}) ---------- @@ -436,8 +433,8 @@ The name of the StateType ({14abcd30-9db2-4065-ae81-501a55fbb145}) of ThingClass - - + + On/Off The name of the ParamType (ThingClass: shellySwitch, EventType: power, ID: {20f74d88-0683-4d3a-9513-6b29b5112b7b}) ---------- @@ -445,24 +442,24 @@ The name of the StateType ({20f74d88-0683-4d3a-9513-6b29b5112b7b}) of ThingClass - + On/Off toggled The name of the EventType ({20f74d88-0683-4d3a-9513-6b29b5112b7b}) of ThingClass shellySwitch - + Open The name of the ActionType ({b96a8f85-c39e-499b-abbd-40b18788e907}) of ThingClass shellyRoller - - - - - - + + + + + + Password (optional) The name of the ParamType (ThingClass: shellyDimmer, Type: thing, ID: {b181bf78-a19c-4f97-9264-f16fbac64ee2}) ---------- @@ -478,9 +475,9 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {d29b8399-bfa6- - - - + + + Position The name of the ParamType (ThingClass: shellyRoller, ActionType: percentage, ID: {86270b8b-bce4-4d8a-9bc9-d72af36b991c}) ---------- @@ -490,30 +487,30 @@ The name of the StateType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass - + Position changed The name of the EventType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass shellyRoller - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + Power The name of the ParamType (ThingClass: shellySocketPM, ActionType: power, ID: {d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) ---------- @@ -553,8 +550,8 @@ The name of the StateType ({72d7dbba-757c-4b03-a092-1d3f374fa961}) of ThingClass - - + + Power consumption The name of the ParamType (ThingClass: shellyPlug, EventType: currentPower, ID: {202ea409-650e-48b2-9aae-d4ebe9d505fd}) ---------- @@ -562,11 +559,11 @@ The name of the StateType ({202ea409-650e-48b2-9aae-d4ebe9d505fd}) of ThingClass - - - - - + + + + + Power consumption changed The name of the EventType ({0d7cb1cf-3fff-4d0b-96c2-c02e9a92af57}) of ThingClass shellyRoller ---------- @@ -580,9 +577,9 @@ The name of the EventType ({202ea409-650e-48b2-9aae-d4ebe9d505fd}) of ThingClass - - - + + + Powered The name of the ParamType (ThingClass: shellyPlug, ActionType: power, ID: {d813b35f-e11e-4783-b3b3-dbecb956ffb5}) ---------- @@ -592,18 +589,18 @@ The name of the StateType ({d813b35f-e11e-4783-b3b3-dbecb956ffb5}) of ThingClass - + Pressed The name of the EventType ({41498655-1943-4b46-ac36-adea7bafab87}) of ThingClass shellySwitch - - - - - - + + + + + + Reboot The name of the ActionType ({dca1d1bb-b377-41b8-ac26-579060448fd7}) of ThingClass shellyDimmer ---------- @@ -619,8 +616,8 @@ The name of the ActionType ({b4067d54-36c5-4d30-bbc3-c8c712d6fd32}) of ThingClas - - + + Set brightness The name of the ActionType ({f41c93ac-6911-45fc-9221-7dd26bf65fd0}) of ThingClass shellyDimmer ---------- @@ -628,26 +625,26 @@ The name of the ActionType ({3f74eb92-d95b-48c2-8ac6-29bea9f65ce3}) of ThingClas - + Set color The name of the ActionType ({6ef7c686-350d-4069-9c41-9b90b3906748}) of ThingClass shellyRgbw2 - + Set color temperature The name of the ActionType ({a32a457f-fdc0-46ce-9106-6f9d4f4a6b16}) of ThingClass shellyRgbw2 - + Set position The name of the ActionType ({86270b8b-bce4-4d8a-9bc9-d72af36b991c}) of ThingClass shellyRoller - - + + Shelly The name of the vendor ({d8e45fc2-90af-492e-8305-50baa1ec4c18}) ---------- @@ -655,36 +652,36 @@ The name of the plugin shelly ({6162773b-0435-408c-a4f8-7860d38031a9}) - + Shelly 1 The name of the ThingClass ({f810b66a-7177-4397-9771-4229abaabbb6}) - + Shelly 1PM The name of the ThingClass ({30e74e9f-57f4-4bbc-b0df-f2c4f28b2f06}) - + Shelly 2.5 The name of the ThingClass ({465efb0d-da68-4177-a040-940c7f451e29}) - - Shelly Dimmer + + Shelly Dimmer / Dimmer 2 The name of the ThingClass ({3a1d6fc1-c623-4b45-9c81-1573fcc15f99}) - - - - - - + + + + + + Shelly ID The name of the ParamType (ThingClass: shellyDimmer, Type: thing, ID: {32e328be-2357-4d94-b438-3fe1ae94d97b}) ---------- @@ -700,26 +697,26 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {1d301dc0-5e48- - + Shelly Plug/PlugS The name of the ThingClass ({22229a6d-2af8-44e0-bea9-310a0f2769ef}) - + Shelly RGBW2 The name of the ThingClass ({17f24cec-e6ed-4abd-9d42-60999f391dba}) - + Shelly connected Roller Shutter The name of the ThingClass ({d681a4cb-481a-4469-a49a-e6bbb11eb9c9}) - - + + Shelly connected device The name of the ThingClass ({3bd614e0-72c4-4fbe-8c70-ce6c48d04bce}) ---------- @@ -727,8 +724,8 @@ The name of the ThingClass ({512c3c7d-d6a6-4d2a-bccd-83147e5f9a25}) - - + + Shelly connected light The name of the ThingClass ({5ab05c19-71aa-4a85-a02f-a108f039a69a}) ---------- @@ -736,8 +733,8 @@ The name of the ThingClass ({62a2d6b8-d70d-45fc-ba8c-1c680282a399}) - - + + Shelly connected power socket The name of the ThingClass ({ae6e55fe-1a0b-43bc-bdfb-605661b96905}) ---------- @@ -745,16 +742,148 @@ The name of the ThingClass ({3e13206c-a6cd-49a0-b653-2ccb5bb4bbc1}) - + Shelly switch The name of the ThingClass ({6de35a17-0f54-4397-894d-4321b64c53d1}) - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Signal strength + The name of the ParamType (ThingClass: shellyRoller, EventType: signalStrength, ID: {f46c52ce-58dd-4d07-bb69-e8b8719c41bc}) +---------- +The name of the StateType ({f46c52ce-58dd-4d07-bb69-e8b8719c41bc}) of ThingClass shellyRoller +---------- +The name of the ParamType (ThingClass: shellySocketPM, EventType: signalStrength, ID: {e81ee293-9dff-46d0-92dc-5f5627e05962}) +---------- +The name of the StateType ({e81ee293-9dff-46d0-92dc-5f5627e05962}) of ThingClass shellySocketPM +---------- +The name of the ParamType (ThingClass: shellySocket, EventType: signalStrength, ID: {3459cd8a-8e27-48b1-9b14-43c6239ed3a2}) +---------- +The name of the StateType ({3459cd8a-8e27-48b1-9b14-43c6239ed3a2}) of ThingClass shellySocket +---------- +The name of the ParamType (ThingClass: shellyLightPM, EventType: signalStrength, ID: {066de9e4-41f7-4628-a83c-102a2719473a}) +---------- +The name of the StateType ({066de9e4-41f7-4628-a83c-102a2719473a}) of ThingClass shellyLightPM +---------- +The name of the ParamType (ThingClass: shellyLight, EventType: signalStrength, ID: {739a511c-b36d-40c9-b726-acde87f63d9f}) +---------- +The name of the StateType ({739a511c-b36d-40c9-b726-acde87f63d9f}) of ThingClass shellyLight +---------- +The name of the ParamType (ThingClass: shellyGenericPM, EventType: signalStrength, ID: {46cd6c28-b59a-4e20-b706-f202c0848b93}) +---------- +The name of the StateType ({46cd6c28-b59a-4e20-b706-f202c0848b93}) of ThingClass shellyGenericPM +---------- +The name of the ParamType (ThingClass: shellyGeneric, EventType: signalStrength, ID: {e48d19f1-e04b-4c5d-b515-15bb22060607}) +---------- +The name of the StateType ({e48d19f1-e04b-4c5d-b515-15bb22060607}) of ThingClass shellyGeneric +---------- +The name of the ParamType (ThingClass: shellySwitch, EventType: signalStrength, ID: {5088cd2d-8f71-4cfb-a120-4a2d4a84355d}) +---------- +The name of the StateType ({5088cd2d-8f71-4cfb-a120-4a2d4a84355d}) of ThingClass shellySwitch +---------- +The name of the ParamType (ThingClass: shellyDimmer, EventType: signalStrength, ID: {a6855b46-7da8-4160-b698-7707600581b5}) +---------- +The name of the StateType ({a6855b46-7da8-4160-b698-7707600581b5}) of ThingClass shellyDimmer +---------- +The name of the ParamType (ThingClass: shellyRgbw2, EventType: signalStrength, ID: {194ecf76-c45f-4c36-8695-08a26ce065f3}) +---------- +The name of the StateType ({194ecf76-c45f-4c36-8695-08a26ce065f3}) of ThingClass shellyRgbw2 +---------- +The name of the ParamType (ThingClass: shellyPlug, EventType: signalStrength, ID: {0b0a73a5-d732-47eb-a075-8e22810eea55}) +---------- +The name of the StateType ({0b0a73a5-d732-47eb-a075-8e22810eea55}) of ThingClass shellyPlug +---------- +The name of the ParamType (ThingClass: shelly25, EventType: signalStrength, ID: {35503b8a-1919-4df5-91cf-b7e381af654a}) +---------- +The name of the StateType ({35503b8a-1919-4df5-91cf-b7e381af654a}) of ThingClass shelly25 +---------- +The name of the ParamType (ThingClass: shelly1pm, EventType: signalStrength, ID: {58531cb9-933e-457e-af07-7c6c22c28e51}) +---------- +The name of the StateType ({58531cb9-933e-457e-af07-7c6c22c28e51}) of ThingClass shelly1pm +---------- +The name of the ParamType (ThingClass: shelly1, EventType: signalStrength, ID: {74c631ed-fc3d-49e8-9dec-99cafa70c559}) +---------- +The name of the StateType ({74c631ed-fc3d-49e8-9dec-99cafa70c559}) of ThingClass shelly1 + + + + + + + + + + + + + + + + + + Signal strength changed + The name of the EventType ({f46c52ce-58dd-4d07-bb69-e8b8719c41bc}) of ThingClass shellyRoller +---------- +The name of the EventType ({e81ee293-9dff-46d0-92dc-5f5627e05962}) of ThingClass shellySocketPM +---------- +The name of the EventType ({3459cd8a-8e27-48b1-9b14-43c6239ed3a2}) of ThingClass shellySocket +---------- +The name of the EventType ({066de9e4-41f7-4628-a83c-102a2719473a}) of ThingClass shellyLightPM +---------- +The name of the EventType ({739a511c-b36d-40c9-b726-acde87f63d9f}) of ThingClass shellyLight +---------- +The name of the EventType ({46cd6c28-b59a-4e20-b706-f202c0848b93}) of ThingClass shellyGenericPM +---------- +The name of the EventType ({e48d19f1-e04b-4c5d-b515-15bb22060607}) of ThingClass shellyGeneric +---------- +The name of the EventType ({5088cd2d-8f71-4cfb-a120-4a2d4a84355d}) of ThingClass shellySwitch +---------- +The name of the EventType ({a6855b46-7da8-4160-b698-7707600581b5}) of ThingClass shellyDimmer +---------- +The name of the EventType ({194ecf76-c45f-4c36-8695-08a26ce065f3}) of ThingClass shellyRgbw2 +---------- +The name of the EventType ({0b0a73a5-d732-47eb-a075-8e22810eea55}) of ThingClass shellyPlug +---------- +The name of the EventType ({35503b8a-1919-4df5-91cf-b7e381af654a}) of ThingClass shelly25 +---------- +The name of the EventType ({58531cb9-933e-457e-af07-7c6c22c28e51}) of ThingClass shelly1pm +---------- +The name of the EventType ({74c631ed-fc3d-49e8-9dec-99cafa70c559}) of ThingClass shelly1 + + + + + + + Total energy changed The name of the EventType ({a7d88654-7503-474d-9a7c-02150d61a6dc}) of ThingClass shellyRoller ---------- @@ -766,16 +895,16 @@ The name of the EventType ({54b0b02e-1dfe-4172-bdfd-8129709e5d9f}) of ThingClass - - - - - - - - - - + + + + + + + + + + Total energy consumed The name of the ParamType (ThingClass: shellyRoller, EventType: totalEnergyConsumed, ID: {a7d88654-7503-474d-9a7c-02150d61a6dc}) ---------- @@ -799,15 +928,15 @@ The name of the StateType ({962fec29-6be0-452e-87c5-5ff71435c40f}) of ThingClass - - - - - - - - - + + + + + + + + + Turn on or off The name of the ActionType ({d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) of ThingClass shellySocketPM ---------- @@ -829,15 +958,15 @@ The name of the ActionType ({d813b35f-e11e-4783-b3b3-dbecb956ffb5}) of ThingClas - - - - - - - - - + + + + + + + + + Turned on or off The name of the EventType ({d6adeab6-c91d-44ba-8d01-9b5b9b7368be}) of ThingClass shellySocketPM ---------- @@ -859,12 +988,12 @@ The name of the EventType ({d813b35f-e11e-4783-b3b3-dbecb956ffb5}) of ThingClass - - - - - - + + + + + + Username (optional) The name of the ParamType (ThingClass: shellyDimmer, Type: thing, ID: {2df0d509-d4b5-407a-835a-6b6392653e10}) ---------- @@ -880,7 +1009,7 @@ The name of the ParamType (ThingClass: shelly1, Type: thing, ID: {fa1aa0f6-93b2- - + stop The name of the ActionType ({2266303c-df0c-4eae-b15e-6a86e73c9699}) of ThingClass shellyRoller diff --git a/tasmota/integrationplugintasmota.cpp b/tasmota/integrationplugintasmota.cpp index 8012b458..801b3603 100644 --- a/tasmota/integrationplugintasmota.cpp +++ b/tasmota/integrationplugintasmota.cpp @@ -82,6 +82,15 @@ IntegrationPluginTasmota::IntegrationPluginTasmota() m_connectedStateTypeMap[tasmotaLightThingClassId] = tasmotaLightConnectedStateTypeId; m_connectedStateTypeMap[tasmotaShutterThingClassId] = tasmotaShutterConnectedStateTypeId; m_connectedStateTypeMap[tasmotaBlindsThingClassId] = tasmotaBlindsConnectedStateTypeId; + + m_signalStrengthStateTypeMap[sonoff_basicThingClassId] = sonoff_basicSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[sonoff_dualThingClassId] = sonoff_dualSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[sonoff_triThingClassId] = sonoff_triSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[sonoff_quadThingClassId] = sonoff_quadSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[tasmotaSwitchThingClassId] = tasmotaSwitchSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[tasmotaLightThingClassId] = tasmotaLightSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[tasmotaShutterThingClassId] = tasmotaShutterSignalStrengthStateTypeId; + m_signalStrengthStateTypeMap[tasmotaBlindsThingClassId] = tasmotaBlindsSignalStrengthStateTypeId; } IntegrationPluginTasmota::~IntegrationPluginTasmota() @@ -320,16 +329,13 @@ void IntegrationPluginTasmota::onClientDisconnected(MqttChannel *channel) void IntegrationPluginTasmota::onPublishReceived(MqttChannel *channel, const QString &topic, const QByteArray &payload) { - qCDebug(dcTasmota) << "Publish received from Sonoff thing:" << topic << payload; - Thing *dev = m_mqttChannels.key(channel); - if (m_ipAddressParamTypeMap.contains(dev->thingClassId())) { + qCDebug(dcTasmota) << "Publish received from Sonoff thing:" << topic << qUtf8Printable(payload); + Thing *thing = m_mqttChannels.key(channel); + if (m_ipAddressParamTypeMap.contains(thing->thingClassId())) { if (topic.startsWith(channel->topicPrefixList().first() + "/sonoff/POWER")) { QString channelName = topic.split("/").last(); - foreach (Thing *child, myThings()) { - if (child->parentId() != dev->id()) { - continue; - } + foreach (Thing *child, myThings().filterByParentId(thing->id())) { if (child->paramValue(m_channelParamTypeMap.value(child->thingClassId())).toString() != channelName) { continue; } @@ -349,17 +355,16 @@ void IntegrationPluginTasmota::onPublishReceived(MqttChannel *channel, const QSt qCWarning(dcTasmota) << "Cannot parse JSON from Tasmota device" << error.errorString(); return; } - foreach (Thing *child, myThings()) { - if (child->parentId() != dev->id()) { - continue; - } + QVariantMap dataMap = jsonDoc.toVariant().toMap(); + thing->setStateValue(m_signalStrengthStateTypeMap.value(thing->thingClassId()), dataMap.value("Wifi").toMap().value("RSSI").toInt()); + foreach (Thing *child, myThings().filterByParentId(thing->id())) { if (m_powerStateTypeMap.contains(child->thingClassId())) { QString childChannel = child->paramValue(m_channelParamTypeMap.value(child->thingClassId())).toString(); QString valueString = jsonDoc.toVariant().toMap().value(childChannel).toString(); child->setStateValue(m_powerStateTypeMap.value(child->thingClassId()), valueString == "ON"); } + child->setStateValue(m_signalStrengthStateTypeMap.value(child->thingClassId()), dataMap.value("Wifi").toMap().value("RSSI").toInt()); } - } } } diff --git a/tasmota/integrationplugintasmota.h b/tasmota/integrationplugintasmota.h index 746c7ff5..2bc72616 100644 --- a/tasmota/integrationplugintasmota.h +++ b/tasmota/integrationplugintasmota.h @@ -76,6 +76,7 @@ private: // Helpers for both devices QHash m_connectedStateTypeMap; + QHash m_signalStrengthStateTypeMap; }; #endif // INTEGRATIONPLUGINTASMOTA_H diff --git a/tasmota/integrationplugintasmota.json b/tasmota/integrationplugintasmota.json index d87e94b9..3b661ef0 100644 --- a/tasmota/integrationplugintasmota.json +++ b/tasmota/integrationplugintasmota.json @@ -13,7 +13,7 @@ "name": "sonoff_basic", "displayName": "Single switch (Sonoff Basic, RF, Touch...)", "createMethods": ["user"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "cdead654-a765-488c-9fe6-ce6afb550d8b", @@ -39,6 +39,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "f70e202a-c178-4fbe-a778-713220d11b23", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": -1 } ] }, @@ -47,7 +58,7 @@ "name": "sonoff_dual", "displayName": "Dual switch (Sonoff Dual, T1 2CH...)", "createMethods": ["user"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "7fe081a4-b9ec-4ca5-b583-50e992a24f4d", @@ -81,6 +92,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "3d6a567f-d266-4711-bcf1-3ac1f53abadb", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ] }, @@ -89,7 +111,7 @@ "name": "sonoff_tri", "displayName": "3 channel switch (Sonoff 3CH, Tuya 3CH...)", "createMethods": ["user"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "b7532005-4157-4687-952f-ac3cd6b7f606", @@ -131,6 +153,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "08b4ec84-1aec-4e68-a3b4-ae251b8cbe6d", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ] }, @@ -139,7 +172,7 @@ "name": "sonoff_quad", "displayName": "4 channel switch (Sonoff 4CH, T1 4CH...)", "createMethods": ["user"], - "interfaces": [ "gateway" ], + "interfaces": [ "gateway", "wirelessconnectable" ], "paramTypes": [ { "id": "dbc3f3b3-2d17-40e9-8f6e-dde0b26952bc", @@ -189,6 +222,17 @@ "type": "bool", "defaultValue": false, "cached": false + }, + { + "id": "d80d8f37-f3c0-4364-998b-312339fd1fa8", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ] }, @@ -197,7 +241,7 @@ "name": "tasmotaSwitch", "displayName": "Tasmota power switch", "createMethods": ["auto"], - "interfaces": ["powerswitch", "connectable"], + "interfaces": ["powerswitch", "wirelessconnectable"], "paramTypes": [ { "id": "564cf6c6-86eb-41a5-9b87-fb32f1b6fcd6", @@ -216,6 +260,17 @@ "defaultValue": false, "cached": false }, + { + "id": "34e54234-d2d6-4c93-8d52-bada19e5ff23", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "413503d7-fc9f-417a-95fa-5c350a6f69f9", "name": "power", @@ -240,7 +295,7 @@ "name": "tasmotaLight", "displayName": "Tasmota light", "createMethods": ["auto"], - "interfaces": ["light", "connectable"], + "interfaces": ["light", "wirelessconnectable"], "paramTypes": [ { "id": "1f792ae4-cf39-4e12-99ca-c593bd020fcb", @@ -259,6 +314,17 @@ "defaultValue": false, "cached": false }, + { + "id": "dcc39f5e-6bcb-4c04-910e-8dd5f9ad5402", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "88dbdf8e-45ff-466f-8352-8654a6b5fe68", "name": "power", @@ -276,7 +342,7 @@ "name": "tasmotaShutter", "displayName": "Tasmota shutter", "createMethods": ["auto"], - "interfaces": ["shutter", "closable", "connectable"], + "interfaces": ["shutter", "closable", "wirelessconnectable"], "paramTypes": [ { "id": "4d8f113d-f816-4356-b1ff-31df3f4b515f", @@ -299,6 +365,17 @@ "displayNameEvent": "Connected changed", "type": "bool", "defaultValue": false + }, + { + "id": "1de7fac2-87f1-4c2b-9286-1b0895c5ac49", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ], "actionTypes": [ @@ -324,7 +401,7 @@ "name": "tasmotaBlinds", "displayName": "Tasmota blinds", "createMethods": ["auto"], - "interfaces": ["blind", "closable", "connectable"], + "interfaces": ["blind", "closable", "wirelessconnectable"], "paramTypes": [ { "id": "d8f26857-6a6c-4aba-8301-dbd3ba68bc28", @@ -347,6 +424,17 @@ "displayNameEvent": "Connected changed", "type": "bool", "defaultValue": false + }, + { + "id": "dc58b863-1e84-4469-b226-cd4349d82050", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 } ], "actionTypes": [ diff --git a/tasmota/translations/d136e0c0-0cbf-4731-aabb-b2201088d6cb-en_US.ts b/tasmota/translations/d136e0c0-0cbf-4731-aabb-b2201088d6cb-en_US.ts index 73598448..4661d59b 100644 --- a/tasmota/translations/d136e0c0-0cbf-4731-aabb-b2201088d6cb-en_US.ts +++ b/tasmota/translations/d136e0c0-0cbf-4731-aabb-b2201088d6cb-en_US.ts @@ -247,5 +247,59 @@ The name of the ActionType ({c9c9c569-e224-4f63-abed-782cba04d61b}) of ThingClas The name of the ThingClass ({70ae35db-68bf-42d7-872a-85582d27d128}) + + Signal strength + The name of the ParamType (ThingClass: tasmotaBlinds, EventType: signalStrength, ID: {dc58b863-1e84-4469-b226-cd4349d82050}) +---------- +The name of the StateType ({dc58b863-1e84-4469-b226-cd4349d82050}) of ThingClass tasmotaBlinds +---------- +The name of the ParamType (ThingClass: tasmotaShutter, EventType: signalStrength, ID: {1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) +---------- +The name of the StateType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass tasmotaShutter +---------- +The name of the ParamType (ThingClass: tasmotaLight, EventType: signalStrength, ID: {dcc39f5e-6bcb-4c04-910e-8dd5f9ad5402}) +---------- +The name of the StateType ({dcc39f5e-6bcb-4c04-910e-8dd5f9ad5402}) of ThingClass tasmotaLight +---------- +The name of the ParamType (ThingClass: tasmotaSwitch, EventType: signalStrength, ID: {34e54234-d2d6-4c93-8d52-bada19e5ff23}) +---------- +The name of the StateType ({34e54234-d2d6-4c93-8d52-bada19e5ff23}) of ThingClass tasmotaSwitch +---------- +The name of the ParamType (ThingClass: sonoff_quad, EventType: signalStrength, ID: {d80d8f37-f3c0-4364-998b-312339fd1fa8}) +---------- +The name of the StateType ({d80d8f37-f3c0-4364-998b-312339fd1fa8}) of ThingClass sonoff_quad +---------- +The name of the ParamType (ThingClass: sonoff_tri, EventType: signalStrength, ID: {08b4ec84-1aec-4e68-a3b4-ae251b8cbe6d}) +---------- +The name of the StateType ({08b4ec84-1aec-4e68-a3b4-ae251b8cbe6d}) of ThingClass sonoff_tri +---------- +The name of the ParamType (ThingClass: sonoff_dual, EventType: signalStrength, ID: {3d6a567f-d266-4711-bcf1-3ac1f53abadb}) +---------- +The name of the StateType ({3d6a567f-d266-4711-bcf1-3ac1f53abadb}) of ThingClass sonoff_dual +---------- +The name of the ParamType (ThingClass: sonoff_basic, EventType: signalStrength, ID: {f70e202a-c178-4fbe-a778-713220d11b23}) +---------- +The name of the StateType ({f70e202a-c178-4fbe-a778-713220d11b23}) of ThingClass sonoff_basic + + + + Signal strength changed + The name of the EventType ({dc58b863-1e84-4469-b226-cd4349d82050}) of ThingClass tasmotaBlinds +---------- +The name of the EventType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass tasmotaShutter +---------- +The name of the EventType ({dcc39f5e-6bcb-4c04-910e-8dd5f9ad5402}) of ThingClass tasmotaLight +---------- +The name of the EventType ({34e54234-d2d6-4c93-8d52-bada19e5ff23}) of ThingClass tasmotaSwitch +---------- +The name of the EventType ({d80d8f37-f3c0-4364-998b-312339fd1fa8}) of ThingClass sonoff_quad +---------- +The name of the EventType ({08b4ec84-1aec-4e68-a3b4-ae251b8cbe6d}) of ThingClass sonoff_tri +---------- +The name of the EventType ({3d6a567f-d266-4711-bcf1-3ac1f53abadb}) of ThingClass sonoff_dual +---------- +The name of the EventType ({f70e202a-c178-4fbe-a778-713220d11b23}) of ThingClass sonoff_basic + + diff --git a/tplink/integrationplugintplink.cpp b/tplink/integrationplugintplink.cpp index 0c282a54..8a8e0787 100644 --- a/tplink/integrationplugintplink.cpp +++ b/tplink/integrationplugintplink.cpp @@ -51,6 +51,10 @@ IntegrationPluginTPLink::IntegrationPluginTPLink() m_connectedStateTypesMap[kasaPlug110ThingClassId] = kasaPlug110ConnectedStateTypeId; m_connectedStateTypesMap[kasaSwitch200ThingClassId] = kasaSwitch200ConnectedStateTypeId; + m_signalStrengthStateTypesMap[kasaPlug100ThingClassId] = kasaPlug100SignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[kasaPlug110ThingClassId] = kasaPlug110SignalStrengthStateTypeId; + m_signalStrengthStateTypesMap[kasaSwitch200ThingClassId] = kasaSwitch200SignalStrengthStateTypeId; + m_powerStatetTypesMap[kasaPlug100ThingClassId] = kasaPlug100PowerStateTypeId; m_powerStatetTypesMap[kasaPlug110ThingClassId] = kasaPlug110PowerStateTypeId; m_powerStatetTypesMap[kasaSwitch200ThingClassId] = kasaSwitch200PowerStateTypeId; @@ -367,12 +371,17 @@ void IntegrationPluginTPLink::connectToDevice(Thing *thing, const QHostAddress & int relayState = systemMap.value("get_sysinfo").toMap().value("relay_state").toInt(); StateTypeId powerStateTypeId = m_powerStatetTypesMap.value(thing->thingClassId()); thing->setStateValue(powerStateTypeId, relayState == 1 ? true : false); + StateTypeId signalStrengthStateTypeId = m_signalStrengthStateTypesMap.value(thing->thingClassId()); + int rssi = systemMap.value("get_sysinfo").toMap().value("rssi").toInt(); + int signalStrength = qMax(0, qMin(1000, 2 * (rssi + 100))); + thing->setStateValue(signalStrengthStateTypeId, signalStrength); QString alias = systemMap.value("get_sysinfo").toMap().value("alias").toString(); if (thing->name() != alias) { thing->setName(alias); } + if (job.actionInfo) { job.actionInfo->finish(Thing::ThingErrorNoError); } diff --git a/tplink/integrationplugintplink.h b/tplink/integrationplugintplink.h index ea745269..669676eb 100644 --- a/tplink/integrationplugintplink.h +++ b/tplink/integrationplugintplink.h @@ -88,6 +88,7 @@ private: QHash m_idParamTypesMap; QHash m_connectedStateTypesMap; + QHash m_signalStrengthStateTypesMap; QHash m_powerStatetTypesMap; QHash m_currentPowerStatetTypesMap; QHash m_totalEnergyConsumedStatetTypesMap; diff --git a/tplink/integrationplugintplink.json b/tplink/integrationplugintplink.json index 4a8789ca..40a756a0 100644 --- a/tplink/integrationplugintplink.json +++ b/tplink/integrationplugintplink.json @@ -13,7 +13,7 @@ "name": "kasaPlug100", "displayName": "Kasa Smart Wi-Fi Plug (HS100/HS103/HS105/KP100)", "createMethods": ["discovery"], - "interfaces": [ "powersocket", "connectable" ], + "interfaces": [ "powersocket", "wirelessconnectable" ], "paramTypes": [ { "id": "7c7a4d88-6c7e-4981-b4f2-090976c0c9bb", @@ -33,6 +33,17 @@ "defaultValue": false, "cached": false }, + { + "id": "1de7fac2-87f1-4c2b-9286-1b0895c5ac49", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "a8991ea0-89f0-477b-97fb-414dd7d185b3", "name": "power", @@ -51,7 +62,7 @@ "name": "kasaPlug110", "displayName": "Kasa Smart Wi-Fi Plug With Energy Monitoring (HS110)", "createMethods": ["discovery"], - "interfaces": [ "powersocket", "extendedsmartmeterconsumer", "connectable" ], + "interfaces": [ "powersocket", "extendedsmartmeterconsumer", "wirelessconnectable" ], "paramTypes": [ { "id": "de3238f7-fe94-440d-b212-61cd4e221b50", @@ -71,6 +82,17 @@ "defaultValue": false, "cached": false }, + { + "id": "cb16cfb0-6608-486f-abe5-264aa652704d", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "f1a5fda4-87a6-46f6-9499-16811a5f4f4d", "name": "power", @@ -107,7 +129,7 @@ "name": "kasaSwitch200", "displayName": "Kasa Smart Wi-Fi Light Switch (HS200)", "createMethods": ["discovery"], - "interfaces": [ "light", "connectable" ], + "interfaces": [ "light", "wirelessconnectable" ], "paramTypes": [ { "id": "fe989b2f-034e-4615-8a47-4a8aa775ed99", @@ -127,6 +149,17 @@ "defaultValue": false, "cached": false }, + { + "id": "6387c4e3-b0c1-4151-a3c9-925929c2d51e", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "unit": "Percentage", + "minValue": 0, + "maxValue": 100, + "defaultValue": 100 + }, { "id": "3b0daf6c-ba04-4ff1-a381-685c869665b1", "name": "power", diff --git a/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-de.ts b/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-de.ts index b3c69278..fc3476ed 100644 --- a/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-de.ts +++ b/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-de.ts @@ -4,35 +4,35 @@ IntegrationPluginTPLink - + An error happened sending the discovery to the network. - Beim Durchsuchen des Netzwerks ist ein Fehler aufgetreten. + Beim Durchsuchen des Netzwerks ist ein Fehler aufgetreten. - + An error happened finding the device in the network. - Beim Suchen des Geräts ist ein Fehler aufgetreten. + Beim Suchen des Geräts ist ein Fehler aufgetreten. - + The device could not be found on the network. - Das Gerät konnte nicht im Netzwerk gefunden werden. + Das Gerät konnte nicht im Netzwerk gefunden werden. - + Error sending command to the network. - Der Befehl konnte nicht ins Netzwerk gesendet werden. + Der Befehl konnte nicht ins Netzwerk gesendet werden. tplink - - - + + + Connected The name of the ParamType (ThingClass: kasaSwitch200, EventType: connected, ID: {8792b3d1-f83d-44c3-b649-249a935d1eb4}) ---------- @@ -48,9 +48,9 @@ The name of the StateType ({79bcdd81-2e9d-4312-a4a7-85f808d046ef}) of ThingClass Verbunden - - - + + + Connected changed The name of the EventType ({8792b3d1-f83d-44c3-b649-249a935d1eb4}) of ThingClass kasaSwitch200 ---------- @@ -60,8 +60,8 @@ The name of the EventType ({79bcdd81-2e9d-4312-a4a7-85f808d046ef}) of ThingClass Verbunden/getrennt - - + + Current power consumption The name of the ParamType (ThingClass: kasaPlug110, EventType: currentPower, ID: {ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) ---------- @@ -69,15 +69,15 @@ The name of the StateType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass Aktueller Energieverbrauch - + Current power consumption changed The name of the EventType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass kasaPlug110 Aktueller Energieverbrauch geändert - - - + + + ID The name of the ParamType (ThingClass: kasaSwitch200, Type: thing, ID: {fe989b2f-034e-4615-8a47-4a8aa775ed99}) ---------- @@ -87,33 +87,33 @@ The name of the ParamType (ThingClass: kasaPlug100, Type: thing, ID: {7c7a4d88-6 ID - + Kasa Smart Wi-Fi Light Switch (HS200) The name of the ThingClass ({d527e576-d65e-4ae6-ae43-c89b594fb4c1}) Kasa Smart Wi-Fi Lichtschalter (HS200) - + Kasa Smart Wi-Fi Plug (HS100/HS103/HS105/KP100) The name of the ThingClass ({48f981ba-3836-4810-9744-a349088f4545}) Kasa Smart WLAN-Steckdose (HS100/HS103/HS105/KP100) - + Kasa Smart Wi-Fi Plug With Energy Monitoring (HS110) The name of the ThingClass ({32830124-9efb-4614-8227-ee269b1889b0}) Kasa Smart WLAN-Steckdose mit Verbrauchsanzeige (HS110) - - - + + + Power The name of the ParamType (ThingClass: kasaSwitch200, ActionType: power, ID: {3b0daf6c-ba04-4ff1-a381-685c869665b1}) ---------- @@ -135,8 +135,41 @@ The name of the StateType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClass Eingeschaltet - - + + + + + + + Signal strength + The name of the ParamType (ThingClass: kasaSwitch200, EventType: signalStrength, ID: {6387c4e3-b0c1-4151-a3c9-925929c2d51e}) +---------- +The name of the StateType ({6387c4e3-b0c1-4151-a3c9-925929c2d51e}) of ThingClass kasaSwitch200 +---------- +The name of the ParamType (ThingClass: kasaPlug110, EventType: signalStrength, ID: {cb16cfb0-6608-486f-abe5-264aa652704d}) +---------- +The name of the StateType ({cb16cfb0-6608-486f-abe5-264aa652704d}) of ThingClass kasaPlug110 +---------- +The name of the ParamType (ThingClass: kasaPlug100, EventType: signalStrength, ID: {1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) +---------- +The name of the StateType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass kasaPlug100 + Signalstärke + + + + + + Signal strength changed + The name of the EventType ({6387c4e3-b0c1-4151-a3c9-925929c2d51e}) of ThingClass kasaSwitch200 +---------- +The name of the EventType ({cb16cfb0-6608-486f-abe5-264aa652704d}) of ThingClass kasaPlug110 +---------- +The name of the EventType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass kasaPlug100 + Signalstärke geändert + + + + Total energy consumed The name of the ParamType (ThingClass: kasaPlug110, EventType: totalEnergyConsumed, ID: {a3533121-69ee-44fd-8394-13373e8f960e}) ---------- @@ -144,15 +177,15 @@ The name of the StateType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass Gesamter Energieverbrauch - + Total energy consumed changed The name of the EventType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass kasaPlug110 Gesamter Energieverbrauch geändert - - - + + + Turn on or off The name of the ActionType ({3b0daf6c-ba04-4ff1-a381-685c869665b1}) of ThingClass kasaSwitch200 ---------- @@ -162,9 +195,9 @@ The name of the ActionType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClas Ein- ausschalten - - - + + + Turned on or off The name of the EventType ({3b0daf6c-ba04-4ff1-a381-685c869665b1}) of ThingClass kasaSwitch200 ---------- @@ -174,8 +207,8 @@ The name of the EventType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClass Ein- ausgeschaltet - - + + tp-link The name of the vendor ({8603b6cf-52ec-4481-aca2-f29ebd6cd8a8}) ---------- diff --git a/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-en_US.ts b/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-en_US.ts index 50aebe6a..a545d37b 100644 --- a/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-en_US.ts +++ b/tplink/translations/024ff2e3-30df-44a1-9c8d-63cc416f1fb8-en_US.ts @@ -4,22 +4,22 @@ IntegrationPluginTPLink - + An error happened sending the discovery to the network. - + An error happened finding the device in the network. - + The device could not be found on the network. - + Error sending command to the network. @@ -27,12 +27,12 @@ tplink - - - + + + Connected The name of the ParamType (ThingClass: kasaSwitch200, EventType: connected, ID: {8792b3d1-f83d-44c3-b649-249a935d1eb4}) ---------- @@ -48,9 +48,9 @@ The name of the StateType ({79bcdd81-2e9d-4312-a4a7-85f808d046ef}) of ThingClass - - - + + + Connected changed The name of the EventType ({8792b3d1-f83d-44c3-b649-249a935d1eb4}) of ThingClass kasaSwitch200 ---------- @@ -60,8 +60,8 @@ The name of the EventType ({79bcdd81-2e9d-4312-a4a7-85f808d046ef}) of ThingClass - - + + Current power consumption The name of the ParamType (ThingClass: kasaPlug110, EventType: currentPower, ID: {ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) ---------- @@ -69,15 +69,15 @@ The name of the StateType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass - + Current power consumption changed The name of the EventType ({ccb52b57-5800-4f03-b7fa-f36dcebe1d4e}) of ThingClass kasaPlug110 - - - + + + ID The name of the ParamType (ThingClass: kasaSwitch200, Type: thing, ID: {fe989b2f-034e-4615-8a47-4a8aa775ed99}) ---------- @@ -87,33 +87,33 @@ The name of the ParamType (ThingClass: kasaPlug100, Type: thing, ID: {7c7a4d88-6 - + Kasa Smart Wi-Fi Light Switch (HS200) The name of the ThingClass ({d527e576-d65e-4ae6-ae43-c89b594fb4c1}) - + Kasa Smart Wi-Fi Plug (HS100/HS103/HS105/KP100) The name of the ThingClass ({48f981ba-3836-4810-9744-a349088f4545}) - + Kasa Smart Wi-Fi Plug With Energy Monitoring (HS110) The name of the ThingClass ({32830124-9efb-4614-8227-ee269b1889b0}) - - - + + + Power The name of the ParamType (ThingClass: kasaSwitch200, ActionType: power, ID: {3b0daf6c-ba04-4ff1-a381-685c869665b1}) ---------- @@ -135,8 +135,41 @@ The name of the StateType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClass - - + + + + + + + Signal strength + The name of the ParamType (ThingClass: kasaSwitch200, EventType: signalStrength, ID: {6387c4e3-b0c1-4151-a3c9-925929c2d51e}) +---------- +The name of the StateType ({6387c4e3-b0c1-4151-a3c9-925929c2d51e}) of ThingClass kasaSwitch200 +---------- +The name of the ParamType (ThingClass: kasaPlug110, EventType: signalStrength, ID: {cb16cfb0-6608-486f-abe5-264aa652704d}) +---------- +The name of the StateType ({cb16cfb0-6608-486f-abe5-264aa652704d}) of ThingClass kasaPlug110 +---------- +The name of the ParamType (ThingClass: kasaPlug100, EventType: signalStrength, ID: {1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) +---------- +The name of the StateType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass kasaPlug100 + + + + + + + Signal strength changed + The name of the EventType ({6387c4e3-b0c1-4151-a3c9-925929c2d51e}) of ThingClass kasaSwitch200 +---------- +The name of the EventType ({cb16cfb0-6608-486f-abe5-264aa652704d}) of ThingClass kasaPlug110 +---------- +The name of the EventType ({1de7fac2-87f1-4c2b-9286-1b0895c5ac49}) of ThingClass kasaPlug100 + + + + + Total energy consumed The name of the ParamType (ThingClass: kasaPlug110, EventType: totalEnergyConsumed, ID: {a3533121-69ee-44fd-8394-13373e8f960e}) ---------- @@ -144,15 +177,15 @@ The name of the StateType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass - + Total energy consumed changed The name of the EventType ({a3533121-69ee-44fd-8394-13373e8f960e}) of ThingClass kasaPlug110 - - - + + + Turn on or off The name of the ActionType ({3b0daf6c-ba04-4ff1-a381-685c869665b1}) of ThingClass kasaSwitch200 ---------- @@ -162,9 +195,9 @@ The name of the ActionType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClas - - - + + + Turned on or off The name of the EventType ({3b0daf6c-ba04-4ff1-a381-685c869665b1}) of ThingClass kasaSwitch200 ---------- @@ -174,8 +207,8 @@ The name of the EventType ({a8991ea0-89f0-477b-97fb-414dd7d185b3}) of ThingClass - - + + tp-link The name of the vendor ({8603b6cf-52ec-4481-aca2-f29ebd6cd8a8}) ----------