Hues go to 100% brightness before going to set level

Come across a issue that has just started happening and can't seem to work out the cause.

I have the following rule which sets the study hue lights to a set brightness depending on the time of day.

In the highlighted area, between midnight and 6am it activates the following scene which is set at 20% brightness.

However everytime the motion sensor is triggered between midnight and 6am, the lights first go up to 100%, and then back to 20%. So while I'm at my desk the lights repeatedly go to 100% then back to 20% every few seconds (while I'm sitting at the desk the motion sensor will often go inactive and then active as I am not moving). Logs for one of the lights in the scene below show it being set to100% then back again:

image

I've tried adjusting the rule to set each light directly to 20% rather than through a scene but the same thing happens. Any advice as to what I might be doing wrong would be appreciated.

All hues are linked to a Hue bridge then to Hubitat.

[Edit: Just a quick note that there are no other rules changing the lights. E.g. If I "pause" the above rule, the lights no longer turn on]

Cheers.

I may be having a similar issue, but mostly for one down light. I'll read through your post in more detail and do some investigation of my own before reporting back

my hue light works fine but the rule is on motion lighting and the bulbs are direct on the hue hub not hubitat. how are yours hooked up?

1 Like

I have mine paired to the hue bridge and integrated with he through the advanced hue integration. I'm pretty sure I am triggering a scene on the hue bridge, bud will need to double-check

1 Like

My Hues are also on the hue hub but the rule is running in RM5. Its an old rule running on 4.1 and has been working fine up until recently. However I am a constant tinker of rules so I am always changing them.

ya weird.. if it went to 100% in the middle of the night that would be annoying.. are you sure it is not coming on with the last brightness the bulb was at before dimming, that coiuld be expected..

If so you may want to write a rule to set the dimming level whenever they are turned off.

I should add mine does not stay at that level, it flashes bright and then goes to the right level

In my experience, this is normal with Hue bulbs when controlled via the Hue API, as any Hubitat integration uses. The exception is when recalling scenes, which the Hue app or third party Hubitat integrations (not the built-in one) can do--that seems to be the only way to get them to turn on directly as configured without a brief hint of their previous level.

What I'm not sure of, then, is the implication that this ever worked as described above. :slight_smile: I wrote my own integration and no longer use Hubitat's, but the API calls are similar and probably won't affect the outcome...

I've done a little more problem solving and it appears it is being caused by something in the rule. I've paused that rule and made the following simple rule in RM5.1 and it is working fine - turns on at the 20% level rather than flashing bright to 100% then going to 20%. I'll rebuild the entire rule in RM5.1 and see if it goes away.

1 Like

Maybe I’m misunderstanding, but using your Hue integration I don’t see this happening with my Hue lights. I only have one area left in my house that is using Hue scenes, the rest are setlevel commands in BC and ML apps (with Apple’s Adaptive Lighting for CT transition). I never see them do anything but come on at the requested level.

I am getting some odd behaviour, but I'll post my questions elsewhere, as I expect it may be unrelated to this thread.

You could be right....this is just what I remember from a while back. :joy:

1 Like

I think I've worked out the problem after re-writing the rule and watching the logs.

I believe the error is in my conditional rule which I've circled below:

I don't think I used the "and" "or" condition correctly. In the circled area my intention was that to trigger if the following two conditions were met:

  1. Any of the motion sensor and vibration sensor active; and
  2. time between 6:01 and 23:59,

then set the lights at 100%.

However I think the condition instead operated as follows:

  1. Motion Sensor Active; or
  2. Vibration Sensor Active and time between 6:01 and 23:59,

then lights 100%.

Then the rule would go on to the 20% setting as that condition was also met.

So it appears that the culprit is my poor understanding of the use of and/or in conditions.

Thanks everyone for your assistance and advice. It helped me to not only identify the problem, but also improve my understanding of conditions.

The parentheses conditional in RM is your friend and it seems that it must be explicitly utilized (RM in my experience does not seem to follow arithmetic rules of how functions are executed). I had to go back at one time and make sure all my rules had the conditions explicitly grouped by (xxx OR yyy) AND zzz which works differently than xxx OR (yyy AND zzz) as I was having similar problems when I first started using RM.

1 Like

Rule Machine treats AND and OR with equal precedence, left to right.

2 Likes

interesting i always though logical and had higher precidence than or.. good to know.

Am I misinterpreting my use of parentheses in my conditionals? I thought that my two examples would exhibit different logical characteristics. Please clarify. Thanks for the info!

1 Like

Your first example, (xxx OR yyy) AND zzz, should be the same with or without parentheses. Your second would be different, which is the part I could see tripping some people up since in many programming languages, AND has precedence over OR (but again, not in RM--it's just left-to-right by default).

3 Likes

Thank you! That’s what I thought. Always helpful!