mirror of
https://github.com/nymea/nymea-plugins.git
synced 2026-07-19 00:54:53 +02:00
discovery fixed
This commit is contained in:
parent
e3658865a1
commit
fd536272fe
@ -90,6 +90,7 @@ void DevicePluginLukeRoberts::setupDevice(DeviceSetupInfo *info)
|
||||
BluetoothLowEnergyDevice *bluetoothDevice = hardwareManager()->bluetoothLowEnergyManager()->registerDevice(deviceInfo, QLowEnergyController::RandomAddress);
|
||||
|
||||
LukeRoberts *lamp = new LukeRoberts(bluetoothDevice, this);
|
||||
connect(lamp, &LukeRoberts::connectedChanged, this, &DevicePluginLukeRoberts::onConnectedChanged);
|
||||
connect(lamp, &LukeRoberts::deviceInformationChanged, this, &DevicePluginLukeRoberts::onDeviceInformationChanged);
|
||||
|
||||
m_lamps.insert(lamp, device);
|
||||
|
||||
@ -284,6 +284,7 @@ void LukeRoberts::onExternalApiEndpointCharacteristicChanged(const QLowEnergyCha
|
||||
if (characteristic.uuid() == m_externalApiEndpoint.uuid()) {
|
||||
qCDebug(dcLukeRoberts()) << "Data received" << value;
|
||||
}
|
||||
|
||||
uint8_t scene = static_cast<uint8_t>(value.at(2));
|
||||
if (value.length() > 4) { //its a scene
|
||||
|
||||
@ -295,6 +296,5 @@ void LukeRoberts::onExternalApiEndpointCharacteristicChanged(const QLowEnergyCha
|
||||
|
||||
}
|
||||
|
||||
|
||||
qCDebug(dcLukeRoberts()) << "Service characteristic changed" << characteristic.name() << value.toHex();
|
||||
}
|
||||
|
||||
@ -31,7 +31,7 @@
|
||||
#include "typeutils.h"
|
||||
#include "hardware/bluetoothlowenergy/bluetoothlowenergydevice.h"
|
||||
|
||||
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002^"));
|
||||
static QBluetoothUuid customControlServiceUuid = QBluetoothUuid(QUuid("44092840-0567-11E6-B862-0002A5D5C51B"));
|
||||
static QBluetoothUuid externalApiEndpointCharacteristicUuid = QBluetoothUuid(QUuid("44092842-0567-11E6-B862-0002A5D5C51B"));
|
||||
|
||||
inline QByteArray &operator<<(QByteArray &l, quint8 r)
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user