improve messages on device setup failure

This commit is contained in:
Michael Zanetti 2018-11-27 12:07:17 +01:00
parent e55cceca6c
commit 7c26973cbf

View File

@ -76,8 +76,11 @@ DeviceManager::DeviceSetupStatus DevicePluginTasmota::setupDevice(Device *device
return DeviceManager::DeviceSetupStatusFailure; return DeviceManager::DeviceSetupStatusFailure;
} }
MqttChannel *channel = hardwareManager()->mqttProvider()->createChannel(device->id(), deviceAddress); 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"); QUrl url("http://10.10.10.90/sv");
QUrlQuery query; QUrlQuery query;
query.addQueryItem("w", "2%2C1"); query.addQueryItem("w", "2%2C1");