philips-hue

.NET Portable Class Library and UDP support

非 Y 不嫁゛ 提交于 2019-12-22 02:48:48
问题 I am writing a C# library for the Philips Hue Lights. I am trying to write the base API wrappers in the .NET portable set that way I can re-use this library for various platforms such as Windows 8/RT/WP. The API itself is all over HTTP using REST, so HttpWebRequest will serve most of my needs. The network bridge that controls the lights themselves can be discovered using SSDP over UDP. However, I am unable to find a way to use UDP sockets in the portable class library (PCL). There is no

PHP - How to convert RGB color to CIE 1931 color specification

て烟熏妆下的殇ゞ 提交于 2019-12-21 23:12:25
问题 I am creating my own PHP based application where i want to change RGB color into xy format of CIE 1931. How can i convert my RGB color specs to the CIE color space? 回答1: First calculate X, Y and Z with the transform matrix and then normalize the result X = 0.4124*R + 0.3576*G + 0.1805*B Y = 0.2126*R + 0.7152*G + 0.0722*B Z = 0.0193*R + 0.1192*G + 0.9505*B Normalize: x = X / (X + Y + Z) y = Y / (X + Y + Z) 回答2: Here is my Javascript version. It should help you enough ;) /** * Convert RGB to XY

Where do Xcode Bots put their results, so I can parse them?

两盒软妹~` 提交于 2019-12-21 05:24:32
问题 Our dev team has always used Jenkins for our iOS builds, and used Philips Hue lights to inform the team when the build is Building(Yellow), Successful(Green), Failed(Red). Now we have moved to Xcode CI and Bots, and I do not know when any unit tests fail. We don't even know if the build phase failed. On Xcode Bots CI you get this "bigscreen" feature: In Apple's "Manage and Monitor Bots from a Web Browser" Docs, you can see that it has all sorts of states that could key up a hue light. I

How to connect backend service with philips hue bridge remotely?

浪子不回头ぞ 提交于 2019-12-18 12:22:38
问题 I'm looking to write a philips hue service that needs to allow users to register their hue bridge with my service. This service would change the color of bulbs based on an event. I'm aware that I can use IFTTT but in this scenario, I'd like to not use IFTTT and I'd like to register my website with philips hue's apps. Any idea how I can do this? Your help is very much appreciated. Thanks! EDIT: Not sure why I was down voted but I definitely did do my research. I looked on philips hue's

Deserialize json with Json.NET

烂漫一生 提交于 2019-12-11 12:48:39
问题 I have JSON that looks like this (from the Philips HUE API): { "1": {"name": "Bedroom"}, "2": {"name": "Kitchen"} } When I try to deserialize this document I run into problems because the document is structured the way it is. If it had been formated like this: [ {"nr": "1", "name": "Bedroom"}, {"nr": "2", "name": "Kitchen"} ] Everything would have been fine. Now I am forced to do string parsing in order to extract the data... :-( Any ideas or suggestions? 回答1: I would deserialize to JObject

Phillips HUE SDK in Swift

醉酒当歌 提交于 2019-12-11 03:15:25
问题 I am very new to Swift! I do have some experience with Objective-C (although it has been around two years since i've really written anything in it). I am trying to use the Phillips HUE SDK with Swift, and am having some trouble! I am trying to re-write the following Objective-C code into Swift: // Start search for bridges [self.bridgeSearch startSearchWithCompletionHandler:^(NSDictionary *bridgesFound) { //Search complete [self showBridgesFound:bridgesFound]; } I have had no luck looking

iOS SDK Hue Philips with Swift

我是研究僧i 提交于 2019-12-06 07:31:25
问题 I tried to import iOS SDK in Objective C for Hue. I followed instructions here : https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX I added the HueSDK_iOS.framework to my project, I added all Lumberjack files and I created the .h with the import line. After, I used in my code : var phHueSdk : PHHueSDK = PHHueSDK() var searching : PHBridgeSearching = PHBridgeSearching() I have this errors : Undefined symbols for architecture armv7k: "_OBJC_CLASS_$_PHHueSDK", referenced from: type metadata

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

拜拜、爱过 提交于 2019-12-05 18:27:13
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 lights - it does require motion and it doesn't supplement - the lights are either on or off. I felt that

RGB to CIE color conversion [duplicate]

落爺英雄遲暮 提交于 2019-12-05 17:47:18
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 interesting article online: https://github.com/PhilipsHue/PhilipsHueSDK-iOS-OSX/blob/master

.NET Portable Class Library and UDP support

China☆狼群 提交于 2019-12-04 22:46:17
I am writing a C# library for the Philips Hue Lights. I am trying to write the base API wrappers in the .NET portable set that way I can re-use this library for various platforms such as Windows 8/RT/WP. The API itself is all over HTTP using REST, so HttpWebRequest will serve most of my needs. The network bridge that controls the lights themselves can be discovered using SSDP over UDP. However, I am unable to find a way to use UDP sockets in the portable class library (PCL). There is no System.Net.Sockets available. There is nothing in the System.Net namespace that would allow it either. I