Undo initial testing descriptor read
parent
7b1b5620e1
commit
971ec9a75c
|
|
@ -76,13 +76,11 @@ BluetoothGattDescriptor::BluetoothGattDescriptor(const QDBusObjectPath &path, co
|
||||||
|
|
||||||
processProperties(properties);
|
processProperties(properties);
|
||||||
|
|
||||||
readValue();
|
QDBusPendingCall readingCall = m_descriptorInterface->asyncCall("GetAll", QVariantMap());
|
||||||
|
QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(readingCall, this);
|
||||||
// QDBusPendingCall readingCall = m_descriptorInterface->asyncCall("GetAll", QVariantMap());
|
connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](){
|
||||||
// QDBusPendingCallWatcher *watcher = new QDBusPendingCallWatcher(readingCall, this);
|
qCDebug(dcBluez()) << "Get descriptor properties finished";
|
||||||
// connect(watcher, &QDBusPendingCallWatcher::finished, this, [=](){
|
});
|
||||||
// qCDebug(dcBluez()) << "Get descriptor properties finished";
|
|
||||||
// });
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void BluetoothGattDescriptor::processProperties(const QVariantMap &properties)
|
void BluetoothGattDescriptor::processProperties(const QVariantMap &properties)
|
||||||
|
|
|
||||||
|
|
@ -308,8 +308,9 @@ void IntegrationPluginNuki::onBluetoothDiscoveryFinished(ThingDiscoveryInfo *inf
|
||||||
m_bluetoothAdapter->stopDiscovering();
|
m_bluetoothAdapter->stopDiscovering();
|
||||||
|
|
||||||
foreach (BluetoothDevice *thing, m_bluetoothAdapter->devices()) {
|
foreach (BluetoothDevice *thing, m_bluetoothAdapter->devices()) {
|
||||||
if (!bluetoothDeviceAlreadyAdded(thing->address()) && thing->name().contains("Nuki")) {
|
qCDebug(dcNuki()) << "Found bluetooth device" << thing->name() << thing->address().toString();
|
||||||
ThingDescriptor descriptor(nukiThingClassId, "Nuki", thing->address().toString());
|
if (!bluetoothDeviceAlreadyAdded(thing->address()) && thing->name().toLower().contains("nuki")) {
|
||||||
|
qCDebug(dcNuki()) << "Found nuki smart lock which has not been added yet";
|
||||||
|
|
||||||
// Get serial number from name
|
// Get serial number from name
|
||||||
QString serialNumber;
|
QString serialNumber;
|
||||||
|
|
@ -320,6 +321,7 @@ void IntegrationPluginNuki::onBluetoothDiscoveryFinished(ThingDiscoveryInfo *inf
|
||||||
qCWarning(dcNuki()) << "Could not read serial number from bluetooth thing name" << thing->name();
|
qCWarning(dcNuki()) << "Could not read serial number from bluetooth thing name" << thing->name();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
ThingDescriptor descriptor(nukiThingClassId, "Nuki", thing->address().toString());
|
||||||
ParamList params;
|
ParamList params;
|
||||||
params.append(Param(nukiThingNameParamTypeId, thing->name()));
|
params.append(Param(nukiThingNameParamTypeId, thing->name()));
|
||||||
params.append(Param(nukiThingMacParamTypeId, thing->address().toString()));
|
params.append(Param(nukiThingMacParamTypeId, thing->address().toString()));
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue