diff --git a/openweathermap/integrationpluginopenweathermap.cpp b/openweathermap/integrationpluginopenweathermap.cpp index 4f141513..4a7f2a2b 100644 --- a/openweathermap/integrationpluginopenweathermap.cpp +++ b/openweathermap/integrationpluginopenweathermap.cpp @@ -44,30 +44,19 @@ IntegrationPluginOpenweathermap::IntegrationPluginOpenweathermap() { - // max 60 calls/minute - // max 50000 calls/day - m_apiKey = "c1b9d5584bb740804871583f6c62744f"; - - QSettings settings(NymeaSettings::settingsPath() + "/nymead.conf", QSettings::IniFormat); - settings.beginGroup("OpenWeatherMap"); - if (settings.contains("apiKey")) { - m_apiKey = settings.value("apiKey").toString(); - QString printedCopy = m_apiKey; - qCDebug(dcOpenWeatherMap()) << "Using custom API key:" << printedCopy.replace(printedCopy.length() - 10, 10, "**********"); - } - - settings.endGroup(); } IntegrationPluginOpenweathermap::~IntegrationPluginOpenweathermap() { - hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer); } void IntegrationPluginOpenweathermap::init() { - m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(900); - connect(m_pluginTimer, &PluginTimer::timeout, this, &IntegrationPluginOpenweathermap::onPluginTimer); + updateApiKey(); + + connect(this, &IntegrationPlugin::configValueChanged, this, &IntegrationPluginOpenweathermap::updateApiKey); + connect(apiKeyStorage(), &ApiKeyStorage::keyAdded, this, &IntegrationPluginOpenweathermap::updateApiKey); + connect(apiKeyStorage(), &ApiKeyStorage::keyUpdated, this, &IntegrationPluginOpenweathermap::updateApiKey); } void IntegrationPluginOpenweathermap::discoverThings(ThingDiscoveryInfo *info) @@ -85,7 +74,21 @@ void IntegrationPluginOpenweathermap::discoverThings(ThingDiscoveryInfo *info) void IntegrationPluginOpenweathermap::setupThing(ThingSetupInfo *info) { update(info->thing()); + + if (m_apiKey.isEmpty()) { + info->finish(Thing::ThingErrorAuthenticationFailure, QT_TR_NOOP("No API key for OpenWeatherMap available.")); + return; + } info->finish(Thing::ThingErrorNoError); + + if (!m_pluginTimer) { + m_pluginTimer = hardwareManager()->pluginTimerManager()->registerTimer(900); + connect(m_pluginTimer, &PluginTimer::timeout, this, [this](){ + foreach (Thing *thing, myThings()) { + update(thing); + } + }); + } } void IntegrationPluginOpenweathermap::executeAction(ThingActionInfo *info) @@ -96,37 +99,28 @@ void IntegrationPluginOpenweathermap::executeAction(ThingActionInfo *info) void IntegrationPluginOpenweathermap::thingRemoved(Thing *thing) { - // check if a thing gets removed while we still have a reply! - foreach (Thing *d, m_weatherReplies.values()) { - if (d->id() == thing->id()) { - QNetworkReply *reply = m_weatherReplies.key(thing); - m_weatherReplies.take(reply); - reply->deleteLater(); - } + Q_UNUSED(thing) + if (myThings().isEmpty()) { + hardwareManager()->pluginTimerManager()->unregisterTimer(m_pluginTimer); + m_pluginTimer = nullptr; } } -void IntegrationPluginOpenweathermap::networkManagerReplyReady() +void IntegrationPluginOpenweathermap::updateApiKey() { - QNetworkReply *reply = static_cast(sender()); - - if (reply->error()) { - qCWarning(dcOpenWeatherMap) << "OpenWeatherMap reply error: " << reply->errorString(); - reply->deleteLater(); - return; + if (!(m_apiKey = configValue(openWeatherMapPluginCustomApiKeyParamTypeId).toString()).isEmpty()) { + qCDebug(dcOpenWeatherMap()) << "Using API key from plugin settings."; + } else if (!(m_apiKey = apiKeyStorage()->requestKey("openweathermap").data("appid")).isEmpty()) { + qCDebug(dcOpenWeatherMap()) << "Using API key from nymea API keys provider"; + } else { + qCWarning(dcOpenWeatherMap()) << "No API key set. This plugin might not work correctly."; + qCWarning(dcOpenWeatherMap()) << "Either install an API key pacakge (nymea-apikeysprovider-plugin-*) or provide a key in the plugin settings."; } - - if (m_weatherReplies.contains(reply)) { - QByteArray data = reply->readAll(); - Thing* thing = m_weatherReplies.take(reply); - processWeatherData(data, thing); - } - reply->deleteLater(); } void IntegrationPluginOpenweathermap::update(Thing *thing) { - qCDebug(dcOpenWeatherMap()) << "Refresh data for" << thing->name(); + qCDebug(dcOpenWeatherMap()) << "Refreshing data for" << thing->name(); QUrl url("http://api.openweathermap.org/data/2.5/weather"); QUrlQuery query; query.addQueryItem("id", thing->paramValue(openweathermapThingIdParamTypeId).toString()); @@ -136,8 +130,113 @@ void IntegrationPluginOpenweathermap::update(Thing *thing) url.setQuery(query); QNetworkReply *reply = hardwareManager()->networkManager()->get(QNetworkRequest(url)); - connect(reply, &QNetworkReply::finished, this, &IntegrationPluginOpenweathermap::networkManagerReplyReady); - m_weatherReplies.insert(reply, thing); + connect(reply, &QNetworkReply::finished, reply, &QNetworkReply::deleteLater); + connect(reply, &QNetworkReply::finished, thing, [thing, reply](){ + if (reply->error() != QNetworkReply::NoError) { + qCWarning(dcOpenWeatherMap) << "OpenWeatherMap reply error: " << reply->errorString(); + return; + } + + QByteArray data = reply->readAll(); + + QJsonParseError error; + QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error); + + if (error.error != QJsonParseError::NoError) { + qCWarning(dcOpenWeatherMap()) << "failed to parse weather data for thing " << thing->name() << "\n" << data << "\n" << error.errorString(); + return; + } + + qCDebug(dcOpenWeatherMap()) << "Received" << qUtf8Printable(jsonDoc.toJson()); + + // http://openweathermap.org/current + QVariantMap dataMap = jsonDoc.toVariant().toMap(); + if (dataMap.contains("clouds")) { + int cloudiness = dataMap.value("clouds").toMap().value("all").toInt(); + thing->setStateValue(openweathermapCloudinessStateTypeId, cloudiness); + } + if (dataMap.contains("dt")) { + uint lastUpdate = dataMap.value("dt").toUInt(); + thing->setStateValue(openweathermapUpdateTimeStateTypeId, lastUpdate); + } + + if (dataMap.contains("main")) { + + double temperatur = dataMap.value("main").toMap().value("temp").toDouble(); + double temperaturMax = dataMap.value("main").toMap().value("temp_max").toDouble(); + double temperaturMin = dataMap.value("main").toMap().value("temp_min").toDouble(); + double pressure = dataMap.value("main").toMap().value("pressure").toDouble(); + int humidity = dataMap.value("main").toMap().value("humidity").toInt(); + + thing->setStateValue(openweathermapTemperatureStateTypeId, temperatur); + thing->setStateValue(openweathermapTemperatureMinStateTypeId, temperaturMin); + thing->setStateValue(openweathermapTemperatureMaxStateTypeId, temperaturMax); + thing->setStateValue(openweathermapPressureStateTypeId, pressure); + thing->setStateValue(openweathermapHumidityStateTypeId, humidity); + } + + if (dataMap.contains("sys")) { + qint64 sunrise = dataMap.value("sys").toMap().value("sunrise").toLongLong(); + qint64 sunset = dataMap.value("sys").toMap().value("sunset").toLongLong(); + + thing->setStateValue(openweathermapSunriseTimeStateTypeId, sunrise); + thing->setStateValue(openweathermapSunsetTimeStateTypeId, sunset); + QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId()); + QDateTime up = QDateTime::fromMSecsSinceEpoch(sunrise * 1000); + QDateTime down = QDateTime::fromMSecsSinceEpoch(sunset * 1000); + QDateTime now = QDateTime::currentDateTime().toTimeZone(tz); + thing->setStateValue(openweathermapDaylightStateTypeId, up < now && down > now); + } + + if (dataMap.contains("visibility")) { + int visibility = dataMap.value("visibility").toInt(); + thing->setStateValue(openweathermapVisibilityStateTypeId, visibility); + } + + // http://openweathermap.org/weather-conditions + if (dataMap.contains("weather") && dataMap.value("weather").toList().count() > 0) { + int conditionId = dataMap.value("weather").toList().first().toMap().value("id").toInt(); + if (conditionId == 800) { + if (thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() > thing->stateValue(openweathermapSunriseTimeStateTypeId).toInt() && + thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() < thing->stateValue(openweathermapSunsetTimeStateTypeId).toInt()) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clear-day"); + } else { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clear-night"); + } + } else if (conditionId == 801) { + if (thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() > thing->stateValue(openweathermapSunriseTimeStateTypeId).toInt() && + thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() < thing->stateValue(openweathermapSunsetTimeStateTypeId).toInt()) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "few-clouds-day"); + } else { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "few-clouds-night"); + } + } else if (conditionId == 802) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clouds"); + } else if (conditionId >= 803 && conditionId < 900) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "overcast"); + } else if (conditionId >= 300 && conditionId < 400) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "light-rain"); + } else if (conditionId >= 500 && conditionId < 600) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "shower-rain"); + } else if (conditionId >= 200 && conditionId < 300) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "thunderstorm"); + } else if (conditionId >= 600 && conditionId < 700) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "snow"); + } else if (conditionId >= 700 && conditionId < 800) { + thing->setStateValue(openweathermapWeatherConditionStateTypeId, "fog"); + } + QString description = dataMap.value("weather").toList().first().toMap().value("description").toString(); + thing->setStateValue(openweathermapWeatherDescriptionStateTypeId, description); + } + + if (dataMap.contains("wind")) { + int windDirection = dataMap.value("wind").toMap().value("deg").toInt(); + double windSpeed = dataMap.value("wind").toMap().value("speed").toDouble(); + + thing->setStateValue(openweathermapWindDirectionStateTypeId, windDirection); + thing->setStateValue(openweathermapWindSpeedStateTypeId, windSpeed); + } + }); } void IntegrationPluginOpenweathermap::searchAutodetect(ThingDiscoveryInfo *info) @@ -305,111 +404,4 @@ void IntegrationPluginOpenweathermap::processSearchResults(const QListfinish(Thing::ThingErrorNoError); } -void IntegrationPluginOpenweathermap::processWeatherData(const QByteArray &data, Thing *thing) -{ - QJsonParseError error; - QJsonDocument jsonDoc = QJsonDocument::fromJson(data, &error); - - //qCDebug(dcOpenWeatherMap) << jsonDoc.toJson(); - - if (error.error != QJsonParseError::NoError) { - qCWarning(dcOpenWeatherMap) << "failed to parse weather data for thing " << thing->name() << ": " << data << ":" << error.errorString(); - return; - } - - // http://openweathermap.org/current - QVariantMap dataMap = jsonDoc.toVariant().toMap(); - if (dataMap.contains("clouds")) { - int cloudiness = dataMap.value("clouds").toMap().value("all").toInt(); - thing->setStateValue(openweathermapCloudinessStateTypeId, cloudiness); - } - if (dataMap.contains("dt")) { - uint lastUpdate = dataMap.value("dt").toUInt(); - thing->setStateValue(openweathermapUpdateTimeStateTypeId, lastUpdate); - } - - if (dataMap.contains("main")) { - - double temperatur = dataMap.value("main").toMap().value("temp").toDouble(); - double temperaturMax = dataMap.value("main").toMap().value("temp_max").toDouble(); - double temperaturMin = dataMap.value("main").toMap().value("temp_min").toDouble(); - double pressure = dataMap.value("main").toMap().value("pressure").toDouble(); - int humidity = dataMap.value("main").toMap().value("humidity").toInt(); - - thing->setStateValue(openweathermapTemperatureStateTypeId, temperatur); - thing->setStateValue(openweathermapTemperatureMinStateTypeId, temperaturMin); - thing->setStateValue(openweathermapTemperatureMaxStateTypeId, temperaturMax); - thing->setStateValue(openweathermapPressureStateTypeId, pressure); - thing->setStateValue(openweathermapHumidityStateTypeId, humidity); - } - - if (dataMap.contains("sys")) { - qint64 sunrise = dataMap.value("sys").toMap().value("sunrise").toLongLong(); - qint64 sunset = dataMap.value("sys").toMap().value("sunset").toLongLong(); - - thing->setStateValue(openweathermapSunriseTimeStateTypeId, sunrise); - thing->setStateValue(openweathermapSunsetTimeStateTypeId, sunset); - QTimeZone tz = QTimeZone(QTimeZone::systemTimeZoneId()); - QDateTime up = QDateTime::fromMSecsSinceEpoch(sunrise * 1000); - QDateTime down = QDateTime::fromMSecsSinceEpoch(sunset * 1000); - QDateTime now = QDateTime::currentDateTime().toTimeZone(tz); - thing->setStateValue(openweathermapDaylightStateTypeId, up < now && down > now); - } - - if (dataMap.contains("visibility")) { - int visibility = dataMap.value("visibility").toInt(); - thing->setStateValue(openweathermapVisibilityStateTypeId, visibility); - } - - // http://openweathermap.org/weather-conditions - if (dataMap.contains("weather") && dataMap.value("weather").toList().count() > 0) { - int conditionId = dataMap.value("weather").toList().first().toMap().value("id").toInt(); - if (conditionId == 800) { - if (thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() > thing->stateValue(openweathermapSunriseTimeStateTypeId).toInt() && - thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() < thing->stateValue(openweathermapSunsetTimeStateTypeId).toInt()) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clear-day"); - } else { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clear-night"); - } - } else if (conditionId == 801) { - if (thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() > thing->stateValue(openweathermapSunriseTimeStateTypeId).toInt() && - thing->stateValue(openweathermapUpdateTimeStateTypeId).toInt() < thing->stateValue(openweathermapSunsetTimeStateTypeId).toInt()) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "few-clouds-day"); - } else { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "few-clouds-night"); - } - } else if (conditionId == 802) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "clouds"); - } else if (conditionId >= 803 && conditionId < 900) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "overcast"); - } else if (conditionId >= 300 && conditionId < 400) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "light-rain"); - } else if (conditionId >= 500 && conditionId < 600) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "shower-rain"); - } else if (conditionId >= 200 && conditionId < 300) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "thunderstorm"); - } else if (conditionId >= 600 && conditionId < 700) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "snow"); - } else if (conditionId >= 700 && conditionId < 800) { - thing->setStateValue(openweathermapWeatherConditionStateTypeId, "fog"); - } - QString description = dataMap.value("weather").toList().first().toMap().value("description").toString(); - thing->setStateValue(openweathermapWeatherDescriptionStateTypeId, description); - } - - if (dataMap.contains("wind")) { - int windDirection = dataMap.value("wind").toMap().value("deg").toInt(); - double windSpeed = dataMap.value("wind").toMap().value("speed").toDouble(); - - thing->setStateValue(openweathermapWindDirectionStateTypeId, windDirection); - thing->setStateValue(openweathermapWindSpeedStateTypeId, windSpeed); - } -} - -void IntegrationPluginOpenweathermap::onPluginTimer() -{ - foreach (Thing *thing, myThings()) { - update(thing); - } -} diff --git a/openweathermap/integrationpluginopenweathermap.h b/openweathermap/integrationpluginopenweathermap.h index 50da0a79..9d218336 100644 --- a/openweathermap/integrationpluginopenweathermap.h +++ b/openweathermap/integrationpluginopenweathermap.h @@ -56,28 +56,18 @@ public: void thingRemoved(Thing *thing) override; -private: - PluginTimer *m_pluginTimer = nullptr; - QHash m_weatherReplies; +private slots: + void updateApiKey(); +private: QString m_apiKey; + PluginTimer *m_pluginTimer = nullptr; void update(Thing *thing); void searchAutodetect(ThingDiscoveryInfo *info); void search(QString searchString, ThingDiscoveryInfo *info); void searchGeoLocation(double lat, double lon, const QString &country, ThingDiscoveryInfo *info); - - void processAutodetectResponse(QByteArray data); - void processSearchResponse(QByteArray data); - void processGeoSearchResponse(QByteArray data); - void processSearchResults(const QList &cityList, ThingDiscoveryInfo *info); - void processWeatherData(const QByteArray &data, Thing *thing); - -private slots: - void networkManagerReplyReady(); - void onPluginTimer(); - }; #endif // INTEGRATIONPLUGINOPENWEATHERMAP_H diff --git a/openweathermap/integrationpluginopenweathermap.json b/openweathermap/integrationpluginopenweathermap.json index de028d1b..72c70723 100644 --- a/openweathermap/integrationpluginopenweathermap.json +++ b/openweathermap/integrationpluginopenweathermap.json @@ -2,6 +2,16 @@ "name": "OpenWeatherMap", "displayName": "OpenWeatherMap", "id": "bc6af567-2338-41d5-aac1-462dec6e4783", + "apiKeys": ["openweathermap"], + "paramTypes": [ + { + "id": "71d075c3-4c4f-4864-99be-42a3121ce196", + "name": "customApiKey", + "displayName": "Custom API key", + "type": "QString", + "defaultValue": "" + } + ], "vendors": [ { "name": "openWeatherMap", diff --git a/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-de.ts b/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-de.ts index 50bd141f..466df93e 100644 --- a/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-de.ts +++ b/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-de.ts @@ -4,28 +4,33 @@ IntegrationPluginOpenweathermap - + + No API key for OpenWeatherMap available. + Kein API Key für OpenWeatherMap verfügbar. + + + Error detecting current location. Fehler bei der Erkennung der aktuellen Position. - + Received unexpected data detecting current location. Unerwartete Daten zur Erkennung der aktuellen Position empfangen. - + Error searching for weather stations. Fehler bei der Suche nach Wetterstationen. - - + + Received unexpected data while searching for weather stations. Erhielt unerwartete Daten bei der Suche nach Wetterstationen. - + Error searching for weather stations in current location. Fehler bei der Suche nach Wetterstationen am aktuellen Standort. @@ -33,8 +38,8 @@ OpenWeatherMap - - + + OpenWeatherMap The name of the vendor ({bf1e96f0-9650-4e7c-a56c-916d54d18e7a}) ---------- @@ -42,38 +47,44 @@ The name of the plugin OpenWeatherMap ({bc6af567-2338-41d5-aac1-462dec6e4783})OpenWeatherMap - + Weather The name of the ThingClass ({985195aa-17ad-4530-88a4-cdd753d747d7}) Wetter - + name The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {394d3983-49d4-47f7-888b-243f3f5e9972}) Name - + country The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {f0cd96bb-ddd1-4484-8353-8b6633fa101d}) Land - + + Custom API key + The name of the ParamType (ThingClass: openWeatherMap, Type: plugin, ID: {71d075c3-4c4f-4864-99be-42a3121ce196}) + Benutzerdefinierter API Key + + + id The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {286342e1-b299-4f67-9d8f-2ed9e8844466}) ID - + location The name of the ParamType (ThingClass: openweathermap, Type: discovery, ID: {f370b076-a783-4b46-85b2-6f4a9dba55d8}) Ort - - + + weather condition The name of the ParamType (ThingClass: openweathermap, EventType: weatherCondition, ID: {f16891f3-1174-44f6-a940-cffc8b64bdc1}) ---------- @@ -81,26 +92,26 @@ The name of the StateType ({f16891f3-1174-44f6-a940-cffc8b64bdc1}) of ThingClass Wetterbedingung - + last update changed The name of the EventType ({36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) of ThingClass openweathermap Zuletzt aktualisiert geändert - + temperature changed The name of the EventType ({6013402f-b5b1-46b3-8490-f0c20d62fe61}) of ThingClass openweathermap Temperatur geändert - + weather condition changed The name of the EventType ({f16891f3-1174-44f6-a940-cffc8b64bdc1}) of ThingClass openweathermap Wetterbedingung geändert - - + + last update The name of the ParamType (ThingClass: openweathermap, EventType: updateTime, ID: {36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) ---------- @@ -108,8 +119,8 @@ The name of the StateType ({36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) of ThingClass Letztes Update - - + + temperature The name of the ParamType (ThingClass: openweathermap, EventType: temperature, ID: {6013402f-b5b1-46b3-8490-f0c20d62fe61}) ---------- @@ -117,14 +128,14 @@ The name of the StateType ({6013402f-b5b1-46b3-8490-f0c20d62fe61}) of ThingClass Temperatur - + temperature minimum changed The name of the EventType ({14ec2781-cb04-4bbf-b097-7d01ef982630}) of ThingClass openweathermap Temperatur Minimum geändert - - + + temperature minimum The name of the ParamType (ThingClass: openweathermap, EventType: temperatureMin, ID: {14ec2781-cb04-4bbf-b097-7d01ef982630}) ---------- @@ -132,14 +143,14 @@ The name of the StateType ({14ec2781-cb04-4bbf-b097-7d01ef982630}) of ThingClass Temperatur Minimum - + temperature maximum changed The name of the EventType ({fefe5563-452f-4833-b5cf-49c3cc67c772}) of ThingClass openweathermap Temperatur Maximum geändert - - + + temperature maximum The name of the ParamType (ThingClass: openweathermap, EventType: temperatureMax, ID: {fefe5563-452f-4833-b5cf-49c3cc67c772}) ---------- @@ -147,14 +158,14 @@ The name of the StateType ({fefe5563-452f-4833-b5cf-49c3cc67c772}) of ThingClass Temperatur Maximum - + humidity changed The name of the EventType ({6f32ec73-3240-4630-ada9-1c10b8e98123}) of ThingClass openweathermap Luftfeuchtigkeit geändert - - + + humidity The name of the ParamType (ThingClass: openweathermap, EventType: humidity, ID: {6f32ec73-3240-4630-ada9-1c10b8e98123}) ---------- @@ -162,14 +173,14 @@ The name of the StateType ({6f32ec73-3240-4630-ada9-1c10b8e98123}) of ThingClass Luftfeuchtigkeit - + pressure changed The name of the EventType ({4a42eea9-00eb-440b-915e-dbe42180f83b}) of ThingClass openweathermap Luftdruck geändert - - + + pressure The name of the ParamType (ThingClass: openweathermap, EventType: pressure, ID: {4a42eea9-00eb-440b-915e-dbe42180f83b}) ---------- @@ -177,14 +188,14 @@ The name of the StateType ({4a42eea9-00eb-440b-915e-dbe42180f83b}) of ThingClass Luftdruck - + wind speed changed The name of the EventType ({2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) of ThingClass openweathermap Windgeschwindigkeit geändert - - + + wind speed The name of the ParamType (ThingClass: openweathermap, EventType: windSpeed, ID: {2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) ---------- @@ -192,14 +203,14 @@ The name of the StateType ({2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) of ThingClass Windgeschwindigkeit - + wind direction changed The name of the EventType ({589e2ea5-65b2-4afd-9b72-e3708a589a12}) of ThingClass openweathermap Windrichtung geändert - - + + wind direction The name of the ParamType (ThingClass: openweathermap, EventType: windDirection, ID: {589e2ea5-65b2-4afd-9b72-e3708a589a12}) ---------- @@ -207,14 +218,14 @@ The name of the StateType ({589e2ea5-65b2-4afd-9b72-e3708a589a12}) of ThingClass Windrichtung - + cloudiness changed The name of the EventType ({798553bc-45c7-42eb-9105-430bddb5d9b7}) of ThingClass openweathermap Bewölkungsgrad geändert - - + + cloudiness The name of the ParamType (ThingClass: openweathermap, EventType: cloudiness, ID: {798553bc-45c7-42eb-9105-430bddb5d9b7}) ---------- @@ -222,14 +233,14 @@ The name of the StateType ({798553bc-45c7-42eb-9105-430bddb5d9b7}) of ThingClass Bewölkungsgrad - + visibility changed The name of the EventType ({1e10d129-cb88-48b0-9244-e3e7e7b175d9}) of ThingClass openweathermap Fernsicht geändert - - + + visibility The name of the ParamType (ThingClass: openweathermap, EventType: visibility, ID: {1e10d129-cb88-48b0-9244-e3e7e7b175d9}) ---------- @@ -237,14 +248,14 @@ The name of the StateType ({1e10d129-cb88-48b0-9244-e3e7e7b175d9}) of ThingClass Fernsicht - + weather description changed The name of the EventType ({f9539108-0e0e-4736-a306-6408f8e20a26}) of ThingClass openweathermap Wetter Beschreibung geändert - - + + weather description The name of the ParamType (ThingClass: openweathermap, EventType: weatherDescription, ID: {f9539108-0e0e-4736-a306-6408f8e20a26}) ---------- @@ -252,14 +263,14 @@ The name of the StateType ({f9539108-0e0e-4736-a306-6408f8e20a26}) of ThingClass Wetter Beschreibung - + sunset changed The name of the EventType ({af155e94-9492-44e1-8608-7d0ee8b5d50d}) of ThingClass openweathermap Sonnenuntergang geändert - - + + sunset The name of the ParamType (ThingClass: openweathermap, EventType: sunsetTime, ID: {af155e94-9492-44e1-8608-7d0ee8b5d50d}) ---------- @@ -267,14 +278,14 @@ The name of the StateType ({af155e94-9492-44e1-8608-7d0ee8b5d50d}) of ThingClass Sonnenuntergang - + sunrise changed The name of the EventType ({a1dddc3d-549f-4f20-b78b-be850548f286}) of ThingClass openweathermap Sonnenaufgang geändert - - + + sunrise The name of the ParamType (ThingClass: openweathermap, EventType: sunriseTime, ID: {a1dddc3d-549f-4f20-b78b-be850548f286}) ---------- @@ -282,14 +293,14 @@ The name of the StateType ({a1dddc3d-549f-4f20-b78b-be850548f286}) of ThingClass Sonnenaufgang - + daylightChanged The name of the EventType ({e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) of ThingClass openweathermap Tageslicht geändert - - + + daylight The name of the ParamType (ThingClass: openweathermap, EventType: daylight, ID: {e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) ---------- @@ -297,7 +308,7 @@ The name of the StateType ({e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) of ThingClass Tageslicht - + refresh The name of the ActionType ({cfbc6504-d86f-4856-8dfa-97b6fbb385e4}) of ThingClass openweathermap Aktualisieren diff --git a/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-en_US.ts b/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-en_US.ts index 99dc85f0..1b1a5f1f 100644 --- a/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-en_US.ts +++ b/openweathermap/translations/bc6af567-2338-41d5-aac1-462dec6e4783-en_US.ts @@ -4,28 +4,33 @@ IntegrationPluginOpenweathermap - + + No API key for OpenWeatherMap available. + + + + Error detecting current location. - + Received unexpected data detecting current location. - + Error searching for weather stations. - - + + Received unexpected data while searching for weather stations. - + Error searching for weather stations in current location. @@ -33,8 +38,8 @@ OpenWeatherMap - - + + OpenWeatherMap The name of the vendor ({bf1e96f0-9650-4e7c-a56c-916d54d18e7a}) ---------- @@ -42,38 +47,44 @@ The name of the plugin OpenWeatherMap ({bc6af567-2338-41d5-aac1-462dec6e4783}) - + Weather The name of the ThingClass ({985195aa-17ad-4530-88a4-cdd753d747d7}) - + name The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {394d3983-49d4-47f7-888b-243f3f5e9972}) - + country The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {f0cd96bb-ddd1-4484-8353-8b6633fa101d}) - + + Custom API key + The name of the ParamType (ThingClass: openWeatherMap, Type: plugin, ID: {71d075c3-4c4f-4864-99be-42a3121ce196}) + + + + id The name of the ParamType (ThingClass: openweathermap, Type: thing, ID: {286342e1-b299-4f67-9d8f-2ed9e8844466}) - + location The name of the ParamType (ThingClass: openweathermap, Type: discovery, ID: {f370b076-a783-4b46-85b2-6f4a9dba55d8}) - - + + weather condition The name of the ParamType (ThingClass: openweathermap, EventType: weatherCondition, ID: {f16891f3-1174-44f6-a940-cffc8b64bdc1}) ---------- @@ -81,26 +92,26 @@ The name of the StateType ({f16891f3-1174-44f6-a940-cffc8b64bdc1}) of ThingClass - + last update changed The name of the EventType ({36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) of ThingClass openweathermap - + temperature changed The name of the EventType ({6013402f-b5b1-46b3-8490-f0c20d62fe61}) of ThingClass openweathermap - + weather condition changed The name of the EventType ({f16891f3-1174-44f6-a940-cffc8b64bdc1}) of ThingClass openweathermap - - + + last update The name of the ParamType (ThingClass: openweathermap, EventType: updateTime, ID: {36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) ---------- @@ -108,8 +119,8 @@ The name of the StateType ({36b2f09b-7d77-4fbc-a68f-23d735dda0b1}) of ThingClass - - + + temperature The name of the ParamType (ThingClass: openweathermap, EventType: temperature, ID: {6013402f-b5b1-46b3-8490-f0c20d62fe61}) ---------- @@ -117,14 +128,14 @@ The name of the StateType ({6013402f-b5b1-46b3-8490-f0c20d62fe61}) of ThingClass - + temperature minimum changed The name of the EventType ({14ec2781-cb04-4bbf-b097-7d01ef982630}) of ThingClass openweathermap - - + + temperature minimum The name of the ParamType (ThingClass: openweathermap, EventType: temperatureMin, ID: {14ec2781-cb04-4bbf-b097-7d01ef982630}) ---------- @@ -132,14 +143,14 @@ The name of the StateType ({14ec2781-cb04-4bbf-b097-7d01ef982630}) of ThingClass - + temperature maximum changed The name of the EventType ({fefe5563-452f-4833-b5cf-49c3cc67c772}) of ThingClass openweathermap - - + + temperature maximum The name of the ParamType (ThingClass: openweathermap, EventType: temperatureMax, ID: {fefe5563-452f-4833-b5cf-49c3cc67c772}) ---------- @@ -147,14 +158,14 @@ The name of the StateType ({fefe5563-452f-4833-b5cf-49c3cc67c772}) of ThingClass - + humidity changed The name of the EventType ({6f32ec73-3240-4630-ada9-1c10b8e98123}) of ThingClass openweathermap - - + + humidity The name of the ParamType (ThingClass: openweathermap, EventType: humidity, ID: {6f32ec73-3240-4630-ada9-1c10b8e98123}) ---------- @@ -162,14 +173,14 @@ The name of the StateType ({6f32ec73-3240-4630-ada9-1c10b8e98123}) of ThingClass - + pressure changed The name of the EventType ({4a42eea9-00eb-440b-915e-dbe42180f83b}) of ThingClass openweathermap - - + + pressure The name of the ParamType (ThingClass: openweathermap, EventType: pressure, ID: {4a42eea9-00eb-440b-915e-dbe42180f83b}) ---------- @@ -177,14 +188,14 @@ The name of the StateType ({4a42eea9-00eb-440b-915e-dbe42180f83b}) of ThingClass - + wind speed changed The name of the EventType ({2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) of ThingClass openweathermap - - + + wind speed The name of the ParamType (ThingClass: openweathermap, EventType: windSpeed, ID: {2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) ---------- @@ -192,14 +203,14 @@ The name of the StateType ({2bf63430-e9e2-4fbf-88e6-6f1b4770f287}) of ThingClass - + wind direction changed The name of the EventType ({589e2ea5-65b2-4afd-9b72-e3708a589a12}) of ThingClass openweathermap - - + + wind direction The name of the ParamType (ThingClass: openweathermap, EventType: windDirection, ID: {589e2ea5-65b2-4afd-9b72-e3708a589a12}) ---------- @@ -207,14 +218,14 @@ The name of the StateType ({589e2ea5-65b2-4afd-9b72-e3708a589a12}) of ThingClass - + cloudiness changed The name of the EventType ({798553bc-45c7-42eb-9105-430bddb5d9b7}) of ThingClass openweathermap - - + + cloudiness The name of the ParamType (ThingClass: openweathermap, EventType: cloudiness, ID: {798553bc-45c7-42eb-9105-430bddb5d9b7}) ---------- @@ -222,14 +233,14 @@ The name of the StateType ({798553bc-45c7-42eb-9105-430bddb5d9b7}) of ThingClass - + visibility changed The name of the EventType ({1e10d129-cb88-48b0-9244-e3e7e7b175d9}) of ThingClass openweathermap - - + + visibility The name of the ParamType (ThingClass: openweathermap, EventType: visibility, ID: {1e10d129-cb88-48b0-9244-e3e7e7b175d9}) ---------- @@ -237,14 +248,14 @@ The name of the StateType ({1e10d129-cb88-48b0-9244-e3e7e7b175d9}) of ThingClass - + weather description changed The name of the EventType ({f9539108-0e0e-4736-a306-6408f8e20a26}) of ThingClass openweathermap - - + + weather description The name of the ParamType (ThingClass: openweathermap, EventType: weatherDescription, ID: {f9539108-0e0e-4736-a306-6408f8e20a26}) ---------- @@ -252,14 +263,14 @@ The name of the StateType ({f9539108-0e0e-4736-a306-6408f8e20a26}) of ThingClass - + sunset changed The name of the EventType ({af155e94-9492-44e1-8608-7d0ee8b5d50d}) of ThingClass openweathermap - - + + sunset The name of the ParamType (ThingClass: openweathermap, EventType: sunsetTime, ID: {af155e94-9492-44e1-8608-7d0ee8b5d50d}) ---------- @@ -267,14 +278,14 @@ The name of the StateType ({af155e94-9492-44e1-8608-7d0ee8b5d50d}) of ThingClass - + sunrise changed The name of the EventType ({a1dddc3d-549f-4f20-b78b-be850548f286}) of ThingClass openweathermap - - + + sunrise The name of the ParamType (ThingClass: openweathermap, EventType: sunriseTime, ID: {a1dddc3d-549f-4f20-b78b-be850548f286}) ---------- @@ -282,14 +293,14 @@ The name of the StateType ({a1dddc3d-549f-4f20-b78b-be850548f286}) of ThingClass - + daylightChanged The name of the EventType ({e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) of ThingClass openweathermap - - + + daylight The name of the ParamType (ThingClass: openweathermap, EventType: daylight, ID: {e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) ---------- @@ -297,7 +308,7 @@ The name of the StateType ({e0a14b66-c8e1-49fb-8eff-b48e5dce80de}) of ThingClass - + refresh The name of the ActionType ({cfbc6504-d86f-4856-8dfa-97b6fbb385e4}) of ThingClass openweathermap