HomeAutomationNerd Posted July 24, 2020 Share Posted July 24, 2020 The HUE App has the ability to trigger various color scenes ("Spring Blossom", "Relax", etc). Each of these scenes has a distinct (via the C4 Hue Driver) set of variables: RELAX (Via LUA Console) (Philips Hue system value) X: 0.5016 (Philips Hue system value) Y: 0.4151 (Philips Hue system value) Brightness: 144 Spring Blossom (via LUA Console) (Philips Hue system value) X: 0.4359 (Philips Hue system value) Y: 0.2811 (Philips Hue system value) Brightness: 213 ... and so on. What's the best way to Program these scenes into Control4? Here's what I've tried: Using Driver Presets. The Hue Color Group has Actions ("Store Preset 1", "Store Preset 2"). Then using a Macro, I can call "Device Specific Command | Recall Preset | 1" and so forth. Unfortunately, this doesn't seem to work at all. Using Advanced Lighting Scenes. I create a scene ("Spring Blossom"), add in the load, and then have to set 4 values (RGB+Brightness). This is different from the X/Y/Brightness settings retrieved via the LUA Console. Doing the "Get Light Levels" doesn't seem to return the right values, as if I change the values via Hue, the values fetched here don't update, so I'm skeptical. I have seen some converters on the web, but it seems generally problematic. Macros. I've created a Macro for each scene ("Spring Blossom"). That Macro looks like this: The two settings (Brightness / Set Color) seem to fight with each other resulting in weird lighting results. Do I need delays in here? What's the best way to do this? I would love an exact match with the default Hue scenes. The end result of this is that I've keypad buttons bound to a "Cycle Philips Hue Scenes" macro, and each time the button is pressed it cycles to the next scene. Quote Link to comment Share on other sites More sharing options...
lippavisual Posted July 24, 2020 Share Posted July 24, 2020 The Hue bridge doesn't work that way unfortunately. They don't have direct scene calls in their API apparently. In order to re-create the Hue scenes, you must set each bulb to the color you want. The Group driver will only tell every bulb in the group to change to a single color. That's why you're getting funky results. Use the Hue app to select your scene, then use C4 to read each bulbs info and write it down. Then when you program you put all the info in for what you want each bulb to do. Prepare for the popcorn lighting effect. Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted July 24, 2020 Author Share Posted July 24, 2020 I've got all the "per bulb" settings for each scene. That's what this is: (Philips Hue system value) X: 0.5016 (Philips Hue system value) Y: 0.4151 (Philips Hue system value) Brightness: 144 The *problem* is if I set that same data back to the group, the results are all over the map. I'm using the Driver's "Set XY Color" control point, and that's not doing what it should. Wondering if there's a better way. Quote Link to comment Share on other sites More sharing options...
Pounce Posted July 24, 2020 Share Posted July 24, 2020 If you set a bulb to a color using the cherry blossom scene from the mobile app and then fetch that color and look at the LUA what does it say? Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted July 24, 2020 Author Share Posted July 24, 2020 The "Spring Blossom" scene reports, via LUA, these three values: (Philips Hue system value) X: 0.4359 (Philips Hue system value) Y: 0.2811 (Philips Hue system value) Brightness: 213 Setting them doesn't work as it it should (see my original post). Quote Link to comment Share on other sites More sharing options...
Pounce Posted July 24, 2020 Share Posted July 24, 2020 so just 9 minutes ago, ChrisM said: The "Spring Blossom" scene reports, via LUA, these three values: (Philips Hue system value) X: 0.4359 (Philips Hue system value) Y: 0.2811 (Philips Hue system value) Brightness: 213 Setting them doesn't work as it it should (see my original post). So just before you fetched that you set the bulb color from the Hue mobile app, correct? This is an important test. Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted July 24, 2020 Author Share Posted July 24, 2020 Hah. Yes. I did that for each Hue scene, so I would know what they are. Then I created a Macro for each scent "Set MBR Hue to Spring Blossom" and so forth. That macro sets the values I discovered through the LUA Console. The problem is, the results are more-or-less random. I'm trying to figure out what people are doing, and what's most effective. Quote Link to comment Share on other sites More sharing options...
lippavisual Posted July 24, 2020 Share Posted July 24, 2020 add a 500ms delay between Hue bridge commands. Quote Link to comment Share on other sites More sharing options...
Pounce Posted July 24, 2020 Share Posted July 24, 2020 1 hour ago, ChrisM said: Hah. Yes. I did that for each Hue scene, so I would know what they are. Then I created a Macro for each scent "Set MBR Hue to Spring Blossom" and so forth. That macro sets the values I discovered through the LUA Console. The problem is, the results are more-or-less random. I'm trying to figure out what people are doing, and what's most effective. Ok, just interesting they don't include saturation. What does random mean? The color is wrong for the bulb? Is it really wrong like its green instead of one of the pinks? Curious why you are setting the brightness the way you are. Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted July 25, 2020 Author Share Posted July 25, 2020 @Pounce By Random, I mean I'll see the colors set, then the brightness will adjust and the color settings are lost. This behavior seems to continue even if/when I remove the brightness setting from the API call. I can keep debugging this (I'm sure I'll get it), but was just wondering more if there is a standard way people are doing this. It doesn't sound like there is... Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted July 26, 2020 Author Share Posted July 26, 2020 For anyone following along at home, I've gotten this working. Here's what I did: Created a Macro for each Hue Scene. ("MBR Hue Scene - Relax", "MBR Hue Scene - Spring Blossom") etc. Created a User Variable "MBRHueScene" Created a Macro to Cycle Scenes. Bound the Macro to a Button Press Event. Each Scene looks (more-or-less) exactly like this: The "Cycle" Scene couldn't be simpler, and looks like this: The problems I was having were twofold: The interaction of ramp rates with colors and brightness settings is very visually displeasing. Setting the ramp rates to zero helped quite a bit. Add "Stop" commands into my macro. Given what I do for a living, this is pretty funny, but - hey - it's a weird programming model with drag/drop from the 90s. Quote Link to comment Share on other sites More sharing options...
Pounce Posted July 26, 2020 Share Posted July 26, 2020 Just weird that your statement isn't doing x/y and brightness all together. Quote Link to comment Share on other sites More sharing options...
HomeAutomationNerd Posted August 3, 2020 Author Share Posted August 3, 2020 Just weird that your statement isn't doing x/y and brightness all together.I agree! Just... didn’t work consistently. All my hue bulbs just did a big software update at the end of July, so I’ll give it another shot. Sent from my iPhone using Tapatalk Quote Link to comment Share on other sites More sharing options...
ajmccaus Posted October 11, 2021 Share Posted October 11, 2021 On 7/24/2020 at 7:19 AM, lippavisual said: The Hue bridge doesn't work that way unfortunately. They don't have direct scene calls in their API apparently. In order to re-create the Hue scenes, you must set each bulb to the color you want. The Group driver will only tell every bulb in the group to change to a single color. That's why you're getting funky results. Use the Hue app to select your scene, then use C4 to read each bulbs info and write it down. Then when you program you put all the info in for what you want each bulb to do. Prepare for the popcorn lighting effect. Not true. The Hue API does have a single command to set a scene with a group of bulbs. That’s how it works when using the hue app. You can also send a direct HTTP PUT request to the hub via Postman or a web browser to accomplish this. Have a read through the Hue API and try it out on your own web browser with the built in REST API interface of the Hue bridge: Get Started - Philips Hue Developer Program (meethue.com) This is another example of the need to update or just plain rewrite the C4 hue driver. One HTTP GET request gives a complete JSON database of all the scenes (and their sceneIDs) set up in the Hue hub that could be parsed and saved by the driver for later recall in Composer with perfect results just like from the Hue app. Simple as pie if the driver was improved to do this. It is tragic reading through all the Hue related posts here and seeing all the time spent figuring out subpar workarounds when it could all be avoided and result in a better user experience with a simple rewrite of the Hue driver. Even worse, there is no way to make the workaround code easily copied and pasted into Composer for other similar applications. Hence the need to update the driver software. I’m happy to work with C4 or anyone else who is interested in seeing a great implementation of Hue on C4. Quote Link to comment Share on other sites More sharing options...
lippavisual Posted October 11, 2021 Share Posted October 11, 2021 What’s not true? The Hue driver is crap. Im well aware of how Hue works and their API. Quote Link to comment Share on other sites More sharing options...
ajmccaus Posted October 11, 2021 Share Posted October 11, 2021 3 hours ago, lippavisual said: What’s not true? The Hue driver is crap. Im well aware of how Hue works and their API. What’s not true is what the quoted text says: that the hue bridge is not capable of direct scene calls via an API request. The Hue API does have that capability as I mentioned, and it works great. The issue is not the Hue bridge or the API but rather the C4 driver. It would be a great benefit for the whole C4 community to have a driver that works well. Customers would benefit from a great user experience with Hue, and dealers would avoid hours of wasted time and weeks of frustration only to end up with a subpar outcome for their customers. Quote Link to comment Share on other sites More sharing options...
LollerAgent Posted October 11, 2021 Share Posted October 11, 2021 I'm sure people would pay for a more capable driver (oh, hey there @alanchow!). It would be nice if C4 just fixed the native driver though. Quote Link to comment Share on other sites More sharing options...
ajmccaus Posted October 11, 2021 Share Posted October 11, 2021 10 minutes ago, LollerAgent said: I'm sure people would pay for a more capable driver (oh, hey there @alanchow!). It would be nice if C4 just fixed the native driver though. I would pay for a good driver, and if there were functionality like circadian scheduling even better. I agree it would be great if C4 would just fix the driver. Since the driver is the better part of 9 years old however, it seems like they have little interest in doing that. What about an open source project for a C4 Hue driver? If the C4 one is free anyway then why not share the source code for the community to improve and maintain? Quote Link to comment Share on other sites More sharing options...
JEC Posted October 11, 2021 Share Posted October 11, 2021 Anyone tried this with Hue? https://drivercentral.io/platforms/control4-drivers/circadian-lighting/ Quote Link to comment Share on other sites More sharing options...
ajmccaus Posted October 11, 2021 Share Posted October 11, 2021 11 minutes ago, JEC said: Anyone tried this with Hue? https://drivercentral.io/platforms/control4-drivers/circadian-lighting/ Yes I am using the Janus circadian driver right now. I am planning to post separately on my lighting set up and will include more detail on that driver's functionality. In short it works well, but is somewhat hindered by the poor quality of the C4 Hue driver. Quote Link to comment Share on other sites More sharing options...
Bogdy Posted October 11, 2021 Share Posted October 11, 2021 5 hours ago, ajmccaus said: I would pay for a good driver, and if there were functionality like circadian scheduling even better. I agree it would be great if C4 would just fix the driver. Since the driver is the better part of 9 years old however, it seems like they have little interest in doing that. What about an open source project for a C4 Hue driver? If the C4 one is free anyway then why not share the source code for the community to improve and maintain? Try this one https://www.unilogiq.com/en/control4-drivers Let me know via PM if you would like to use the existing Hue scenes and we will provide you a demo. All the best, Bogdan Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.