-
Notifications
You must be signed in to change notification settings - Fork 506
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Handle supported 'state' changes via FC03 for supported Philips Hue lights #7950
base: master
Are you sure you want to change the base?
Changes from all commits
b47901b
0806c16
172e406
750fdac
3c3e883
56310f7
0102258
baf4f4b
07c68bf
6468b49
4c2a33c
4a282d5
5e66010
51598d4
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -808,9 +808,26 @@ enum TaskType | |
TaskTuyaRequest = 41, | ||
TaskXmasLightStrip = 42, | ||
TaskSimpleMetering = 43, | ||
TaskHueEffect = 44 | ||
TaskHueEffect = 44, | ||
TaskHueManufacturerSpecific = 45 | ||
}; | ||
|
||
// Option set to represent the payload items in a '0xfc03' cluster's '0x00' command. | ||
enum HueManufacturerSpecificPayload : quint16 | ||
{ | ||
None = 0x0, // 0x0000 | ||
On = 1 << 0, // 0x0001 | ||
Brightness = 1 << 1, // 0x0002 | ||
ColorTemperature = 1 << 2, // 0x0004 | ||
Color = 1 << 3, // 0x0008 | ||
TransitionTime = 1 << 4, // 0x0010 | ||
Effect = 1 << 5, // 0x0020 | ||
UNKNOWN = 1 << 6, // 0x0040 | ||
EffectDuration = 1 << 7 // 0x0080 | ||
}; | ||
Q_DECLARE_FLAGS(HueManufacturerSpecificPayloads, HueManufacturerSpecificPayload) | ||
Q_DECLARE_OPERATORS_FOR_FLAGS(HueManufacturerSpecificPayloads) | ||
|
||
enum XmasLightStripMode | ||
{ | ||
ModeWhite = 0, | ||
|
@@ -1432,9 +1449,13 @@ public Q_SLOTS: | |
// Advanced features of Hue lights. | ||
QStringList getHueEffectNames(quint64 effectBitmap, bool colorloop); | ||
QStringList getHueGradientStyleNames(quint16 styleBitmap); | ||
bool isHueEffectLight(const LightNode *lightNode); | ||
bool isMappableToManufacturerSpecific(const QVariantMap &map); | ||
bool addTaskHueEffect(TaskItem &task, QString &effect); | ||
bool validateHueGradient(const ApiRequest &req, ApiResponse &rsp, QVariantMap &gradient, quint16 styleBitmap); | ||
bool addTaskHueGradient(TaskItem &task, QVariantMap &gradient); | ||
bool addTaskHueManufacturerSpecific(TaskItem &task, HueManufacturerSpecificPayloads &payloadItems, QVariantMap &items); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is this routine going to be invoked outside There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I decided on having it here cause I noticed a couple of places in |
||
int setHueLightState(const ApiRequest &req, ApiResponse &rsp, TaskItem &taskRef, QVariantMap &map); | ||
|
||
// Merry Christmas! | ||
bool isXmasLightStrip(const LightNode *lightNode); | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's probably some more places in
rest_light.cpp
where this could be leveraged.