WeMo: Fix discovery if device has been renamed
parent
05fee5bc95
commit
9390754971
|
|
@ -246,10 +246,9 @@ void DevicePluginWemo::onUpnpDiscoveryFinished()
|
|||
|
||||
QList<DeviceDescriptor> deviceDescriptors;
|
||||
foreach (const UpnpDeviceDescriptor &upnpDeviceDescriptor, reply->deviceDescriptors()) {
|
||||
if (upnpDeviceDescriptor.friendlyName() == "WeMo Switch") {
|
||||
DeviceDescriptor descriptor(wemoSwitchDeviceClassId, "WeMo Switch", upnpDeviceDescriptor.serialNumber());
|
||||
if (upnpDeviceDescriptor.deviceType() == "urn:Belkin:device:controllee:1") {
|
||||
DeviceDescriptor descriptor(wemoSwitchDeviceClassId, upnpDeviceDescriptor.friendlyName(), upnpDeviceDescriptor.serialNumber());
|
||||
ParamList params;
|
||||
params.append(Param(wemoSwitchDeviceNameParamTypeId, upnpDeviceDescriptor.friendlyName()));
|
||||
params.append(Param(wemoSwitchDeviceHostParamTypeId, upnpDeviceDescriptor.hostAddress().toString()));
|
||||
params.append(Param(wemoSwitchDevicePortParamTypeId, upnpDeviceDescriptor.port()));
|
||||
params.append(Param(wemoSwitchDeviceSerialParamTypeId, upnpDeviceDescriptor.serialNumber()));
|
||||
|
|
|
|||
|
|
@ -15,13 +15,6 @@
|
|||
"interfaces": ["powersocket", "connectable"],
|
||||
"createMethods": ["discovery"],
|
||||
"paramTypes": [
|
||||
{
|
||||
"id": "50d2236d-b73a-4d7b-ac8a-34c6566e6543",
|
||||
"name": "name",
|
||||
"displayName": "name",
|
||||
"type": "QString",
|
||||
"inputType": "TextLine"
|
||||
},
|
||||
{
|
||||
"id": "84ed399c-edb0-40da-8e2f-86eefc5790eb",
|
||||
"name": "host",
|
||||
|
|
|
|||
Loading…
Reference in New Issue