philips-hue

How to get XY value from ct in Philips Hue?

纵饮孤独 提交于 2020-12-13 03:13:49
问题 How to get XY value from ct. Ex: ct = 217, I want to get x="0.3127569", y= "0.32908". I'm able to convert XY value into ct value using this below code. float R1 = [hue[0] floatValue]; float S1 = [hue[1] floatValue]; float result = ((R1-0.332)/(S1-0.1858)); NSString *ctString = [NSString stringWithFormat:@"%f", ((-449*result*result*result)+(3525*result*result)-(6823.3*result)+(5520.33))]; float micro2 = (float) (1 / [ctString floatValue] * 1000000); NSString *ctValue = [NSString

How to get XY value from ct in Philips Hue?

妖精的绣舞 提交于 2020-12-13 03:11:17
问题 How to get XY value from ct. Ex: ct = 217, I want to get x="0.3127569", y= "0.32908". I'm able to convert XY value into ct value using this below code. float R1 = [hue[0] floatValue]; float S1 = [hue[1] floatValue]; float result = ((R1-0.332)/(S1-0.1858)); NSString *ctString = [NSString stringWithFormat:@"%f", ((-449*result*result*result)+(3525*result*result)-(6823.3*result)+(5520.33))]; float micro2 = (float) (1 / [ctString floatValue] * 1000000); NSString *ctValue = [NSString

how to switch on and off PHILPS HUE lights

孤街浪徒 提交于 2020-01-17 08:54:30
问题 I am using HUE-Emulator to view the changes.Emulator is running on port 80 . Currently I am only able to view the details using browser.(API calls) Now I want to switch off and switch on the lights using my app.But my code doesn't detect the bridge. I am not using any physical device. I am running my app in simulator. Code I am using to find Bridges - (void)viewDidLoad { [super viewDidLoad]; self.phHueSDK = [[PHHueSDK alloc] init]; [self.phHueSDK enableLogging:YES]; // Call startUpSDK which

Changing color's tone using python

自闭症网瘾萝莉.ら 提交于 2020-01-15 03:15:06
问题 I'm looking for a way to change a color's tone, knowing it's RGB composition, then replace all instances of the old RGB with the obtained RGB. For example, I'd like red to become purple, light red, light purple, etc... It can be done in photoshop by changing a color's hue. What I've thought so far is the following: convert RGB to HLS, then change the Hue. Here's the code so far (multiple colors are changed, not just one, defined in the "list" list): (As you might notice, I'm just a beginner

RGB to CIE color conversion [duplicate]

元气小坏坏 提交于 2020-01-13 12:08:23
问题 This question already has answers here : RGB to Philips Hue (HSB) (3 answers) Closed 5 years ago . As I said before (RGB to Philips Hue (HSB)) I'm still not giving up my hopes for converting a simple RGB value to a value Philips Hue will accept. The official App for iPhone and Android allows you to select a color from a random photo and the Hue will adjust itself accordingly. So there must be some sort of formula. This time however I think I have just found this very formula in this

How do I convert an RGB value to a XY value for the Phillips Hue Bulb

限于喜欢 提交于 2020-01-01 17:14:10
问题 How do I properly convert the pixel rgb values in a picture I have taken to th XY values needed to to send to the Phillips Hue device? My current code does the following: 1:Take a picture, find the most common colors. 2:Cycle throw them and then take another picture. 3:Send the value to a Phillips Hue Bulbs. If you need more of the code, do tell, I can share everything if it helps. I am particularly confused here as the conversion in colormath gives me an xyz and not just an xy. And if I give

How do I convert an RGB value to a XY value for the Phillips Hue Bulb

偶尔善良 提交于 2020-01-01 17:14:09
问题 How do I properly convert the pixel rgb values in a picture I have taken to th XY values needed to to send to the Phillips Hue device? My current code does the following: 1:Take a picture, find the most common colors. 2:Cycle throw them and then take another picture. 3:Send the value to a Phillips Hue Bulbs. If you need more of the code, do tell, I can share everything if it helps. I am particularly confused here as the conversion in colormath gives me an xyz and not just an xy. And if I give

Philips hue, convert xy from api to HEX or RGB

萝らか妹 提交于 2020-01-01 12:38:09
问题 I am making a web interface to manage my hue lamps, but i am struggling when it comes to color handling.. The api of the lamps provides me the x and y coordinates from http://en.wikipedia.org/wiki/CIE_1931_color_space But not the z value. I think i must calculate the z from the brightness value or saturation value (0 to 255). but i am terrible at colors, and math :p. I tried to use thoses functions https://github.com/eikeon/hue-color-converter/blob/master/colorconverter.ts But as i saw in the

Get Phillips Hue framework SDK running with Swift

Deadly 提交于 2019-12-25 01:45:42
问题 I'm trying to get the HueSDK_OSX Framework running using an Object-C-bridging-header. Here is the framework: https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master/Documentation/APIReference_OSX.zip Bridging-header: #import <HueSDK_OSX/HueSDK.h> Swift file: import PHHueSDK when typing "import HueSDK_OSX/" the well known code completion list appears with all classes from the framework, but when selecting on of them XCode keeps on saying Build error: "No such module" Then, when

Supplement Natural Light as the sun goes down each day with Philips HUE Motion Sensor (and integrated light sensor) Without Motion

我们两清 提交于 2019-12-22 10:54:48
问题 I recently fitted out my home office with Philips HUE bulbs and a Philips HUE motion sensor that has a builtin light sensor. I was hoping that I could get up the Philips HUE Motion Sensor (with light sensor) to supplement light in the office as the sun went down so the room was always the same brightness (to save my little eyes from the strain of poor lighting) While the sensor has have the light / lux sensor and it does allow me to set a threshold for when it should begin to turn on the