How to raise color temperature over time using Rule Machine?

Hi all,

I cannot figure out what caused the error below. Any ideas/advices are welcomed. Thank you.

image


Edited to add clarification that Circadian Control CT is a hub variable:
image

I've had apps just starting holding on to stuff and doing weird things. I've found pausing and restoring doesn't help in most cases, maybe hitting done in the app can help. You can always reboot the hub as a sure way to make the app totally close and restart cleanly, and it might resolve something like this.

1 Like

What driver are you using for "Circadian Control CT"?

2 Likes

Depending on why you are changing CT over time the new Adaptive Lighting app may also meet your needs as well.

it is a global variable
image

Thank you for the suggestion. I have just tried, but unfortunately does not resolve the error.

I am setting global variables (1 for CT, 1 for Level) that change based on sunset/sunrise timing. My other lights will update CT and Level based on those variables. Currently, only the Level rule works for me

Your screenshot doesn't show global variables, but it does show hub variables (if you are new, yes, they are different :slight_smile: ). However, your rule cannot use a hub variable in the location shown. Since that's not it, I assume you mean that you're using the variable connector? If so, that is a device, and the fact that it's using the connector driver is what I was looking for. (If not: what is happening?)

For the actual problem: does running "Set Color Temperature" once from the device detail page (for the connector device) fix this problem? I think it's confused between numeric and string values, and I could see how this would happen, and this should fix that. Manually setting the actual variable value in the table might work, too. If it comes back, does anything else ever set the value of this device and cause the problem afterwards? Also, if your only use is the connector device and not the variable, a virtual device would work around the problem for now if the cause is correct.

ahh it is called a Hub Variable. Ok, got it. Yes, I am using the variable connector.

I am still not very used to the terms used. Apologies for any confusion caused.

I just tried your suggestion to set color temperature at its device page - it updated the hub variable, so that means the set value worked. However, when I run the RM rule, it encountered the same error...

Edit: The other real lights are relying on the Hub Variable for CT value.

Just for testing, does it work if you use a Virtual CT Bulb (or Virtual RGBW Bulb or anything else compatible) instead of the connector? This would be an easy way to see if my guess at the cause is correct.

Yes, the same rule work on a Virtual CT Bulb.

Thanks for testing!

Did you also try setting the value from the variable table? (Click the number in the "Value" column.) I have an idea for how to fix what you're seeing now, but I'm not sure where this problem would have started or why the device detail page wouldn't fix it, and it's possible this won't, either. But for now: it's probably all you can do.

Yes, I did try setting it directly at the variable table, and that works, but did not fix the RM rule error. My intended use case is for a gradual change in CT over time upon sunset/sunrise trigger, so a manual setting of value is not preferred.

My definition of "working" was one where it fixed the rule; there should never be a question of whether setting the value of a variable from the table, the connector from the device detail page, or ultimately the value of a variable itself from the connector works -- at least not if there are fundamental problems with these features that have been around for a while now. :smiley: So sounds like we are in agreement there!

A future platform build will likely have a fix for this with the variable connector device.

Alright. Thank you for the prompt responses. Will keep a lookout for these changes in the future.

Meanwhile, I will try to find workarounds.

The new adaptive lighting app can perform this task for you. You can select the light device that it will adjust while active and then also have it update the variable you have already. Then in RM have it simply set the CT from the variable. RM when seting the CT can use the hub variable directly. This would eliminate the need for the connector device which i think is prefered.

1 Like

Thank you. I will explore that idea. I currently have a “Override Virtual Light” that pauses the rules and force set the hub variables to its device attributes. I may end up with 2 virtual lights to reach the intended outcome. Excited to try it out later.