improve messages on device setup failure

master
Michael Zanetti 2018-11-27 12:07:17 +01:00
parent e55cceca6c
commit 7c26973cbf
1 changed files with 4 additions and 1 deletions

View File

@ -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");