From 900f409485ad984e1f68cd8da75a10d4f9577598 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Simon=20St=C3=BCrz?= Date: Fri, 29 Sep 2017 21:52:52 +0200 Subject: [PATCH] add avahi colition handling --- libguh-core/guhconfiguration.cpp | 9 ++ libguh-core/guhconfiguration.h | 4 + libguh-core/ruleengine.cpp | 1 + libguh-core/tcpserver.cpp | 8 +- libguh-core/webserver.cpp | 8 +- libguh-core/websocketserver.cpp | 8 +- libguh/network/avahi/qtavahiclient.cpp | 56 +++++++-- libguh/network/avahi/qtavahiclient.h | 8 ++ libguh/network/avahi/qtavahiservice.cpp | 107 +++++++++++++++--- libguh/network/avahi/qtavahiservice.h | 23 +++- libguh/network/avahi/qtavahiservice_p.cpp | 5 + libguh/network/avahi/qtavahiservice_p.h | 1 + .../network/avahi/qtavahiservicebrowser_p.cpp | 2 +- plugins/mock/translations/de_DE.ts | 61 ++++++++++ plugins/mock/translations/en_US.ts | 61 ++++++++++ 15 files changed, 320 insertions(+), 42 deletions(-) diff --git a/libguh-core/guhconfiguration.cpp b/libguh-core/guhconfiguration.cpp index e586dd6e..04dc7aba 100644 --- a/libguh-core/guhconfiguration.cpp +++ b/libguh-core/guhconfiguration.cpp @@ -395,4 +395,13 @@ WebServerConfiguration GuhConfiguration::readWebServerConfig(const QString &id) return config; } +QDebug operator <<(QDebug debug, const ServerConfiguration &configuration) +{ + debug.noquote().nospace() << "ServerConfiguration(" << configuration.address; + debug.noquote().nospace() << ", " << configuration.id; + debug.noquote().nospace() << ", " << QString("%1:%2").arg(configuration.address.toString()).arg(configuration.port); + debug.noquote().nospace() << ") "; + return debug; +} + } diff --git a/libguh-core/guhconfiguration.h b/libguh-core/guhconfiguration.h index b48c2207..02b7da49 100644 --- a/libguh-core/guhconfiguration.h +++ b/libguh-core/guhconfiguration.h @@ -45,6 +45,10 @@ public: && authenticationEnabled == other.authenticationEnabled; } }; + +QDebug operator <<(QDebug debug, const ServerConfiguration &configuration); + + class WebServerConfiguration: public ServerConfiguration { public: diff --git a/libguh-core/ruleengine.cpp b/libguh-core/ruleengine.cpp index d4c55aff..96bb48da 100644 --- a/libguh-core/ruleengine.cpp +++ b/libguh-core/ruleengine.cpp @@ -383,6 +383,7 @@ QList RuleEngine::evaluateEvent(const Event &event) */ QList RuleEngine::evaluateTime(const QDateTime &dateTime) { + // Initialize the last datetime if not already set (current time -1 second) if (!m_lastEvaluationTime.isValid()) { m_lastEvaluationTime = dateTime; m_lastEvaluationTime = m_lastEvaluationTime.addSecs(-1); diff --git a/libguh-core/tcpserver.cpp b/libguh-core/tcpserver.cpp index 5f1661ea..311bb382 100644 --- a/libguh-core/tcpserver.cpp +++ b/libguh-core/tcpserver.cpp @@ -115,9 +115,7 @@ void TcpServer::onDataAvailable(QSslSocket * socket, const QByteArray &data) void TcpServer::onAvahiServiceStateChanged(const QtAvahiService::QtAvahiServiceState &state) { - if (state == QtAvahiService::QtAvahiServiceStateEstablished) { - qCDebug(dcAvahi()) << "Service" << m_avahiService->name() << m_avahiService->serviceType() << "established successfully"; - } + Q_UNUSED(state) } @@ -158,7 +156,9 @@ bool TcpServer::startServer() txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString()); txt.insert("name", GuhCore::instance()->configuration()->serverName()); txt.insert("sslEnabled", configuration().sslEnabled ? "true" : "false"); - m_avahiService->registerService("guhIO", configuration().port, "_jsonrpc._tcp", txt); + if (!m_avahiService->registerService(QString("guhIO-tcp-%1").arg(configuration().id), configuration().port, "_jsonrpc._tcp", txt)) { + qCWarning(dcTcpServer()) << "Could not register avahi service for" << configuration(); + } qCDebug(dcConnection) << "Started Tcp server on" << m_server->serverAddress().toString() << m_server->serverPort(); connect(m_server, SIGNAL(clientConnected(QSslSocket *)), SLOT(onClientConnected(QSslSocket *))); diff --git a/libguh-core/webserver.cpp b/libguh-core/webserver.cpp index a2d3f66d..8224f673 100644 --- a/libguh-core/webserver.cpp +++ b/libguh-core/webserver.cpp @@ -479,9 +479,7 @@ void WebServer::onError(QAbstractSocket::SocketError error) void WebServer::onAvahiServiceStateChanged(const QtAvahiService::QtAvahiServiceState &state) { - if (state == QtAvahiService::QtAvahiServiceStateEstablished) { - qCDebug(dcAvahi()) << "Service" << m_avahiService->name() << m_avahiService->serviceType() << "established successfully"; - } + Q_UNUSED(state) } /*! Returns true if this \l{WebServer} could be reconfigured with the given \a address and \a port. */ @@ -523,7 +521,9 @@ bool WebServer::startServer() txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString()); txt.insert("name", GuhCore::instance()->configuration()->serverName()); txt.insert("sslEnabled", m_configuration.sslEnabled ? "true" : "false"); - m_avahiService->registerService("guhIO", m_configuration.port, "_http._tcp", txt); + if (!m_avahiService->registerService(QString("guhIO-http-%1").arg(m_configuration.id), m_configuration.port, "_http._tcp", txt)) { + qCWarning(dcTcpServer()) << "Could not register avahi service for" << m_configuration; + } m_enabled = true; return true; diff --git a/libguh-core/websocketserver.cpp b/libguh-core/websocketserver.cpp index 5a2f7de9..4a34f61d 100644 --- a/libguh-core/websocketserver.cpp +++ b/libguh-core/websocketserver.cpp @@ -169,9 +169,7 @@ void WebSocketServer::onPing(quint64 elapsedTime, const QByteArray &payload) void WebSocketServer::onAvahiServiceStateChanged(const QtAvahiService::QtAvahiServiceState &state) { - if (state == QtAvahiService::QtAvahiServiceStateEstablished) { - qCDebug(dcAvahi()) << "Service" << m_avahiService->name() << m_avahiService->serviceType() << "established successfully"; - } + Q_UNUSED(state) } /*! Returns true if this \l{WebSocketServer} could be reconfigured with the given \a address and \a port. */ @@ -226,7 +224,9 @@ bool WebSocketServer::startServer() txt.insert("uuid", GuhCore::instance()->configuration()->serverUuid().toString()); txt.insert("name", GuhCore::instance()->configuration()->serverName()); txt.insert("sslEnabled", configuration().sslEnabled ? "true" : "false"); - m_avahiService->registerService("guhIO", configuration().port, "_ws._tcp", txt); + if (m_avahiService->registerService(QString("guhIO-ws-%1").arg(configuration().id), configuration().port, "_ws._tcp", txt)) { + qCWarning(dcTcpServer()) << "Could not register avahi service for" << configuration(); + } return true; } diff --git a/libguh/network/avahi/qtavahiclient.cpp b/libguh/network/avahi/qtavahiclient.cpp index 15a3fbec..1ad5eaaa 100644 --- a/libguh/network/avahi/qtavahiclient.cpp +++ b/libguh/network/avahi/qtavahiclient.cpp @@ -20,8 +20,9 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ -#include "qtavahiclient.h" #include "qt-watch.h" +#include "qtavahiclient.h" +#include "loggingcategories.h" #include @@ -29,15 +30,22 @@ QtAvahiClient::QtAvahiClient(QObject *parent) : QObject(parent), poll(avahi_qt_poll_get()), client(0), - error(0) + error(0), + m_state(QtAvahiClientStateNone) { - + connect(this, &QtAvahiClient::clientStateChangedInternal, this, &QtAvahiClient::onClientStateChanged); } QtAvahiClient::~QtAvahiClient() { if (client) avahi_client_free(client); + +} + +QtAvahiClient::QtAvahiClientState QtAvahiClient::state() const +{ + return m_state; } void QtAvahiClient::start() @@ -63,20 +71,52 @@ void QtAvahiClient::callback(AvahiClient *client, AvahiClientState state, void * switch (state) { case AVAHI_CLIENT_S_RUNNING: - emit serviceClient->clientStateChanged(QtAvahiClientStateRunning); + emit serviceClient->clientStateChangedInternal(QtAvahiClientStateRunning); break; case AVAHI_CLIENT_FAILURE: - emit serviceClient->clientStateChanged(QtAvahiClientStateFailure); + emit serviceClient->clientStateChangedInternal(QtAvahiClientStateFailure); break; case AVAHI_CLIENT_S_COLLISION: - emit serviceClient->clientStateChanged(QtAvahiClientStateCollision); + emit serviceClient->clientStateChangedInternal(QtAvahiClientStateCollision); break; case AVAHI_CLIENT_S_REGISTERING: - emit serviceClient->clientStateChanged(QtAvahiClientStateRegistering); + emit serviceClient->clientStateChangedInternal(QtAvahiClientStateRegistering); break; case AVAHI_CLIENT_CONNECTING: - emit serviceClient->clientStateChanged(QtAvahiClientStateConnecting); + emit serviceClient->clientStateChangedInternal(QtAvahiClientStateConnecting); break; } } +void QtAvahiClient::onClientStateChanged(const QtAvahiClient::QtAvahiClientState &state) +{ + if (m_state == state) + return; + + m_state = state; + +// switch (m_state) { +// case QtAvahiClientStateNone: +// break; +// case QtAvahiClientStateRunning: +// qCDebug(dcAvahi()) << "Client running."; +// break; +// case QtAvahiClientStateFailure: +// qCWarning(dcAvahi()) << "Client failure:" << errorString(); +// break; +// case QtAvahiClientStateCollision: +// qCWarning(dcAvahi()) << "Client collision:" << errorString(); +// break; +// case QtAvahiClientStateRegistering: +// qCDebug(dcAvahi()) << "Client registering..."; +// break; +// case QtAvahiClientStateConnecting: +// qCDebug(dcAvahi()) << "Client connecting..."; +// break; +// default: +// break; +// } + + emit clientStateChanged(m_state); +} + diff --git a/libguh/network/avahi/qtavahiclient.h b/libguh/network/avahi/qtavahiclient.h index a0760653..128c2c3f 100644 --- a/libguh/network/avahi/qtavahiclient.h +++ b/libguh/network/avahi/qtavahiclient.h @@ -35,6 +35,7 @@ class LIBGUH_EXPORT QtAvahiClient : public QObject public: enum QtAvahiClientState { + QtAvahiClientStateNone, QtAvahiClientStateRunning, QtAvahiClientStateFailure, QtAvahiClientStateCollision, @@ -45,6 +46,8 @@ public: explicit QtAvahiClient(QObject *parent = 0); ~QtAvahiClient(); + QtAvahiClientState state() const; + private: friend class QtAvahiService; friend class QtAvahiServiceBrowser; @@ -53,14 +56,19 @@ private: const AvahiPoll *poll; AvahiClient *client; int error; + QtAvahiClientState m_state; void start(); QString errorString() const; static void callback(AvahiClient *client, AvahiClientState state, void *userdata); +private slots: + void onClientStateChanged(const QtAvahiClientState &state); + signals: void clientStateChanged(const QtAvahiClientState &state); + void clientStateChangedInternal(const QtAvahiClientState &state); }; diff --git a/libguh/network/avahi/qtavahiservice.cpp b/libguh/network/avahi/qtavahiservice.cpp index 3a76f7b0..280956f2 100644 --- a/libguh/network/avahi/qtavahiservice.cpp +++ b/libguh/network/avahi/qtavahiservice.cpp @@ -44,19 +44,23 @@ */ - /*! \fn void QtAvahiService::serviceStateChanged(const QtAvahiServiceState &state); This signal will be emitted when the \a state of this \l{QtAvahiService} has changed. */ #include "qtavahiservice.h" #include "qtavahiservice_p.h" +#include "loggingcategories.h" + /*! Constructs a new \l{QtAvahiService} with the given \a parent. */ QtAvahiService::QtAvahiService(QObject *parent) : QObject(parent), - d_ptr(new QtAvahiServicePrivate) + d_ptr(new QtAvahiServicePrivate), + m_state(QtAvahiServiceStateUncomitted) { + connect(this, &QtAvahiService::serviceStateChanged, this, &QtAvahiService::onStateChanged); + d_ptr->client = new QtAvahiClient(this); d_ptr->client->start(); } @@ -88,24 +92,35 @@ QString QtAvahiService::serviceType() const return d_ptr->type; } -/*! Register a new \l{QtAvahiService} with the given \a name and \a port. The service type can be specified with the \a serviceType string. The \a txt records inform about additional information. Returns true if the service could be registered. */ -bool QtAvahiService::registerService(const QString &name, const quint16 &port, const QString &serviceType, const QHash &txt) +QHash QtAvahiService::txtRecords() const { - // check if the client is running + return d_ptr->txtRecords; +} + +QtAvahiService::QtAvahiServiceState QtAvahiService::state() const +{ + return m_state; +} + +/*! Register a new \l{QtAvahiService} with the given \a name and \a port. The service type can be specified with the \a serviceType string. The \a txtRecords records inform about additional information. Returns true if the service could be registered. */ +bool QtAvahiService::registerService(const QString &name, const quint16 &port, const QString &serviceType, const QHash &txtRecords) +{ + // Check if the client is running if (!d_ptr->client->client || AVAHI_CLIENT_S_RUNNING != avahi_client_get_state(d_ptr->client->client)) return false; d_ptr->name = name; d_ptr->port = port; d_ptr->type = serviceType; + d_ptr->txtRecords = txtRecords; - // if the group is not set yet, create it + // If the group is not set yet, create it if (!d_ptr->group) d_ptr->group = avahi_entry_group_new(d_ptr->client->client, QtAvahiServicePrivate::callback, this); - // if the group is empty + // If the group is empty if (avahi_entry_group_is_empty(d_ptr->group)) { - // add the service + // Add the service d_ptr->error = avahi_entry_group_add_service_strlst(d_ptr->group, AVAHI_IF_UNSPEC, AVAHI_PROTO_UNSPEC, @@ -115,16 +130,33 @@ bool QtAvahiService::registerService(const QString &name, const quint16 &port, c 0, 0, (uint16_t)d_ptr->port, - QtAvahiServicePrivate::createTxtList(txt)); + QtAvahiServicePrivate::createTxtList(txtRecords)); - // verify if the group has to be comitted - if (!d_ptr->error) - d_ptr->error = avahi_entry_group_commit(d_ptr->group); + // Verify if the group has to be comitted + if (d_ptr->error) { - // if the group could not be commited, return false - if (d_ptr->error) + if (d_ptr->error == AVAHI_ERR_COLLISION) { + if (!handlCollision()) { + qCWarning(dcAvahi()) << this << "error:" << avahi_strerror(d_ptr->error); + return false; + } + + + } else { + qCWarning(dcAvahi()) << this << "error:" << avahi_strerror(d_ptr->error); + return false; + } + } + + // Commit the service + d_ptr->error = avahi_entry_group_commit(d_ptr->group); + if (d_ptr->error) { + qCWarning(dcAvahi()) << this << "error:" << avahi_strerror(d_ptr->error); return false; - + } + } else { + qCWarning(dcAvahi()) << "Service already registered. Please reset the service before reusing it."; + return false; } return true; @@ -154,3 +186,48 @@ QString QtAvahiService::errorString() const return avahi_strerror(avahi_client_errno(d_ptr->client->client)); } +bool QtAvahiService::handlCollision() +{ + QString alternativeServiceName = avahi_alternative_service_name(name().toStdString().data()); + qCDebug(dcAvahi()) << "Service name colision. Picking alternative service name" << alternativeServiceName; + + resetService(); + return registerService(alternativeServiceName, port(), serviceType(), txtRecords()); +} + +void QtAvahiService::onStateChanged(const QtAvahiServiceState &state) +{ + if (m_state == state) + return; + + m_state = state; + + switch (m_state) { + case QtAvahiServiceStateUncomitted: + qCDebug(dcAvahi()) << this << "state changed: uncomitted"; + break; + case QtAvahiServiceStateRegistering: + qCDebug(dcAvahi()) << this << "state changed: registering..."; + break; + case QtAvahiServiceStateEstablished: + qCDebug(dcAvahi()) << this << "state changed: established"; + break; + case QtAvahiServiceStateCollision: + qCDebug(dcAvahi()) << this << "state changed: collision"; + handlCollision(); + break; + case QtAvahiServiceStateFailure: + qCWarning(dcAvahi()) << this << "failure: " << errorString(); + break; + default: + break; + } + +} + +QDebug operator <<(QDebug dbg, QtAvahiService *service) +{ + dbg.nospace() << "AvahiService("; + dbg << service->name() << ", " << service->serviceType() << ", " << service->port() << ") "; + return dbg; +} diff --git a/libguh/network/avahi/qtavahiservice.h b/libguh/network/avahi/qtavahiservice.h index 7cffe78d..8b6b33fc 100644 --- a/libguh/network/avahi/qtavahiservice.h +++ b/libguh/network/avahi/qtavahiservice.h @@ -38,12 +38,13 @@ class LIBGUH_EXPORT QtAvahiService : public QObject public: enum QtAvahiServiceState { - QtAvahiServiceStateUncomitted, - QtAvahiServiceStateRegistering, - QtAvahiServiceStateEstablished, - QtAvahiServiceStateCollision, - QtAvahiServiceStateFailure + QtAvahiServiceStateUncomitted = 0, + QtAvahiServiceStateRegistering = 1, + QtAvahiServiceStateEstablished = 2, + QtAvahiServiceStateCollision = 3, + QtAvahiServiceStateFailure = 4 }; + Q_ENUM(QtAvahiServiceState) explicit QtAvahiService(QObject *parent = 0); ~QtAvahiService(); @@ -51,8 +52,10 @@ public: quint16 port() const; QString name() const; QString serviceType() const; + QHash txtRecords() const; + QtAvahiServiceState state() const; - bool registerService(const QString &name, const quint16 &port, const QString &serviceType = "_http._tcp", const QHash &txt = QHash()); + bool registerService(const QString &name, const quint16 &port, const QString &serviceType = "_http._tcp", const QHash &txtRecords = QHash()); void resetService(); bool isValid() const; @@ -64,9 +67,17 @@ signals: protected: QtAvahiServicePrivate *d_ptr; +private slots: + bool handlCollision(); + void onStateChanged(const QtAvahiServiceState &state); + private: + QtAvahiServiceState m_state; Q_DECLARE_PRIVATE(QtAvahiService) }; +QDebug operator <<(QDebug dbg, QtAvahiService *service); + + #endif // QTAVAHISERVICE_H diff --git a/libguh/network/avahi/qtavahiservice_p.cpp b/libguh/network/avahi/qtavahiservice_p.cpp index 8c0342c5..6fb7aceb 100644 --- a/libguh/network/avahi/qtavahiservice_p.cpp +++ b/libguh/network/avahi/qtavahiservice_p.cpp @@ -21,6 +21,7 @@ * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */ #include "qtavahiservice_p.h" +#include "loggingcategories.h" #include #include @@ -37,10 +38,14 @@ QtAvahiServicePrivate::QtAvahiServicePrivate() : void QtAvahiServicePrivate::callback(AvahiEntryGroup *group, AvahiEntryGroupState state, void *userdata) { Q_UNUSED(group); + QtAvahiService *service = static_cast(userdata); if (!service) return; + if (service->state() == (QtAvahiService::QtAvahiServiceState)state) + return; + switch (state) { case AVAHI_ENTRY_GROUP_UNCOMMITED: emit service->serviceStateChanged(QtAvahiService::QtAvahiServiceStateUncomitted); diff --git a/libguh/network/avahi/qtavahiservice_p.h b/libguh/network/avahi/qtavahiservice_p.h index 1e16b7d4..12666f80 100644 --- a/libguh/network/avahi/qtavahiservice_p.h +++ b/libguh/network/avahi/qtavahiservice_p.h @@ -47,6 +47,7 @@ public: QString name; quint16 port; QString type; + QHash txtRecords; int error; static AvahiStringList *createTxtList(const QHash &txt); diff --git a/libguh/network/avahi/qtavahiservicebrowser_p.cpp b/libguh/network/avahi/qtavahiservicebrowser_p.cpp index e23f3bce..17c53c6e 100644 --- a/libguh/network/avahi/qtavahiservicebrowser_p.cpp +++ b/libguh/network/avahi/qtavahiservicebrowser_p.cpp @@ -58,7 +58,7 @@ void QtAvahiServiceBrowserPrivate::callbackServiceTypeBrowser(AvahiServiceTypeBr case AVAHI_BROWSER_NEW: if (!serviceBrowser->m_serviceTypes.contains(type)) { serviceBrowser->m_serviceTypes.append(type); - qCDebug(dcAvahi()) << "Create service type browser for" << type; + qCDebug(dcAvahi()) << "[+] Service browser" << type; serviceBrowser->createServiceBrowser(type); } break; diff --git a/plugins/mock/translations/de_DE.ts b/plugins/mock/translations/de_DE.ts index ed8f7955..f8835d7a 100644 --- a/plugins/mock/translations/de_DE.ts +++ b/plugins/mock/translations/de_DE.ts @@ -12,228 +12,267 @@ MockDevice + guh The name of the vendor (2062d64d-3232-433c-88bc-0d33c0ba2ba6) guh + Mock Device The name of the DeviceClass (753f0d32-0468-4d08-82ed-1964aab03298) Mock Gerät + http port The name of the paramType (d4f06047-125e-4479-9810-b54c189917f5) of Mock Device HTTP Port + Mock Action 3 (async) The name of the ActionType fbae06d3-7666-483e-a39e-ec50fe89054e of deviceClass Mock Device Mock Aktion 3 (async) + Mock Action 4 (broken) The name of the ActionType df3cf33d-26d5-4577-9132-9823bd33fad0 of deviceClass Mock Device Mock Aktion 4 (kaputt) + Mock Action 5 (async, broken) The name of the ActionType bfe89a1d-3497-4121-8318-e77c37537219 of deviceClass Mock Device Mock Aktion 5 (async, kaputt) + Mock Device (Auto created) The name of the DeviceClass (ab4257b3-7548-47ee-9bd4-7dc3004fd197) Mock Gerät (Auto erstellt) + Mock Device (Push Button) The name of the DeviceClass (9e03144c-e436-4eea-82d9-ccb33ef778db) Mock Gerät (Drückknopf) + Wait 3 second before you continue, the push button will be pressed automatically. The pairing info of deviceClass Mock Device (Push Button) Warte 3 Sekunden bevor du fortfährst, the Knopf wird automatisch gerückt. + configParamInt The name of the paramType (e1f72121-a426-45e2-b475-8262b5cdf103) of Mock Devices configParamInt + configParamBool The name of the paramType (c75723b6-ea4f-4982-9751-6c5e39c88145) of Mock Devices configParamBool + async The name of the paramType (f2977061-4dd0-4ef5-85aa-3b7134743be3) of Mock Device async + broken The name of the paramType (ae8f8901-f2c1-42a5-8111-6d2fc8e4c1e4) of Mock Device kaputt + resultCount The name of the paramType (d222adb4-2f9c-4c3f-8655-76400d0fb6ce) of Mock Device Resultat Anzahl + Dummy int state changed The name of the autocreated EventType (80baec19-54de-4948-ac46-31eabfaceb83) Int Zustand verändert + Dummy int state The name of the ParamType of StateType (80baec19-54de-4948-ac46-31eabfaceb83) of DeviceClass Mock Device Dummy Int Zustand + Dummy bool state changed The name of the autocreated EventType (9dd6a97c-dfd1-43dc-acbd-367932742310) Bool Zustand verändert + Dummy bool state The name of the ParamType of StateType (9dd6a97c-dfd1-43dc-acbd-367932742310) of DeviceClass Mock Device Dummy Bool Zustand + Mock Action 1 (with params) The name of the ActionType dea0f4e1-65e3-4981-8eaa-2701c53a9185 of deviceClass Mock Device Mock Aktion 1 (Mit Parametern) + mockActionParam1 The name of the paramType (a2d3a256-a551-4712-a65b-ecd5a436a1cb) of Mock Device mockActionParam1 + mockActionParam2 The name of the paramType (304a4899-18be-4e3b-94f4-d03be52f3233) of Mock Device mockActionParam2 + Mock Action 2 (without params) The name of the ActionType defd3ed6-1a0d-400b-8879-a0202cf39935 of deviceClass Mock Device Mock Aktion (ohne Parameter + mockParamInt The name of the paramType (0550e16d-60b9-4ba5-83f4-4d3cee656121) of Mock Device mockParamInt + Mock Event 1 The name of the EventType 45bf3752-0fc6-46b9-89fd-ffd878b5b22b of deviceClass Mock Device (Auto created) Mock Event 1 + Mock Event 2 The name of the EventType 863d5920-b1cf-4eb9-88bd-8f7b8583b1cf of deviceClass Mock Device (Auto created) Mock Event 2 + color changed The name of the autocreated EventType (20dc7c22-c50e-42db-837c-2bbced939f8e) Farbe geändert + color The name of the ParamType of StateType (20dc7c22-c50e-42db-837c-2bbced939f8e) of DeviceClass Mock Device (Push Button) Farbe + Set color The name of the autocreated ActionType (20dc7c22-c50e-42db-837c-2bbced939f8e) Setze Farbe + percentage changed The name of the autocreated EventType (72981c04-267a-4ba0-a59e-9921d2f3af9c) Prozent gändert + percentage The name of the ParamType of StateType (72981c04-267a-4ba0-a59e-9921d2f3af9c) of DeviceClass Mock Device (Push Button) Prozent + Set percentage The name of the autocreated ActionType (72981c04-267a-4ba0-a59e-9921d2f3af9c) Setze Prozentwert + allowed values changed The name of the autocreated EventType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) Erlaubter Wert geändert + allowed values The name of the ParamType of StateType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) of DeviceClass Mock Device (Push Button) Erlaubte Werte + Set allowed values The name of the autocreated ActionType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) Setze erlaubten Wert + double value changed The name of the autocreated EventType (53cd7c55-49b7-441b-b970-9048f20f0e2c) Double Wert geändert + double value The name of the ParamType of StateType (53cd7c55-49b7-441b-b970-9048f20f0e2c) of DeviceClass Mock Device (Push Button) Double Wert + Set double value The name of the autocreated ActionType (53cd7c55-49b7-441b-b970-9048f20f0e2c) Setze double Wert + + Set bool value @@ -243,18 +282,22 @@ The name of the autocreated ActionType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)Setze boll Wert + Timeout action The name of the ActionType 54646e7c-bc54-4895-81a2-590d72d120f9 of deviceClass Mock Device (Push Button) Timeout Aktion + Mock Device (Display Pin) The name of the DeviceClass (296f1fd4-e893-46b2-8a42-50d1bceb8730) Mock Gerät (Pin anzeigen) + + bool value changed @@ -264,6 +307,8 @@ The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0)Bool Wert geändert + + bool value @@ -273,96 +318,112 @@ The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of Bool Wert + Text line The name of the paramType (e6acf0c7-4b8e-4296-ac62-855d20deb816) of Mock Device (InputTypes) Textzeile + Text area The name of the paramType (716f0994-bc01-42b0-b64d-59236f7320d2) of Mock Device (InputTypes) Textfeld + Password text The name of the paramType (e5c0d14b-c9f1-4aca-a56e-85bfa6977150) of Mock Device (InputTypes) Passwort Text + Search text The name of the paramType (22add8c9-ee4f-43ad-8931-58e999313ac3) of Mock Device (InputTypes) Suchtext + Mail address The name of the paramType (a8494faf-3a0f-4cf3-84b7-4b39148a838d) of Mock Device (InputTypes) Mail Adresse + IPv4 address The name of the paramType (9e5f86a0-4bb3-4892-bff8-3fc4032af6e2) of Mock Device (InputTypes) IPv4 Adresse + IPv6 address The name of the paramType (43bf3832-dd48-4090-a836-656e8b60216e) of Mock Device (InputTypes) IPv6 Adresse + URL The name of the paramType (fa67229f-fcef-496f-b671-59a4b48f3ab5) of Mock Device (InputTypes) URL + Mac address The name of the paramType (e93db587-7919-48f3-8c88-1651de63c765) of Mock Device (InputTypes) Mac Adresse + Please enter the secret which normaly will be displayed on the device. For the mockdevice the pin is 243681. The pairing info of deviceClass Mock Device (Display Pin) Bitte geben sie den Pincode ein der normalerweise auf dem Gerät angezeit werden würde. In diesem fall lautet der Pincode 243681. + Mock Devices The name of the plugin Mock Devices (727a4a9a-c187-446f-aadf-f1b2220607d1) Mock Gerät + pin The name of the paramType (da820e07-22dc-4173-9c07-2f49a4e265f9) of Mock Device (Display Pin) Pin + Mock Device (Parent) The name of the DeviceClass (a71fbde9-9a38-4bf8-beab-c8aade2608ba) Mock Gerät (Elternteil) + Mock Device (Child) The name of the DeviceClass (40893c9f-bc47-40c1-8bf7-b390c7c1b4fc) Mock Gerät (Kind) + parent uuid The name of the paramType (104b5288-404e-42d3-bf38-e40682e75681) of Mock Device (Child) Elternteil Uuid + Mock Device (InputTypes) The name of the DeviceClass (515ffdf1-55e5-498d-9abc-4e2fe768f3a9) diff --git a/plugins/mock/translations/en_US.ts b/plugins/mock/translations/en_US.ts index 72bacc14..957274f0 100644 --- a/plugins/mock/translations/en_US.ts +++ b/plugins/mock/translations/en_US.ts @@ -12,228 +12,267 @@ MockDevice + guh The name of the vendor (2062d64d-3232-433c-88bc-0d33c0ba2ba6) + Mock Device The name of the DeviceClass (753f0d32-0468-4d08-82ed-1964aab03298) + http port The name of the paramType (d4f06047-125e-4479-9810-b54c189917f5) of Mock Device + Mock Action 3 (async) The name of the ActionType fbae06d3-7666-483e-a39e-ec50fe89054e of deviceClass Mock Device + Mock Action 4 (broken) The name of the ActionType df3cf33d-26d5-4577-9132-9823bd33fad0 of deviceClass Mock Device + Mock Action 5 (async, broken) The name of the ActionType bfe89a1d-3497-4121-8318-e77c37537219 of deviceClass Mock Device + Mock Device (Auto created) The name of the DeviceClass (ab4257b3-7548-47ee-9bd4-7dc3004fd197) + Mock Device (Push Button) The name of the DeviceClass (9e03144c-e436-4eea-82d9-ccb33ef778db) + Wait 3 second before you continue, the push button will be pressed automatically. The pairing info of deviceClass Mock Device (Push Button) + configParamInt The name of the paramType (e1f72121-a426-45e2-b475-8262b5cdf103) of Mock Devices + configParamBool The name of the paramType (c75723b6-ea4f-4982-9751-6c5e39c88145) of Mock Devices + async The name of the paramType (f2977061-4dd0-4ef5-85aa-3b7134743be3) of Mock Device + broken The name of the paramType (ae8f8901-f2c1-42a5-8111-6d2fc8e4c1e4) of Mock Device + resultCount The name of the paramType (d222adb4-2f9c-4c3f-8655-76400d0fb6ce) of Mock Device + Dummy int state changed The name of the autocreated EventType (80baec19-54de-4948-ac46-31eabfaceb83) + Dummy int state The name of the ParamType of StateType (80baec19-54de-4948-ac46-31eabfaceb83) of DeviceClass Mock Device + Dummy bool state changed The name of the autocreated EventType (9dd6a97c-dfd1-43dc-acbd-367932742310) + Dummy bool state The name of the ParamType of StateType (9dd6a97c-dfd1-43dc-acbd-367932742310) of DeviceClass Mock Device + Mock Action 1 (with params) The name of the ActionType dea0f4e1-65e3-4981-8eaa-2701c53a9185 of deviceClass Mock Device + mockActionParam1 The name of the paramType (a2d3a256-a551-4712-a65b-ecd5a436a1cb) of Mock Device + mockActionParam2 The name of the paramType (304a4899-18be-4e3b-94f4-d03be52f3233) of Mock Device + Mock Action 2 (without params) The name of the ActionType defd3ed6-1a0d-400b-8879-a0202cf39935 of deviceClass Mock Device + mockParamInt The name of the paramType (0550e16d-60b9-4ba5-83f4-4d3cee656121) of Mock Device + Mock Event 1 The name of the EventType 45bf3752-0fc6-46b9-89fd-ffd878b5b22b of deviceClass Mock Device (Auto created) + Mock Event 2 The name of the EventType 863d5920-b1cf-4eb9-88bd-8f7b8583b1cf of deviceClass Mock Device (Auto created) + color changed The name of the autocreated EventType (20dc7c22-c50e-42db-837c-2bbced939f8e) + color The name of the ParamType of StateType (20dc7c22-c50e-42db-837c-2bbced939f8e) of DeviceClass Mock Device (Push Button) + Set color The name of the autocreated ActionType (20dc7c22-c50e-42db-837c-2bbced939f8e) + percentage changed The name of the autocreated EventType (72981c04-267a-4ba0-a59e-9921d2f3af9c) + percentage The name of the ParamType of StateType (72981c04-267a-4ba0-a59e-9921d2f3af9c) of DeviceClass Mock Device (Push Button) + Set percentage The name of the autocreated ActionType (72981c04-267a-4ba0-a59e-9921d2f3af9c) + allowed values changed The name of the autocreated EventType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) + allowed values The name of the ParamType of StateType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) of DeviceClass Mock Device (Push Button) + Set allowed values The name of the autocreated ActionType (05f63f9c-f61e-4dcf-ad55-3f13fde2765b) + double value changed The name of the autocreated EventType (53cd7c55-49b7-441b-b970-9048f20f0e2c) + double value The name of the ParamType of StateType (53cd7c55-49b7-441b-b970-9048f20f0e2c) of DeviceClass Mock Device (Push Button) + Set double value The name of the autocreated ActionType (53cd7c55-49b7-441b-b970-9048f20f0e2c) + + Set bool value @@ -243,18 +282,22 @@ The name of the autocreated ActionType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) + Timeout action The name of the ActionType 54646e7c-bc54-4895-81a2-590d72d120f9 of deviceClass Mock Device (Push Button) + Mock Device (Display Pin) The name of the DeviceClass (296f1fd4-e893-46b2-8a42-50d1bceb8730) + + bool value changed @@ -264,6 +307,8 @@ The name of the autocreated EventType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) + + bool value @@ -273,96 +318,112 @@ The name of the ParamType of StateType (d24ede5f-4064-4898-bb84-cfb533b1fbc0) of + Text line The name of the paramType (e6acf0c7-4b8e-4296-ac62-855d20deb816) of Mock Device (InputTypes) + Text area The name of the paramType (716f0994-bc01-42b0-b64d-59236f7320d2) of Mock Device (InputTypes) + Password text The name of the paramType (e5c0d14b-c9f1-4aca-a56e-85bfa6977150) of Mock Device (InputTypes) + Search text The name of the paramType (22add8c9-ee4f-43ad-8931-58e999313ac3) of Mock Device (InputTypes) + Mail address The name of the paramType (a8494faf-3a0f-4cf3-84b7-4b39148a838d) of Mock Device (InputTypes) + IPv4 address The name of the paramType (9e5f86a0-4bb3-4892-bff8-3fc4032af6e2) of Mock Device (InputTypes) + IPv6 address The name of the paramType (43bf3832-dd48-4090-a836-656e8b60216e) of Mock Device (InputTypes) + URL The name of the paramType (fa67229f-fcef-496f-b671-59a4b48f3ab5) of Mock Device (InputTypes) + Mac address The name of the paramType (e93db587-7919-48f3-8c88-1651de63c765) of Mock Device (InputTypes) + Please enter the secret which normaly will be displayed on the device. For the mockdevice the pin is 243681. The pairing info of deviceClass Mock Device (Display Pin) + Mock Devices The name of the plugin Mock Devices (727a4a9a-c187-446f-aadf-f1b2220607d1) + pin The name of the paramType (da820e07-22dc-4173-9c07-2f49a4e265f9) of Mock Device (Display Pin) + Mock Device (Parent) The name of the DeviceClass (a71fbde9-9a38-4bf8-beab-c8aade2608ba) + Mock Device (Child) The name of the DeviceClass (40893c9f-bc47-40c1-8bf7-b390c7c1b4fc) + parent uuid The name of the paramType (104b5288-404e-42d3-bf38-e40682e75681) of Mock Device (Child) + Mock Device (InputTypes) The name of the DeviceClass (515ffdf1-55e5-498d-9abc-4e2fe768f3a9)