From 7c26973cbf23eda3f9a830b25d04b890cb2e985b 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");