diff --git a/aqi/README.md b/aqi/README.md index d940e9d5..4f75693a 100644 --- a/aqi/README.md +++ b/aqi/README.md @@ -29,13 +29,13 @@ Besides the air pollution level the plug-in also states a cautionary statement. Both states can be used to let nymea notify you about the pollution level and inform you what precautions should be taken. -## Requirments +## Requirements * Valid "Air Quality Index" API Key + * This might be provided through the nymea community API Key provider or by setting a custom API Key in the plug-in settings. * The package "nymea-plugin-airqualityindex" must be installed * Internet connection ## More More about the different Air Quality Levels: https://www.airnow.gov/index.cfm?action=aqibasics.aqi - diff --git a/aqi/airqualityindex.cpp b/aqi/airqualityindex.cpp index 9373a2c8..c7837e92 100644 --- a/aqi/airqualityindex.cpp +++ b/aqi/airqualityindex.cpp @@ -52,9 +52,10 @@ void AirQualityIndex::setApiKey(const QString &apiKey) QUuid AirQualityIndex::searchByName(const QString &name) { - if (m_apiKey.isEmpty()) - qCWarning(dcAirQualityIndex()) << "API key is not set"; - + if (m_apiKey.isEmpty()) { + qCWarning(dcAirQualityIndex()) << "API key is not set, not sending request"; + return ""; + } QUuid requestId = QUuid::createUuid();; QUrl url; url.setUrl(m_baseUrl); @@ -116,10 +117,11 @@ QUuid AirQualityIndex::searchByName(const QString &name) QUuid AirQualityIndex::getDataByIp() { - if (m_apiKey.isEmpty()) - qCWarning(dcAirQualityIndex()) << "API key is not set"; - - QUuid requestId = QUuid::createUuid();; + if (m_apiKey.isEmpty()) { + qCWarning(dcAirQualityIndex()) << "API key is not set, not sending request"; + return ""; + } + QUuid requestId = QUuid::createUuid(); QUrl url; url.setUrl(m_baseUrl); url.setPath("/feed/here/"); @@ -151,15 +153,17 @@ QUuid AirQualityIndex::getDataByIp() return requestId; } -QUuid AirQualityIndex::getDataByGeolocation(const QString &lat, const QString &lng) +QUuid AirQualityIndex::getDataByGeolocation(double lat, double lng) { - if (m_apiKey.isEmpty()) - qCWarning(dcAirQualityIndex()) << "API key is not set"; + if (m_apiKey.isEmpty()) { + qCWarning(dcAirQualityIndex()) << "API key is not set, not sending request"; + return ""; + } QUuid requestId = QUuid::createUuid(); QUrl url; url.setUrl(m_baseUrl); - url.setPath("/feed/geo:"+lat+";"+lng+"/"); + url.setPath(QString("/feed/geo:%1;%2/").arg(lat).arg(lng)); QUrlQuery query; query.addQueryItem("token", m_apiKey); url.setQuery(query); @@ -198,6 +202,14 @@ bool AirQualityIndex::parseData(QUuid requestId, const QByteArray &data) qCWarning(dcAirQualityIndex()) << "Received invalide JSON object"; return false; } + + if (doc.toVariant().toMap().contains("status")) { + if (doc.toVariant().toMap().value("status") == "error") { + qCWarning(dcAirQualityIndex()) << "Server responded with error:" << doc.toVariant().toMap().value("data").toString(); + return false; + } + } + Station station; station.aqi = doc.toVariant().toMap().value("data").toMap().value("aqi").toInt(); station.idx = doc.toVariant().toMap().value("data").toMap().value("idx").toInt(); diff --git a/aqi/airqualityindex.h b/aqi/airqualityindex.h index fd332c42..79cd1393 100644 --- a/aqi/airqualityindex.h +++ b/aqi/airqualityindex.h @@ -73,7 +73,7 @@ public: void setApiKey(const QString &apiKey); QUuid searchByName(const QString &name); QUuid getDataByIp(); - QUuid getDataByGeolocation(const QString &lat, const QString &lng); + QUuid getDataByGeolocation(double lat, double lng); private: NetworkAccessManager *m_networkAccessManager; diff --git a/aqi/integrationpluginaqi.cpp b/aqi/integrationpluginaqi.cpp index f6a21a77..4acb1528 100644 --- a/aqi/integrationpluginaqi.cpp +++ b/aqi/integrationpluginaqi.cpp @@ -30,63 +30,37 @@ #include "integrationpluginaqi.h" #include "plugininfo.h" +#include "nymeasettings.h" #include IntegrationPluginAqi::IntegrationPluginAqi() { + connect(this, &IntegrationPluginAqi::configValueChanged, this, [this] (const ParamTypeId ¶mTypeId, const QVariant &value) { -} - -void IntegrationPluginAqi::startPairing(ThingPairingInfo *info) -{ - NetworkAccessManager *network = hardwareManager()->networkManager(); - QNetworkReply *reply = network->get(QNetworkRequest(QUrl("https://api.waqi.info"))); - connect(reply, &QNetworkReply::finished, this, [reply, info] { - reply->deleteLater(); - - if (reply->error() == QNetworkReply::NetworkError::HostNotFoundError) { - info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("Air quality index server is not reachable.")); - } else { - info->finish(Thing::ThingErrorNoError, QT_TR_NOOP("Please enter your API token for Air Quality Index")); + if (paramTypeId == airQualityIndexPluginApiKeyParamTypeId && m_aqiConnection) { + if (!value.toString().isEmpty()) { + qCDebug(dcAirQualityIndex()) << "Custom API key updated"; + m_aqiConnection->setApiKey(value.toString()); + } else { + qCDebug(dcAirQualityIndex()) << "Custom API key has been deleted"; + QString apiKey = apiKeyStorage()->requestKey("aqi").data("apiKey"); + if (apiKey.isEmpty()) { + qCWarning(dcApiKeys()) << "No API Key is available, keeping the AQI connection as it is"; + } else { + m_aqiConnection->setApiKey(apiKey); + } + } } }); } -void IntegrationPluginAqi::confirmPairing(ThingPairingInfo *info, const QString &username, const QString &secret) -{ - Q_UNUSED(username) - - QNetworkRequest request(QUrl("https://api.waqi.info/feed/here/?token="+secret)); - QNetworkReply *reply = hardwareManager()->networkManager()->get(request); - connect(reply, &QNetworkReply::finished, info, [this, reply, info, secret](){ - reply->deleteLater(); - - int status = reply->attribute(QNetworkRequest::HttpStatusCodeAttribute).toInt(); - - // check HTTP status code - if (status != 200) { - //: Error setting up device with invalid token - info->finish(Thing::ThingErrorAuthenticationFailure, QT_TR_NOOP("This token is not valid.")); - return; - } - - pluginStorage()->beginGroup(info->thingId().toString()); - pluginStorage()->setValue("apiKey", secret); - pluginStorage()->endGroup(); - info->finish(Thing::ThingErrorNoError); - }); -} - void IntegrationPluginAqi::discoverThings(ThingDiscoveryInfo *info) { if (!m_aqiConnection) { - QString apiKey = "74d31bb5ad9bcdeaed48097418b55188cb56d450"; //temporary key for discovery - m_aqiConnection = new AirQualityIndex(hardwareManager()->networkManager(), apiKey, this); - connect(m_aqiConnection, &AirQualityIndex::requestExecuted, this, &IntegrationPluginAqi::onRequestExecuted); - connect(m_aqiConnection, &AirQualityIndex::dataReceived, this, &IntegrationPluginAqi::onAirQualityDataReceived); - connect(m_aqiConnection, &AirQualityIndex::stationsReceived, this, &IntegrationPluginAqi::onAirQualityStationsReceived); - + if(!createAqiConnection()) { + return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("API key is not available.")); + } connect(info, &ThingDiscoveryInfo::aborted, [this] { if (myThings().filterByThingClassId(airQualityIndexThingClassId).isEmpty()) { m_aqiConnection->deleteLater(); @@ -105,16 +79,11 @@ void IntegrationPluginAqi::setupThing(ThingSetupInfo *info) { if (info->thing()->thingClassId() == airQualityIndexThingClassId) { if (!m_aqiConnection) { - pluginStorage()->beginGroup(info->thing()->id().toString()); - QString apiKey = pluginStorage()->value("apiKey").toString(); - pluginStorage()->endGroup(); - m_aqiConnection = new AirQualityIndex(hardwareManager()->networkManager(), apiKey, this); - connect(m_aqiConnection, &AirQualityIndex::requestExecuted, this, &IntegrationPluginAqi::onRequestExecuted); - connect(m_aqiConnection, &AirQualityIndex::dataReceived, this, &IntegrationPluginAqi::onAirQualityDataReceived); - connect(m_aqiConnection, &AirQualityIndex::stationsReceived, this, &IntegrationPluginAqi::onAirQualityStationsReceived); - - QString longitude = info->thing()->paramValue(airQualityIndexThingLongitudeParamTypeId).toString(); - QString latitude = info->thing()->paramValue(airQualityIndexThingLatitudeParamTypeId).toString(); + if(!createAqiConnection()) { + return info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("API key is not available.")); + } + double longitude = info->thing()->paramValue(airQualityIndexThingLongitudeParamTypeId).toDouble(); + double latitude = info->thing()->paramValue(airQualityIndexThingLatitudeParamTypeId).toDouble(); QUuid requestId = m_aqiConnection->getDataByGeolocation(latitude, longitude); m_asyncSetups.insert(requestId, info); @@ -128,11 +97,6 @@ void IntegrationPluginAqi::setupThing(ThingSetupInfo *info) } else { // An AQI connection might be setup because of an discovery request // or because there is already another thing using the connection - // In any case the API key is being updated to avoid using the discovery key. - pluginStorage()->beginGroup(info->thing()->id().toString()); - QString apiKey = pluginStorage()->value("apiKey").toString(); - pluginStorage()->endGroup(); - m_aqiConnection->setApiKey(apiKey); info->finish(Thing::ThingErrorNoError); } } else { @@ -150,8 +114,8 @@ void IntegrationPluginAqi::postSetupThing(Thing *thing) return; } - QString longitude = thing->paramValue(airQualityIndexThingLongitudeParamTypeId).toString(); - QString latitude = thing->paramValue(airQualityIndexThingLatitudeParamTypeId).toString(); + double longitude = thing->paramValue(airQualityIndexThingLongitudeParamTypeId).toDouble(); + double latitude = thing->paramValue(airQualityIndexThingLatitudeParamTypeId).toDouble(); QUuid requestId = m_aqiConnection->getDataByGeolocation(latitude, longitude); m_asyncRequests.insert(requestId, thing->id()); } @@ -162,6 +126,24 @@ void IntegrationPluginAqi::postSetupThing(Thing *thing) } } +bool IntegrationPluginAqi::createAqiConnection() +{ + QString apiKey = configValue(airQualityIndexPluginApiKeyParamTypeId).toString(); + + if (apiKey.isEmpty()) { + apiKey = apiKeyStorage()->requestKey("aqi").data("apiKey"); + } + if (apiKey.isEmpty()) { + qCWarning(dcAirQualityIndex()) << "Could not find any API key for AQI"; + return false; + } + m_aqiConnection = new AirQualityIndex(hardwareManager()->networkManager(), apiKey, this); + connect(m_aqiConnection, &AirQualityIndex::requestExecuted, this, &IntegrationPluginAqi::onRequestExecuted); + connect(m_aqiConnection, &AirQualityIndex::dataReceived, this, &IntegrationPluginAqi::onAirQualityDataReceived); + connect(m_aqiConnection, &AirQualityIndex::stationsReceived, this, &IntegrationPluginAqi::onAirQualityStationsReceived); + return true; +} + void IntegrationPluginAqi::thingRemoved(Thing *thing) { Q_UNUSED(thing) @@ -259,9 +241,8 @@ void IntegrationPluginAqi::onPluginTimer() return; foreach (Thing *thing, myThings().filterByThingClassId(airQualityIndexThingClassId)) { - - QString longitude = thing->paramValue(airQualityIndexThingLongitudeParamTypeId).toString(); - QString latitude = thing->paramValue(airQualityIndexThingLatitudeParamTypeId).toString(); + double longitude = thing->paramValue(airQualityIndexThingLongitudeParamTypeId).toDouble(); + double latitude = thing->paramValue(airQualityIndexThingLatitudeParamTypeId).toDouble(); QUuid requestId = m_aqiConnection->getDataByGeolocation(latitude, longitude); m_asyncRequests.insert(requestId, thing->id()); } @@ -269,7 +250,16 @@ void IntegrationPluginAqi::onPluginTimer() void IntegrationPluginAqi::onRequestExecuted(QUuid requestId, bool success) { - qCDebug(dcAirQualityIndex()) << "Request executd, requestId:" << requestId << "Success:" << success << "is an async request:" << m_asyncRequests.contains(requestId); + qCDebug(dcAirQualityIndex()) << "Request executed, requestId:" << requestId << "Success:" << success << "is an async request:" << m_asyncRequests.contains(requestId); + if (m_asyncDiscovery.contains(requestId) && !success) { + ThingDiscoveryInfo *info = m_asyncDiscovery.take(requestId); + info->finish(Thing::ThingErrorHardwareNotAvailable, QT_TR_NOOP("Air quality index server not available, please check your internet connection.")); + if (myThings().filterByThingClassId(airQualityIndexThingClassId).isEmpty() && m_aqiConnection) { + m_aqiConnection->deleteLater(); + m_aqiConnection = nullptr; + } + } + if (m_asyncRequests.contains(requestId)) { Thing *thing = myThings().findById(m_asyncRequests.value(requestId)); diff --git a/aqi/integrationpluginaqi.h b/aqi/integrationpluginaqi.h index 14808bfd..8ca2c2c9 100644 --- a/aqi/integrationpluginaqi.h +++ b/aqi/integrationpluginaqi.h @@ -50,8 +50,6 @@ class IntegrationPluginAqi : public IntegrationPlugin public: explicit IntegrationPluginAqi(); - void startPairing(ThingPairingInfo *info) override; - void confirmPairing(ThingPairingInfo *info, const QString &username, const QString &secret) override; void discoverThings(ThingDiscoveryInfo *info) override; void setupThing(ThingSetupInfo *info) override; void thingRemoved(Thing *thing) override; @@ -64,6 +62,8 @@ private: QHash m_asyncDiscovery; QHash m_asyncSetups; QHash m_asyncRequests; + QString getApiKey(); + bool createAqiConnection(); private slots: void onPluginTimer(); diff --git a/aqi/integrationpluginaqi.json b/aqi/integrationpluginaqi.json index 85d2c9e9..349b79ab 100644 --- a/aqi/integrationpluginaqi.json +++ b/aqi/integrationpluginaqi.json @@ -1,11 +1,21 @@ { "name": "AirQualityIndex", - "displayName": "AirQualityIndex", + "displayName": "Air quality index", "id": "57d69b76-4d2d-41ec-bef6-949a79ffbe6b", + "paramTypes": [ + { + "id": "b6861adb-7ed5-445f-b500-4df9eab866ef", + "name": "apiKey", + "displayName": "Custom API key", + "type": "QString", + "defaultValue": "" + } + ], + "apiKeys": ["aqi"], "vendors": [ { "name": "airQualityIndex", - "displayName": "Air Quality Index", + "displayName": "Air quality index", "id": "6c8e2ded-0a33-4e77-b76c-ea02168741ec", "thingClasses": [ { @@ -14,22 +24,21 @@ "displayName": "Air quality index", "interfaces": ["windspeedsensor", "humiditysensor", "pressuresensor", "temperaturesensor", "connectable"], "createMethods": ["discovery", "user"], - "setupMethod": "displaypin", "paramTypes": [ - { - "id": "afd5803b-6c98-44d7-9f4a-45e91cfb062e", - "name": "latitude", - "displayName": "Latitude", - "type": "QString", - "inputType": "TextLine" - }, - { - "id": "4800d78e-a367-41f7-9bf6-7c81d40ce19a", - "name": "longitude", - "displayName": "Longitude", - "type": "QString", - "inputType": "TextLine" - } + { + "id": "afd5803b-6c98-44d7-9f4a-45e91cfb062e", + "name": "latitude", + "displayName": "Latitude", + "type": "double", + "defaultValue": 0.00 + }, + { + "id": "4800d78e-a367-41f7-9bf6-7c81d40ce19a", + "name": "longitude", + "displayName": "Longitude", + "type": "double", + "defaultValue": 0.00 + } ], "stateTypes": [ { diff --git a/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-de.ts b/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-de.ts new file mode 100644 index 00000000..1a8522dd --- /dev/null +++ b/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-de.ts @@ -0,0 +1,287 @@ + + + + + AirQualityIndex + + + + Air quality + The name of the ParamType (ThingClass: airQualityIndex, EventType: airQuality, ID: {33a3329a-4117-4488-aa18-91c76056ed6e}) +---------- +The name of the StateType ({33a3329a-4117-4488-aa18-91c76056ed6e}) of ThingClass airQualityIndex + Luftqualität + + + + Air quality changed + The name of the EventType ({33a3329a-4117-4488-aa18-91c76056ed6e}) of ThingClass airQualityIndex + Luftqualität geändert + + + + + + Air quality index + The name of the ThingClass ({23ea32c9-38b0-4155-bacc-3afa8c09f6ee}) +---------- +The name of the vendor ({6c8e2ded-0a33-4e77-b76c-ea02168741ec}) +---------- +The name of the plugin AirQualityIndex ({57d69b76-4d2d-41ec-bef6-949a79ffbe6b}) + Air quality index + + + + + Carbon monoxide level (CO) + The name of the ParamType (ThingClass: airQualityIndex, EventType: co, ID: {54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) +---------- +The name of the StateType ({54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) of ThingClass airQualityIndex + Kohlenmonoxidgehalt (CO) + + + + Carbon monoxide level (CO) changed + The name of the EventType ({54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) of ThingClass airQualityIndex + Kohlenmonoxidgehalt (CO) geändert + + + + + Cautionary statement + The name of the ParamType (ThingClass: airQualityIndex, EventType: cautionaryStatement, ID: {cfece671-4e88-4c49-9456-e3f8f7c79ab3}) +---------- +The name of the StateType ({cfece671-4e88-4c49-9456-e3f8f7c79ab3}) of ThingClass airQualityIndex + Warnhinweis + + + + Cautionary statement changed + The name of the EventType ({cfece671-4e88-4c49-9456-e3f8f7c79ab3}) of ThingClass airQualityIndex + Warnhinweis geändert + + + + + Coarse dust particles pollution level (PM10) + The name of the ParamType (ThingClass: airQualityIndex, EventType: pm10, ID: {24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) +---------- +The name of the StateType ({24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) of ThingClass airQualityIndex + Verschmutzungsgrad der groben Staubpartikel (PM10) + + + + Coarse dust particles pollution level (PM10) changed + The name of the EventType ({24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) of ThingClass airQualityIndex + Verschmutzungsgrad der groben Staubpartikel (PM10) geändert + + + + + Connected + The name of the ParamType (ThingClass: airQualityIndex, EventType: connected, ID: {7b9135cd-2461-4d33-b2b3-3dc600983895}) +---------- +The name of the StateType ({7b9135cd-2461-4d33-b2b3-3dc600983895}) of ThingClass airQualityIndex + Verbunden + + + + Connected changed + The name of the EventType ({7b9135cd-2461-4d33-b2b3-3dc600983895}) of ThingClass airQualityIndex + Verbunden geändert + + + + Custom API key + The name of the ParamType (ThingClass: airQualityIndex, Type: plugin, ID: {b6861adb-7ed5-445f-b500-4df9eab866ef}) + Benutzerdefinierter API Key + + + + + Fine particles pollution level (PM2.5) + The name of the ParamType (ThingClass: airQualityIndex, EventType: pm25, ID: {bc8c4c83-d229-4be4-8732-bc4f2390f399}) +---------- +The name of the StateType ({bc8c4c83-d229-4be4-8732-bc4f2390f399}) of ThingClass airQualityIndex + Verschmutzungsgrad der Feinstaubpartikel (PM2,5) + + + + Fine particles pollution level (PM2.5) changed + The name of the EventType ({bc8c4c83-d229-4be4-8732-bc4f2390f399}) of ThingClass airQualityIndex + Verschmutzungsgrad der Feinstaubpartikel (PM2,5) geändert + + + + + Humidity + The name of the ParamType (ThingClass: airQualityIndex, EventType: humidity, ID: {4fc45fca-25ab-45a0-b862-817eea1f51e3}) +---------- +The name of the StateType ({4fc45fca-25ab-45a0-b862-817eea1f51e3}) of ThingClass airQualityIndex + Luftfeuchtigkeit + + + + Humidity changed + The name of the EventType ({4fc45fca-25ab-45a0-b862-817eea1f51e3}) of ThingClass airQualityIndex + Luftfeuchtigkeit geändert + + + + Latitude + The name of the ParamType (ThingClass: airQualityIndex, Type: thing, ID: {afd5803b-6c98-44d7-9f4a-45e91cfb062e}) + Breitengrad + + + + Longitude + The name of the ParamType (ThingClass: airQualityIndex, Type: thing, ID: {4800d78e-a367-41f7-9bf6-7c81d40ce19a}) + Längengrad + + + + + Nitrogen Dioxide level (NO2) + The name of the ParamType (ThingClass: airQualityIndex, EventType: no2, ID: {6ed6c505-f36e-44c4-a982-f395b04e539b}) +---------- +The name of the StateType ({6ed6c505-f36e-44c4-a982-f395b04e539b}) of ThingClass airQualityIndex + Stickstoffdioxidgehalt (NO2) + + + + Nitrogen Dioxide level (NO2) changed + The name of the EventType ({6ed6c505-f36e-44c4-a982-f395b04e539b}) of ThingClass airQualityIndex + Stickstoffdioxidgehalt (NO2) geändert + + + + + Ozone level (O3) + The name of the ParamType (ThingClass: airQualityIndex, EventType: o3, ID: {4e88526d-009f-4820-9a84-09b3646d23c9}) +---------- +The name of the StateType ({4e88526d-009f-4820-9a84-09b3646d23c9}) of ThingClass airQualityIndex + Ozongehalt (O3) + + + + Ozone level (O3) changed + The name of the EventType ({4e88526d-009f-4820-9a84-09b3646d23c9}) of ThingClass airQualityIndex + Ozongehalt (O3) geändert + + + + + Pressure + The name of the ParamType (ThingClass: airQualityIndex, EventType: pressure, ID: {5f799040-08f8-44d1-aa0a-4cab7caad839}) +---------- +The name of the StateType ({5f799040-08f8-44d1-aa0a-4cab7caad839}) of ThingClass airQualityIndex + Luftdruck + + + + Pressure changed + The name of the EventType ({5f799040-08f8-44d1-aa0a-4cab7caad839}) of ThingClass airQualityIndex + Luftdruck + + + + + Station name + The name of the ParamType (ThingClass: airQualityIndex, EventType: stationName, ID: {8385f3d5-62f7-482e-927c-b5d61a70d607}) +---------- +The name of the StateType ({8385f3d5-62f7-482e-927c-b5d61a70d607}) of ThingClass airQualityIndex + Stationsname + + + + Station name changed + The name of the EventType ({8385f3d5-62f7-482e-927c-b5d61a70d607}) of ThingClass airQualityIndex + Stationsname geändert + + + + + Sulfur dioxide level (SO2) + The name of the ParamType (ThingClass: airQualityIndex, EventType: so2, ID: {f3a05e65-a9b3-48fd-be43-688d4c293cc9}) +---------- +The name of the StateType ({f3a05e65-a9b3-48fd-be43-688d4c293cc9}) of ThingClass airQualityIndex + Schwefeldioxidgehalt (SO2) + + + + Sulfur dioxide level (SO2) changed + The name of the EventType ({f3a05e65-a9b3-48fd-be43-688d4c293cc9}) of ThingClass airQualityIndex + Schwefeldioxidgehalt (SO2) geändert + + + + + Temperature + The name of the ParamType (ThingClass: airQualityIndex, EventType: temperature, ID: {94219802-0a82-4761-99b3-c6b6dfc096db}) +---------- +The name of the StateType ({94219802-0a82-4761-99b3-c6b6dfc096db}) of ThingClass airQualityIndex + Temperatur + + + + Temperature changed + The name of the EventType ({94219802-0a82-4761-99b3-c6b6dfc096db}) of ThingClass airQualityIndex + Temperatur geändert + + + + + Wind speed + The name of the ParamType (ThingClass: airQualityIndex, EventType: windSpeed, ID: {c4366608-2511-428b-964e-2ad9e37f8f3c}) +---------- +The name of the StateType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass airQualityIndex + Windgeschwindigkeit + + + + Wind speed changed + The name of the EventType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass airQualityIndex + Windgeschwindigkeit geändert + + + + IntegrationPluginAqi + + + + API key is not available. + API-Key ist nicht verfügbar. + + + + None + Keine + + + + + Active children and adults, and people with respiratory disease, such as asthma, should limit prolonged outdoor exertion. + Aktive Kinder und Erwachsene sowie Menschen mit Atemwegserkrankungen wie Asthma sollten eine längere Belastung im Freien begrenzen. + + + + Active children and adults, and people with respiratory disease, such as asthma, should avoid prolonged outdoor exertion; everyone else, especially children, should limit prolonged outdoor exertion + Aktive Kinder und Erwachsene sowie Menschen mit Atemwegserkrankungen wie Asthma sollten eine längere Anstrengung im Freien vermeiden. Alle anderen, insbesondere Kinder, sollten längere Belastungen im Freien begrenzen + + + + Active children and adults, and people with respiratory disease, such as asthma, should avoid all outdoor exertion; everyone else, especially children, should limit outdoor exertion. + Aktive Kinder und Erwachsene sowie Menschen mit Atemwegserkrankungen wie Asthma sollten jede Anstrengung im Freien vermeiden. Alle anderen, insbesondere Kinder, sollten die Anstrengung im Freien einschränken. + + + + Everyone should avoid all outdoor exertion + Jeder sollte jede Anstrengung im Freien vermeiden. + + + + Air quality index server not available, please check your internet connection. + Air quality index Server nicht verfügbar, bitte überprüfe die Internetverbindung. + + + diff --git a/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-en_US.ts b/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-en_US.ts index a7e01783..dee39a99 100644 --- a/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-en_US.ts +++ b/aqi/translations/57d69b76-4d2d-41ec-bef6-949a79ffbe6b-en_US.ts @@ -4,14 +4,8 @@ AirQualityIndex - - Air Quality Index - The name of the vendor ({6c8e2ded-0a33-4e77-b76c-ea02168741ec}) - - - - - + + Air quality The name of the ParamType (ThingClass: airQualityIndex, EventType: airQuality, ID: {33a3329a-4117-4488-aa18-91c76056ed6e}) ---------- @@ -19,26 +13,26 @@ The name of the StateType ({33a3329a-4117-4488-aa18-91c76056ed6e}) of ThingClass - + Air quality changed The name of the EventType ({33a3329a-4117-4488-aa18-91c76056ed6e}) of ThingClass airQualityIndex - + + + Air quality index - The name of the ThingClass ({23ea32c9-38b0-4155-bacc-3afa8c09f6ee}) + The name of the ThingClass ({23ea32c9-38b0-4155-bacc-3afa8c09f6ee}) +---------- +The name of the vendor ({6c8e2ded-0a33-4e77-b76c-ea02168741ec}) +---------- +The name of the plugin AirQualityIndex ({57d69b76-4d2d-41ec-bef6-949a79ffbe6b}) - - AirQualityIndex - The name of the plugin AirQualityIndex ({57d69b76-4d2d-41ec-bef6-949a79ffbe6b}) - - - - - + + Carbon monoxide level (CO) The name of the ParamType (ThingClass: airQualityIndex, EventType: co, ID: {54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) ---------- @@ -46,14 +40,14 @@ The name of the StateType ({54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) of ThingClass - + Carbon monoxide level (CO) changed The name of the EventType ({54ac72f3-6444-46a8-a43d-210c2a6fbfb5}) of ThingClass airQualityIndex - - + + Cautionary statement The name of the ParamType (ThingClass: airQualityIndex, EventType: cautionaryStatement, ID: {cfece671-4e88-4c49-9456-e3f8f7c79ab3}) ---------- @@ -61,14 +55,14 @@ The name of the StateType ({cfece671-4e88-4c49-9456-e3f8f7c79ab3}) of ThingClass - + Cautionary statement changed The name of the EventType ({cfece671-4e88-4c49-9456-e3f8f7c79ab3}) of ThingClass airQualityIndex - - + + Coarse dust particles pollution level (PM10) The name of the ParamType (ThingClass: airQualityIndex, EventType: pm10, ID: {24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) ---------- @@ -76,14 +70,14 @@ The name of the StateType ({24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) of ThingClass - + Coarse dust particles pollution level (PM10) changed The name of the EventType ({24b41ec4-e26b-4dfb-b52c-8e2b1bbdafc6}) of ThingClass airQualityIndex - - + + Connected The name of the ParamType (ThingClass: airQualityIndex, EventType: connected, ID: {7b9135cd-2461-4d33-b2b3-3dc600983895}) ---------- @@ -91,14 +85,20 @@ The name of the StateType ({7b9135cd-2461-4d33-b2b3-3dc600983895}) of ThingClass - + Connected changed The name of the EventType ({7b9135cd-2461-4d33-b2b3-3dc600983895}) of ThingClass airQualityIndex - - + + Custom API key + The name of the ParamType (ThingClass: airQualityIndex, Type: plugin, ID: {b6861adb-7ed5-445f-b500-4df9eab866ef}) + + + + + Fine particles pollution level (PM2.5) The name of the ParamType (ThingClass: airQualityIndex, EventType: pm25, ID: {bc8c4c83-d229-4be4-8732-bc4f2390f399}) ---------- @@ -106,14 +106,14 @@ The name of the StateType ({bc8c4c83-d229-4be4-8732-bc4f2390f399}) of ThingClass - + Fine particles pollution level (PM2.5) changed The name of the EventType ({bc8c4c83-d229-4be4-8732-bc4f2390f399}) of ThingClass airQualityIndex - - + + Humidity The name of the ParamType (ThingClass: airQualityIndex, EventType: humidity, ID: {4fc45fca-25ab-45a0-b862-817eea1f51e3}) ---------- @@ -121,26 +121,26 @@ The name of the StateType ({4fc45fca-25ab-45a0-b862-817eea1f51e3}) of ThingClass - + Humidity changed The name of the EventType ({4fc45fca-25ab-45a0-b862-817eea1f51e3}) of ThingClass airQualityIndex - + Latitude The name of the ParamType (ThingClass: airQualityIndex, Type: thing, ID: {afd5803b-6c98-44d7-9f4a-45e91cfb062e}) - + Longitude The name of the ParamType (ThingClass: airQualityIndex, Type: thing, ID: {4800d78e-a367-41f7-9bf6-7c81d40ce19a}) - - + + Nitrogen Dioxide level (NO2) The name of the ParamType (ThingClass: airQualityIndex, EventType: no2, ID: {6ed6c505-f36e-44c4-a982-f395b04e539b}) ---------- @@ -148,14 +148,14 @@ The name of the StateType ({6ed6c505-f36e-44c4-a982-f395b04e539b}) of ThingClass - + Nitrogen Dioxide level (NO2) changed The name of the EventType ({6ed6c505-f36e-44c4-a982-f395b04e539b}) of ThingClass airQualityIndex - - + + Ozone level (O3) The name of the ParamType (ThingClass: airQualityIndex, EventType: o3, ID: {4e88526d-009f-4820-9a84-09b3646d23c9}) ---------- @@ -163,14 +163,14 @@ The name of the StateType ({4e88526d-009f-4820-9a84-09b3646d23c9}) of ThingClass - + Ozone level (O3) changed The name of the EventType ({4e88526d-009f-4820-9a84-09b3646d23c9}) of ThingClass airQualityIndex - - + + Pressure The name of the ParamType (ThingClass: airQualityIndex, EventType: pressure, ID: {5f799040-08f8-44d1-aa0a-4cab7caad839}) ---------- @@ -178,14 +178,14 @@ The name of the StateType ({5f799040-08f8-44d1-aa0a-4cab7caad839}) of ThingClass - + Pressure changed The name of the EventType ({5f799040-08f8-44d1-aa0a-4cab7caad839}) of ThingClass airQualityIndex - - + + Station name The name of the ParamType (ThingClass: airQualityIndex, EventType: stationName, ID: {8385f3d5-62f7-482e-927c-b5d61a70d607}) ---------- @@ -193,14 +193,14 @@ The name of the StateType ({8385f3d5-62f7-482e-927c-b5d61a70d607}) of ThingClass - + Station name changed The name of the EventType ({8385f3d5-62f7-482e-927c-b5d61a70d607}) of ThingClass airQualityIndex - - + + Sulfur dioxide level (SO2) The name of the ParamType (ThingClass: airQualityIndex, EventType: so2, ID: {f3a05e65-a9b3-48fd-be43-688d4c293cc9}) ---------- @@ -208,14 +208,14 @@ The name of the StateType ({f3a05e65-a9b3-48fd-be43-688d4c293cc9}) of ThingClass - + Sulfur dioxide level (SO2) changed The name of the EventType ({f3a05e65-a9b3-48fd-be43-688d4c293cc9}) of ThingClass airQualityIndex - - + + Temperature The name of the ParamType (ThingClass: airQualityIndex, EventType: temperature, ID: {94219802-0a82-4761-99b3-c6b6dfc096db}) ---------- @@ -223,14 +223,14 @@ The name of the StateType ({94219802-0a82-4761-99b3-c6b6dfc096db}) of ThingClass - + Temperature changed The name of the EventType ({94219802-0a82-4761-99b3-c6b6dfc096db}) of ThingClass airQualityIndex - - + + Wind speed The name of the ParamType (ThingClass: airQualityIndex, EventType: windSpeed, ID: {c4366608-2511-428b-964e-2ad9e37f8f3c}) ---------- @@ -238,7 +238,7 @@ The name of the StateType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass - + Wind speed changed The name of the EventType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass airQualityIndex @@ -247,41 +247,41 @@ The name of the StateType ({c4366608-2511-428b-964e-2ad9e37f8f3c}) of ThingClass IntegrationPluginAqi - - Please enter your API token for Air Quality Index + + + API key is not available. - - This token is not valid. - Error setting up device with invalid token - - - - + None - - + + Active children and adults, and people with respiratory disease, such as asthma, should limit prolonged outdoor exertion. - + Active children and adults, and people with respiratory disease, such as asthma, should avoid prolonged outdoor exertion; everyone else, especially children, should limit prolonged outdoor exertion - + Active children and adults, and people with respiratory disease, such as asthma, should avoid all outdoor exertion; everyone else, especially children, should limit outdoor exertion. - + Everyone should avoid all outdoor exertion + + + Air quality index server not available, please check your internet connection. + +