From 1b867d050349c7a32db3ca8936877d1e12bcf3fc Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Sat, 9 Jan 2021 04:00:02 +0100 Subject: [PATCH 1/3] ZigbeePhilipsHue: Add support for the Hue Smart button --- .../integrationpluginzigbeephilipshue.cpp | 184 +++++++++++++++++- .../integrationpluginzigbeephilipshue.h | 1 + .../integrationpluginzigbeephilipshue.json | 89 ++++++++- 3 files changed, 267 insertions(+), 7 deletions(-) diff --git a/zigbeephilipshue/integrationpluginzigbeephilipshue.cpp b/zigbeephilipshue/integrationpluginzigbeephilipshue.cpp index 5b608c4e..ceac8180 100644 --- a/zigbeephilipshue/integrationpluginzigbeephilipshue.cpp +++ b/zigbeephilipshue/integrationpluginzigbeephilipshue.cpp @@ -38,18 +38,23 @@ IntegrationPluginZigbeePhilipsHue::IntegrationPluginZigbeePhilipsHue() { m_ieeeAddressParamTypeIds[dimmerSwitchThingClassId] = dimmerSwitchThingIeeeAddressParamTypeId; + m_ieeeAddressParamTypeIds[smartButtonThingClassId] = smartButtonThingIeeeAddressParamTypeId; m_ieeeAddressParamTypeIds[motionSensorThingClassId] = motionSensorThingIeeeAddressParamTypeId; m_networkUuidParamTypeIds[dimmerSwitchThingClassId] = dimmerSwitchThingNetworkUuidParamTypeId; + m_networkUuidParamTypeIds[smartButtonThingClassId] = smartButtonThingNetworkUuidParamTypeId; m_networkUuidParamTypeIds[motionSensorThingClassId] = motionSensorThingNetworkUuidParamTypeId; m_connectedStateTypeIds[dimmerSwitchThingClassId] = dimmerSwitchConnectedStateTypeId; + m_connectedStateTypeIds[smartButtonThingClassId] = smartButtonConnectedStateTypeId; m_connectedStateTypeIds[motionSensorThingClassId] = motionSensorConnectedStateTypeId; m_signalStrengthStateTypeIds[dimmerSwitchThingClassId] = dimmerSwitchSignalStrengthStateTypeId; + m_signalStrengthStateTypeIds[smartButtonThingClassId] = smartButtonSignalStrengthStateTypeId; m_signalStrengthStateTypeIds[motionSensorThingClassId] = motionSensorSignalStrengthStateTypeId; m_versionStateTypeIds[dimmerSwitchThingClassId] = dimmerSwitchVersionStateTypeId; + m_versionStateTypeIds[smartButtonThingClassId] = smartButtonVersionStateTypeId; m_versionStateTypeIds[motionSensorThingClassId] = motionSensorVersionStateTypeId; } @@ -64,8 +69,6 @@ bool IntegrationPluginZigbeePhilipsHue::handleNode(ZigbeeNode *node, const QUuid if (node->nodeDescriptor().manufacturerCode != Zigbee::Philips) return false; - bool handled = false; - if (node->endpoints().count() == 2 && node->hasEndpoint(0x01) && node->hasEndpoint(0x02)) { ZigbeeNodeEndpoint *endpointOne = node->getEndpoint(0x01); ZigbeeNodeEndpoint *endpoinTwo = node->getEndpoint(0x02); @@ -76,7 +79,7 @@ bool IntegrationPluginZigbeePhilipsHue::handleNode(ZigbeeNode *node, const QUuid endpoinTwo->profile() == Zigbee::ZigbeeProfileHomeAutomation && endpoinTwo->deviceId() == Zigbee::HomeAutomationDeviceSimpleSensor) { - qCDebug(dcZigbeePhilipsHue()) << "Handeling Hue dimmer switch" << node << endpointOne << endpoinTwo; + qCDebug(dcZigbeePhilipsHue()) << "Handling Hue dimmer switch" << node << endpointOne << endpoinTwo; createThing(dimmerSwitchThingClassId, networkUuid, node); initDimmerSwitch(node); return true; @@ -88,14 +91,26 @@ bool IntegrationPluginZigbeePhilipsHue::handleNode(ZigbeeNode *node, const QUuid endpoinTwo->profile() == Zigbee::ZigbeeProfileHomeAutomation && endpoinTwo->deviceId() == Zigbee::HomeAutomationDeviceOccupacySensor) { - qCDebug(dcZigbeePhilipsHue()) << "Handeling Hue outdoor sensor" << node << endpointOne << endpoinTwo; + qCDebug(dcZigbeePhilipsHue()) << "Handling Hue outdoor sensor" << node << endpointOne << endpoinTwo; createThing(motionSensorThingClassId, networkUuid, node); initMotionSensor(node); return true; } } - return handled; + if (node->endpoints().count() == 1 && node->hasEndpoint(0x01)) { + ZigbeeNodeEndpoint *endpointOne = node->getEndpoint(0x01); + + // Smart buttton + if (endpointOne->profile() == Zigbee::ZigbeeProfileHomeAutomation && + endpointOne->deviceId() == Zigbee::HomeAutomationDeviceNonColourSceneController) { + qCDebug(dcZigbeePhilipsHue()) << "Handling Hue Smart button" << node << endpointOne; + createThing(smartButtonThingClassId, networkUuid, node); + initSmartButton(node); + return true; + } + } + return false; } void IntegrationPluginZigbeePhilipsHue::handleRemoveNode(ZigbeeNode *node, const QUuid &networkUuid) @@ -209,6 +224,71 @@ void IntegrationPluginZigbeePhilipsHue::setupThing(ThingSetupInfo *info) } } + if (thing->thingClassId() == smartButtonThingClassId) { + ZigbeeNodeEndpoint *endpointHa = node->getEndpoint(0x01); + + // Set the version + thing->setStateValue(m_versionStateTypeIds.value(thing->thingClassId()), endpointHa->softwareBuildId()); + + // Connect to button presses + ZigbeeClusterOnOff *onOffCluster = endpointHa->outputCluster(ZigbeeClusterLibrary::ClusterIdOnOff); + if (!onOffCluster) { + qCWarning(dcZigbeePhilipsHue()) << "Could not find on/off client cluster on" << thing << endpointHa; + } else { + // The smart button toggles between command(On) and commandOffWithEffect() for short presses... + connect(onOffCluster, &ZigbeeClusterOnOff::commandSent, thing, [=](ZigbeeClusterOnOff::Command command){ + if (command == ZigbeeClusterOnOff::CommandOn) { + qCDebug(dcZigbeePhilipsHue()) << thing << "pressed"; + emit emitEvent(Event(smartButtonPressedEventTypeId, thing->id())); + } else { + qCWarning(dcZigbeePhilipsHue()) << thing << "unhandled command received" << command; + } + }); + connect(onOffCluster, &ZigbeeClusterOnOff::commandOffWithEffectSent, thing, [=](ZigbeeClusterOnOff::Effect effect, quint8 effectVariant){ + qCDebug(dcZigbeePhilipsHue()) << thing << "pressed" << effect << effectVariant; + emit emitEvent(Event(smartButtonPressedEventTypeId, thing->id())); + }); + + // ...and toggless between level up/down for long presses + ZigbeeClusterLevelControl *levelCluster = endpointHa->outputCluster(ZigbeeClusterLibrary::ClusterIdLevelControl); + if (!levelCluster) { + qCWarning(dcZigbeePhilipsHue()) << "Could not find level client cluster on" << thing << endpointHa; + } else { + connect(levelCluster, &ZigbeeClusterLevelControl::commandStepSent, thing, [=](ZigbeeClusterLevelControl::FadeMode fadeMode, quint8 stepSize, quint16 transitionTime){ + qCDebug(dcZigbeePhilipsHue()) << thing << "level button pressed" << fadeMode << stepSize << transitionTime; + switch (fadeMode) { + case ZigbeeClusterLevelControl::FadeModeUp: + qCDebug(dcZigbeePhilipsHue()) << thing << "DIM UP pressed"; + emit emitEvent(Event(smartButtonLongPressedEventTypeId, thing->id())); + break; + case ZigbeeClusterLevelControl::FadeModeDown: + qCDebug(dcZigbeePhilipsHue()) << thing << "DIM DOWN pressed"; + emit emitEvent(Event(smartButtonLongPressedEventTypeId, thing->id())); + break; + } + }); + } + } + + // Get battery level changes + ZigbeeClusterPowerConfiguration *powerCluster = endpointHa->inputCluster(ZigbeeClusterLibrary::ClusterIdPowerConfiguration); + if (!powerCluster) { + qCWarning(dcZigbeePhilipsHue()) << "Could not find power configuration cluster on" << thing << endpointHa; + } else { + // Only set the initial state if the attribute already exists + if (powerCluster->hasAttribute(ZigbeeClusterPowerConfiguration::AttributeBatteryPercentageRemaining)) { + thing->setStateValue(dimmerSwitchBatteryLevelStateTypeId, powerCluster->batteryPercentage()); + thing->setStateValue(dimmerSwitchBatteryCriticalStateTypeId, (powerCluster->batteryPercentage() < 10.0)); + } + + connect(powerCluster, &ZigbeeClusterPowerConfiguration::batteryPercentageChanged, thing, [=](double percentage){ + qCDebug(dcZigbeePhilipsHue()) << "Battery percentage changed" << percentage << "%" << thing; + thing->setStateValue(smartButtonBatteryLevelStateTypeId, percentage); + thing->setStateValue(smartButtonBatteryCriticalStateTypeId, (percentage < 10.0)); + }); + } + } + if (thing->thingClassId() == motionSensorThingClassId) { ZigbeeNodeEndpoint *endpointHa = node->getEndpoint(0x02); @@ -424,6 +504,100 @@ void IntegrationPluginZigbeePhilipsHue::initDimmerSwitch(ZigbeeNode *node) }); } +void IntegrationPluginZigbeePhilipsHue::initSmartButton(ZigbeeNode *node) +{ + ZigbeeNodeEndpoint *endpoint = node->getEndpoint(0x01); + + // Get the current configured bindings for this node + ZigbeeReply *reply = node->removeAllBindings(); + connect(reply, &ZigbeeReply::finished, node, [=](){ + if (reply->error() != ZigbeeReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to remove all bindings for initialization of" << node; + } else { + qCDebug(dcZigbeePhilipsHue()) << "Removed all bindings successfully from" << node; + } + + // Read battery, bind and configure attribute reporting for battery + if (!endpoint->hasInputCluster(ZigbeeClusterLibrary::ClusterIdPowerConfiguration)) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to initialize the power configuration cluster because the cluster could not be found" << node << endpoint; + return; + } + + qCDebug(dcZigbeePhilipsHue()) << "Read power configuration cluster attributes" << node; + ZigbeeClusterReply *readAttributeReply = endpoint->getInputCluster(ZigbeeClusterLibrary::ClusterIdPowerConfiguration)->readAttributes({ZigbeeClusterPowerConfiguration::AttributeBatteryPercentageRemaining}); + connect(readAttributeReply, &ZigbeeClusterReply::finished, node, [=](){ + if (readAttributeReply->error() != ZigbeeClusterReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to read power cluster attributes" << readAttributeReply->error(); + } else { + qCDebug(dcZigbeePhilipsHue()) << "Read power configuration cluster attributes finished successfully"; + } + + + // Bind the cluster to the coordinator + qCDebug(dcZigbeePhilipsHue()) << "Bind power configuration cluster to coordinator IEEE address"; + ZigbeeDeviceObjectReply * zdoReply = node->deviceObject()->requestBindIeeeAddress(endpoint->endpointId(), ZigbeeClusterLibrary::ClusterIdPowerConfiguration, + hardwareManager()->zigbeeResource()->coordinatorAddress(node->networkUuid()), 0x01); + connect(zdoReply, &ZigbeeDeviceObjectReply::finished, node, [=](){ + if (zdoReply->error() != ZigbeeDeviceObjectReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to bind power cluster to coordinator" << zdoReply->error(); + } else { + qCDebug(dcZigbeePhilipsHue()) << "Bind power configuration cluster to coordinator finished successfully"; + } + + // Configure attribute rporting for battery remaining (0.5 % changes = 1) + ZigbeeClusterLibrary::AttributeReportingConfiguration reportingConfig; + reportingConfig.attributeId = ZigbeeClusterPowerConfiguration::AttributeBatteryPercentageRemaining; + reportingConfig.dataType = Zigbee::Uint8; + reportingConfig.minReportingInterval = 300; + reportingConfig.maxReportingInterval = 2700; + reportingConfig.reportableChange = ZigbeeDataType(static_cast(1)).data(); + + qCDebug(dcZigbeePhilipsHue()) << "Configure attribute reporting for power configuration cluster to coordinator"; + ZigbeeClusterReply *reportingReply = endpoint->getInputCluster(ZigbeeClusterLibrary::ClusterIdPowerConfiguration)->configureReporting({reportingConfig}); + connect(reportingReply, &ZigbeeClusterReply::finished, this, [=](){ + if (reportingReply->error() != ZigbeeClusterReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to configure power cluster attribute reporting" << reportingReply->error(); + } else { + qCDebug(dcZigbeePhilipsHue()) << "Attribute reporting configuration finished for power cluster" << ZigbeeClusterLibrary::parseAttributeReportingStatusRecords(reportingReply->responseFrame().payload); + } + + qCDebug(dcZigbeePhilipsHue()) << "Bind on/off cluster to coordinator"; + ZigbeeDeviceObjectReply * zdoReply = node->deviceObject()->requestBindGroupAddress(endpoint->endpointId(), ZigbeeClusterLibrary::ClusterIdOnOff, 0x0000); + connect(zdoReply, &ZigbeeDeviceObjectReply::finished, node, [=](){ + if (zdoReply->error() != ZigbeeDeviceObjectReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to bind on/off cluster to coordinator" << zdoReply->error(); + } else { + qCDebug(dcZigbeePhilipsHue()) << "Bind on/off cluster to coordinator finished successfully"; + } + + qCDebug(dcZigbeePhilipsHue()) << "Bind power level cluster to coordinator"; + ZigbeeDeviceObjectReply * zdoReply = node->deviceObject()->requestBindGroupAddress(endpoint->endpointId(), ZigbeeClusterLibrary::ClusterIdLevelControl, 0x0000); + connect(zdoReply, &ZigbeeDeviceObjectReply::finished, node, [=](){ + if (zdoReply->error() != ZigbeeDeviceObjectReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to bind level cluster to coordinator" << zdoReply->error(); + } else { + qCDebug(dcZigbeePhilipsHue()) << "Bind level cluster to coordinator finished successfully"; + } + + qCDebug(dcZigbeePhilipsHue()) << "Read binding table from node" << node; + ZigbeeReply *reply = node->readBindingTableEntries(); + connect(reply, &ZigbeeReply::finished, node, [=](){ + if (reply->error() != ZigbeeReply::ErrorNoError) { + qCWarning(dcZigbeePhilipsHue()) << "Failed to read binding table from" << node; + } else { + foreach (const ZigbeeDeviceProfile::BindingTableListRecord &binding, node->bindingTableRecords()) { + qCDebug(dcZigbeePhilipsHue()) << node << binding; + } + } + }); + }); + }); + }); + }); + }); + }); +} + void IntegrationPluginZigbeePhilipsHue::initMotionSensor(ZigbeeNode *node) { ZigbeeNodeEndpoint *endpointHa = node->getEndpoint(0x02); diff --git a/zigbeephilipshue/integrationpluginzigbeephilipshue.h b/zigbeephilipshue/integrationpluginzigbeephilipshue.h index 47cd5ade..5e25cd26 100644 --- a/zigbeephilipshue/integrationpluginzigbeephilipshue.h +++ b/zigbeephilipshue/integrationpluginzigbeephilipshue.h @@ -71,6 +71,7 @@ private: void initDimmerSwitch(ZigbeeNode *node); void initMotionSensor(ZigbeeNode *node); + void initSmartButton(ZigbeeNode *node); }; diff --git a/zigbeephilipshue/integrationpluginzigbeephilipshue.json b/zigbeephilipshue/integrationpluginzigbeephilipshue.json index d45653ed..25f9db21 100644 --- a/zigbeephilipshue/integrationpluginzigbeephilipshue.json +++ b/zigbeephilipshue/integrationpluginzigbeephilipshue.json @@ -10,7 +10,7 @@ "thingClasses": [ { "name": "dimmerSwitch", - "displayName": "Hue dimmer switch", + "displayName": "Hue Dimmer switch", "id": "b2711164-a848-4715-8ddf-33ca86f9f4cf", "setupMethod": "JustAdd", "createMethods": [ "Auto" ], @@ -101,9 +101,94 @@ } ] }, + { + "id": "edfa223b-aade-4369-a4e2-77b99989f49d", + "name": "smartButton", + "displayName": "Hue Smart button", + "createMethods": ["Auto"], + "interfaces": ["longpressbutton", "batterylevel", "wirelessconnectable"], + "paramTypes": [ + { + "id": "2c2bd259-b1cd-47f4-825f-03c3806a346f", + "name": "ieeeAddress", + "displayName": "IEEE adress", + "type": "QString", + "defaultValue": "00:00:00:00:00:00:00:00" + }, + { + "id": "cee19fae-eac7-4cad-ab4f-b5fe68710115", + "name": "networkUuid", + "displayName": "Zigbee network UUID", + "type": "QString", + "defaultValue": "" + } + ], + "stateTypes": [ + { + "id": "2837540f-a97b-4a92-9e17-900db38577e4", + "name": "batteryLevel", + "displayName": "Battery level", + "displayNameEvent": "Battery level changed", + "type": "int", + "minValue": 0, + "maxValue": 100, + "unit": "Percentage", + "defaultValue": 0 + }, + { + "id": "3d79d36e-008e-41c8-9bb5-28db235b93ce", + "name": "batteryCritical", + "displayName": "Battery critical", + "displayNameEvent": "Battery critical changed", + "type": "bool", + "defaultValue": false + }, + { + "id": "4748fc45-5ffd-4472-97a2-9fef256937db", + "name": "connected", + "displayName": "Connected", + "displayNameEvent": "Connected changed", + "type": "bool", + "defaultValue": false, + "cached": false + }, + { + "id": "0eb19a1e-04d1-44ce-9554-f70c47a4f48a", + "name": "signalStrength", + "displayName": "Signal strength", + "displayNameEvent": "Signal strength changed", + "type": "uint", + "minValue": 0, + "maxValue": 100, + "unit": "Percentage", + "defaultValue": 0 + }, + { + "id": "06268fbd-08d1-4f6c-bf81-ee44d8628ebc", + "name": "version", + "displayName": "Version", + "displayNameEvent": "Version changed", + "type": "QString", + "cached": true, + "defaultValue": "" + } + ], + "eventTypes": [ + { + "id": "b2c94c5a-0076-4231-b455-1ca1567d1b43", + "name": "pressed", + "displayName": "Pressed" + }, + { + "id": "c7e6b02a-2700-4dbb-b012-cb641655ce2b", + "name": "longPressed", + "displayName": "Long pressed" + } + ] + }, { "name": "motionSensor", - "displayName": "Hue motion sensor", + "displayName": "Hue Motion sensor", "id": "031c45d1-e782-4f91-9f05-259d6b81c7ef", "setupMethod": "JustAdd", "createMethods": [ "Auto" ], From 14d98d2c81bbb3ff1329d7a23a750700f0d5f035 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 10 Feb 2021 15:41:12 +0100 Subject: [PATCH 2/3] Update translations --- ...340b7-061a-42e6-ab7d-d7b4fd235d02-en_US.ts | 185 ++++++++++++------ 1 file changed, 130 insertions(+), 55 deletions(-) diff --git a/zigbeephilipshue/translations/0ca340b7-061a-42e6-ab7d-d7b4fd235d02-en_US.ts b/zigbeephilipshue/translations/0ca340b7-061a-42e6-ab7d-d7b4fd235d02-en_US.ts index eb467b05..bb23b20a 100644 --- a/zigbeephilipshue/translations/0ca340b7-061a-42e6-ab7d-d7b4fd235d02-en_US.ts +++ b/zigbeephilipshue/translations/0ca340b7-061a-42e6-ab7d-d7b4fd235d02-en_US.ts @@ -4,10 +4,10 @@ ZigbeePhilipsHue - - - - + + + + Battery The name of the ParamType (ThingClass: motionSensor, EventType: batteryLevel, ID: {00a4450b-d2fe-4e2b-92c8-1ab3a98d1628}) ---------- @@ -19,8 +19,8 @@ The name of the StateType ({3e28e0b3-fe23-4293-8876-8384def6c4fb}) of ThingClass - - + + Battery changed The name of the EventType ({00a4450b-d2fe-4e2b-92c8-1ab3a98d1628}) of ThingClass motionSensor ---------- @@ -28,89 +28,131 @@ The name of the EventType ({3e28e0b3-fe23-4293-8876-8384def6c4fb}) of ThingClass - - - - + + + + + + Battery critical The name of the ParamType (ThingClass: motionSensor, EventType: batteryCritical, ID: {9341f65a-b0aa-4648-82eb-e8400779f817}) ---------- The name of the StateType ({9341f65a-b0aa-4648-82eb-e8400779f817}) of ThingClass motionSensor ---------- +The name of the ParamType (ThingClass: smartButton, EventType: batteryCritical, ID: {3d79d36e-008e-41c8-9bb5-28db235b93ce}) +---------- +The name of the StateType ({3d79d36e-008e-41c8-9bb5-28db235b93ce}) of ThingClass smartButton +---------- The name of the ParamType (ThingClass: dimmerSwitch, EventType: batteryCritical, ID: {4223a3bc-9616-4ed2-ae50-704b9df62d0e}) ---------- The name of the StateType ({4223a3bc-9616-4ed2-ae50-704b9df62d0e}) of ThingClass dimmerSwitch - - + + + Battery critical changed The name of the EventType ({9341f65a-b0aa-4648-82eb-e8400779f817}) of ThingClass motionSensor ---------- +The name of the EventType ({3d79d36e-008e-41c8-9bb5-28db235b93ce}) of ThingClass smartButton +---------- The name of the EventType ({4223a3bc-9616-4ed2-ae50-704b9df62d0e}) of ThingClass dimmerSwitch - + + + Battery level + The name of the ParamType (ThingClass: smartButton, EventType: batteryLevel, ID: {2837540f-a97b-4a92-9e17-900db38577e4}) +---------- +The name of the StateType ({2837540f-a97b-4a92-9e17-900db38577e4}) of ThingClass smartButton + + + + + Battery level changed + The name of the EventType ({2837540f-a97b-4a92-9e17-900db38577e4}) of ThingClass smartButton + + + + Button name The name of the ParamType (ThingClass: dimmerSwitch, EventType: pressed, ID: {c086a247-838f-49c0-b1e4-2ae1ed181b55}) - + Button pressed The name of the EventType ({33bb5816-8479-4995-99e2-cb0443886003}) of ThingClass dimmerSwitch - - - - + + + + + + Connected The name of the ParamType (ThingClass: motionSensor, EventType: connected, ID: {0d0a5ee1-41f2-4b5a-a3c0-7c8cca1c064d}) ---------- The name of the StateType ({0d0a5ee1-41f2-4b5a-a3c0-7c8cca1c064d}) of ThingClass motionSensor ---------- +The name of the ParamType (ThingClass: smartButton, EventType: connected, ID: {4748fc45-5ffd-4472-97a2-9fef256937db}) +---------- +The name of the StateType ({4748fc45-5ffd-4472-97a2-9fef256937db}) of ThingClass smartButton +---------- The name of the ParamType (ThingClass: dimmerSwitch, EventType: connected, ID: {5ac101b2-4bb7-4b5c-8493-08b1ae7ca0c1}) ---------- The name of the StateType ({5ac101b2-4bb7-4b5c-8493-08b1ae7ca0c1}) of ThingClass dimmerSwitch - - + + + Connected changed The name of the EventType ({0d0a5ee1-41f2-4b5a-a3c0-7c8cca1c064d}) of ThingClass motionSensor ---------- +The name of the EventType ({4748fc45-5ffd-4472-97a2-9fef256937db}) of ThingClass smartButton +---------- The name of the EventType ({5ac101b2-4bb7-4b5c-8493-08b1ae7ca0c1}) of ThingClass dimmerSwitch - - Hue dimmer switch + + Hue Dimmer switch The name of the ThingClass ({b2711164-a848-4715-8ddf-33ca86f9f4cf}) - - Hue motion sensor + + Hue Motion sensor The name of the ThingClass ({031c45d1-e782-4f91-9f05-259d6b81c7ef}) - - + + Hue Smart button + The name of the ThingClass ({edfa223b-aade-4369-a4e2-77b99989f49d}) + + + + + + IEEE adress The name of the ParamType (ThingClass: motionSensor, Type: thing, ID: {a866df99-7e2a-40e1-b82e-529c03846d5e}) ---------- +The name of the ParamType (ThingClass: smartButton, Type: thing, ID: {2c2bd259-b1cd-47f4-825f-03c3806a346f}) +---------- The name of the ParamType (ThingClass: dimmerSwitch, Type: thing, ID: {b221cad1-ef2e-4192-8168-11d0205a43da}) - - + + Last seen time The name of the ParamType (ThingClass: motionSensor, EventType: lastSeenTime, ID: {128777a9-75e7-4cc6-b196-691d2ffddbc9}) ---------- @@ -118,14 +160,14 @@ The name of the StateType ({128777a9-75e7-4cc6-b196-691d2ffddbc9}) of ThingClass - + Last seen time changed The name of the EventType ({128777a9-75e7-4cc6-b196-691d2ffddbc9}) of ThingClass motionSensor - - + + Light intensity The name of the ParamType (ThingClass: motionSensor, EventType: lightIntensity, ID: {8077e335-1d18-4e3f-9b5e-6f71af4a33b1}) ---------- @@ -133,20 +175,26 @@ The name of the StateType ({8077e335-1d18-4e3f-9b5e-6f71af4a33b1}) of ThingClass - + Light intensity changed The name of the EventType ({8077e335-1d18-4e3f-9b5e-6f71af4a33b1}) of ThingClass motionSensor - + + Long pressed + The name of the EventType ({c7e6b02a-2700-4dbb-b012-cb641655ce2b}) of ThingClass smartButton + + + + Philips The name of the vendor ({0ae1e001-2aa6-47ed-b8c0-334c3728a68f}) - - + + Present The name of the ParamType (ThingClass: motionSensor, EventType: isPresent, ID: {66e3b840-4f4c-4f4a-a71a-69fb751f2a3b}) ---------- @@ -154,38 +202,53 @@ The name of the StateType ({66e3b840-4f4c-4f4a-a71a-69fb751f2a3b}) of ThingClass - + Present changed The name of the EventType ({66e3b840-4f4c-4f4a-a71a-69fb751f2a3b}) of ThingClass motionSensor - - - - + + Pressed + The name of the EventType ({b2c94c5a-0076-4231-b455-1ca1567d1b43}) of ThingClass smartButton + + + + + + + + + Signal strength The name of the ParamType (ThingClass: motionSensor, EventType: signalStrength, ID: {d4f85c34-896a-4bab-af71-8b80d9889815}) ---------- The name of the StateType ({d4f85c34-896a-4bab-af71-8b80d9889815}) of ThingClass motionSensor ---------- +The name of the ParamType (ThingClass: smartButton, EventType: signalStrength, ID: {0eb19a1e-04d1-44ce-9554-f70c47a4f48a}) +---------- +The name of the StateType ({0eb19a1e-04d1-44ce-9554-f70c47a4f48a}) of ThingClass smartButton +---------- The name of the ParamType (ThingClass: dimmerSwitch, EventType: signalStrength, ID: {5a6e325e-a6ee-4a36-b429-f5d8c8adb80b}) ---------- The name of the StateType ({5a6e325e-a6ee-4a36-b429-f5d8c8adb80b}) of ThingClass dimmerSwitch - - + + + Signal strength changed The name of the EventType ({d4f85c34-896a-4bab-af71-8b80d9889815}) of ThingClass motionSensor ---------- +The name of the EventType ({0eb19a1e-04d1-44ce-9554-f70c47a4f48a}) of ThingClass smartButton +---------- The name of the EventType ({5a6e325e-a6ee-4a36-b429-f5d8c8adb80b}) of ThingClass dimmerSwitch - - + + Temperature The name of the ParamType (ThingClass: motionSensor, EventType: temperature, ID: {978f069c-57c0-4e73-a81b-c593bc2e7624}) ---------- @@ -193,53 +256,65 @@ The name of the StateType ({978f069c-57c0-4e73-a81b-c593bc2e7624}) of ThingClass - + Temperature changed The name of the EventType ({978f069c-57c0-4e73-a81b-c593bc2e7624}) of ThingClass motionSensor - + Time period The name of the ParamType (ThingClass: motionSensor, Type: settings, ID: {4576f68f-7856-48f8-a3fd-2c9e7f968537}) - - - - + + + + + + Version The name of the ParamType (ThingClass: motionSensor, EventType: version, ID: {18cb67e1-220f-41d7-9145-1816fc5d38d0}) ---------- The name of the StateType ({18cb67e1-220f-41d7-9145-1816fc5d38d0}) of ThingClass motionSensor ---------- +The name of the ParamType (ThingClass: smartButton, EventType: version, ID: {06268fbd-08d1-4f6c-bf81-ee44d8628ebc}) +---------- +The name of the StateType ({06268fbd-08d1-4f6c-bf81-ee44d8628ebc}) of ThingClass smartButton +---------- The name of the ParamType (ThingClass: dimmerSwitch, EventType: version, ID: {12139630-668a-4ad8-96fa-781028e9eced}) ---------- The name of the StateType ({12139630-668a-4ad8-96fa-781028e9eced}) of ThingClass dimmerSwitch - - + + + Version changed The name of the EventType ({18cb67e1-220f-41d7-9145-1816fc5d38d0}) of ThingClass motionSensor ---------- +The name of the EventType ({06268fbd-08d1-4f6c-bf81-ee44d8628ebc}) of ThingClass smartButton +---------- The name of the EventType ({12139630-668a-4ad8-96fa-781028e9eced}) of ThingClass dimmerSwitch - + Zigbee Philips Hue The name of the plugin ZigbeePhilipsHue ({0ca340b7-061a-42e6-ab7d-d7b4fd235d02}) - - + + + Zigbee network UUID The name of the ParamType (ThingClass: motionSensor, Type: thing, ID: {99f4ff28-6d61-4e96-bfc4-c32aa05bb256}) ---------- +The name of the ParamType (ThingClass: smartButton, Type: thing, ID: {cee19fae-eac7-4cad-ab4f-b5fe68710115}) +---------- The name of the ParamType (ThingClass: dimmerSwitch, Type: thing, ID: {d2bb97ee-caed-4776-8931-9fc0a04e4e8f}) From 62e7d265e281d436b615e50fec94c48a7d18c3d5 Mon Sep 17 00:00:00 2001 From: Michael Zanetti Date: Wed, 10 Feb 2021 15:46:41 +0100 Subject: [PATCH 3/3] update readme --- zigbeephilipshue/README.md | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/zigbeephilipshue/README.md b/zigbeephilipshue/README.md index bf1e7994..5c45c43c 100644 --- a/zigbeephilipshue/README.md +++ b/zigbeephilipshue/README.md @@ -24,6 +24,12 @@ The [Hue dimmer switch](https://www.philips-hue.com/en-us/p/hue-dimmer-switch/04 **Pairing instructions**: Open the ZigBee network for joining. Press the setup button for 5 seconds until the LED start blinking in different colors. +### Hue smart button + +The [Hue Smart button](https://www.philips-hue.com/en-us/p/hue-smart-button/046677553715) is fully supported. + +**Pairing instructions**: Open the ZigBee network for joining. Press the setup button behind the back cap for 5 seconds until the LED start blinking in different colors. + ### Hue lights Most of the lights and lamps from Philips Hue should be handled in a generic way by the `nymea-plugin-zigbee-generic-lights` plugin. There are 2 methods for bringing a Hue light / bulb into the nymea ZigBee network.