From fe0530c02b896c1027d0e9cef7f598eb47e41d82 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Tue, 27 Nov 2018 12:07:17 +0100 Subject: [PATCH] improve messages on device setup failure --- tasmota/deviceplugintasmota.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tasmota/deviceplugintasmota.cpp b/tasmota/deviceplugintasmota.cpp index c684e8aa..09efbb21 100644 --- a/tasmota/deviceplugintasmota.cpp +++ b/tasmota/deviceplugintasmota.cpp @@ -76,8 +76,11 @@ DeviceManager::DeviceSetupStatus DevicePluginTasmota::setupDevice(Device *device return DeviceManager::DeviceSetupStatusFailure; } MqttChannel *channel = hardwareManager()->mqttProvider()->createChannel(device->id(), deviceAddress); + if (!channel) { + qCWarning(dcTasmota) << "Failed to create MQTT channel."; + return DeviceManager::DeviceSetupStatusFailure; + } - Q_UNUSED(device) QUrl url("http://10.10.10.90/sv"); QUrlQuery query; query.addQueryItem("w", "2%2C1");