Use dynamic app name for remote proxy connection
parent
d96571a5a9
commit
5e84cb09f8
|
|
@ -948,7 +948,7 @@ bool AWSClient::postToMQTT(const QString &coreId, const QString &nonce, QObject*
|
|||
connect(reply, &QNetworkReply::finished, this, [reply, senderWatcher, callback]() {
|
||||
reply->deleteLater();
|
||||
QByteArray data = reply->readAll();
|
||||
// qDebug() << "MQTT post reply" << data;
|
||||
qCDebug(dcCloud()) << "MQTT post reply" << data;
|
||||
if (senderWatcher.isNull()) {
|
||||
qCDebug(dcCloud()) << "Request object disappeared. Discarding MQTT reply...";
|
||||
return;
|
||||
|
|
|
|||
|
|
@ -36,6 +36,7 @@
|
|||
#include <QUrlQuery>
|
||||
#include <QHostInfo>
|
||||
#include <QPointer>
|
||||
#include <QCoreApplication>
|
||||
|
||||
using namespace remoteproxyclient;
|
||||
|
||||
|
|
@ -43,7 +44,7 @@ CloudTransport::CloudTransport(AWSClient *awsClient, QObject *parent):
|
|||
NymeaTransportInterface(parent),
|
||||
m_awsClient(awsClient)
|
||||
{
|
||||
m_remoteproxyConnection = new RemoteProxyConnection(QUuid::createUuid(), "nymea:app", this);
|
||||
m_remoteproxyConnection = new RemoteProxyConnection(QUuid::createUuid(), qApp->applicationName(), this);
|
||||
|
||||
QObject::connect(m_remoteproxyConnection, &RemoteProxyConnection::remoteConnectionEstablished, this,[this]() {
|
||||
qDebug() << "CloudTransport: Remote connection established.";
|
||||
|
|
|
|||
|
|
@ -289,6 +289,7 @@ void NymeaConnection::onConnected()
|
|||
void NymeaConnection::onDisconnected()
|
||||
{
|
||||
NymeaTransportInterface* t = qobject_cast<NymeaTransportInterface*>(sender());
|
||||
qCInfo(dcNymeaConnection()) << "Disconnected from" << t->url().toString();
|
||||
if (m_currentTransport != t) {
|
||||
qCDebug(dcNymeaConnection()) << "An inactive transport for url" << t->url() << "disconnected... Cleaning up...";
|
||||
if (m_transportCandidates.contains(t)) {
|
||||
|
|
|
|||
|
|
@ -394,7 +394,7 @@ void ThingManager::editThingResponse(int commandId, const QVariantMap ¶ms)
|
|||
|
||||
void ThingManager::executeActionResponse(int commandId, const QVariantMap ¶ms)
|
||||
{
|
||||
qDebug() << "Execute Action response" << params;
|
||||
qCDebug(dcThingManager()) << "Execute Action response" << params;
|
||||
emit executeActionReply(commandId, errorFromString(params.value("thingError").toByteArray()), params.value("displayMessage").toString());
|
||||
}
|
||||
|
||||
|
|
@ -536,6 +536,7 @@ int ThingManager::executeAction(const QUuid &thingId, const QUuid &actionTypeId,
|
|||
p.insert("params", params);
|
||||
}
|
||||
|
||||
qCDebug(dcThingManager()) << "Executing action" << thingId << actionTypeId;
|
||||
return m_jsonClient->sendCommand("Integrations.ExecuteAction", p, this, "executeActionResponse");
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue