First go at motion detection -> lights on if luminance < 50, epic fail

First attempt, did some searching but this seems so basic it should work (but it doesn't seem to).

Attempted rule: IF hue motion sensor detections motion THEN turn on group KitchenHobLights (IF luminance <10); IF hue motion senor inactive for 5 min THEN turn off. (basically the rule explained on youtube by hubitat staff, but with one single variation of luminance value).

I attempted to add the necessary screenshots for the below but I get this brilliant "can't embed media items in a post".

  1. The rule as shown on screen:
    When Hue1 activates ...
    Turn on KitchenHobLights
    Wait until Hue1 motion stops and stays inactive for 1 minute, then ...
    Turn off KitchenHobLights

  2. Present luminance
    Luminance rule, if =>10

  3. Optional restriction on the rule builder screen
    Known to all, you hit this one to add a restriction

  4. The optional restriction
    The restriction screen where I first input >50 and on a second attempt >10

  5. Optional restriction after clicking done
    When you click "done" after adding the value in step 4. , you get stuck in the optional restriction dialog with only a cancel button (bottom right hand corner) - no way out.

The problems I have are:

  1. The lights turn on, but never off. After a while, I see the following in the logs evt: "Hue1 motion stayed inactive, wait over", but nothing happens, next event is act: Wait Until, after that I only see events like Hue1 illuminance is 13 Lux
  2. Even with a luminance that is significantly above treshold, the lights still turn on on detection of movement
  3. After adding this value for luminance and clicking done, you get stuck on a screen where the only button is "cancel" . There is no way out, and if I get out by going to the apps dialog, the rule on the screen never shows the condition related to luminance being added.

I tried another browser (first firefox then safari), makes no difference.

What am I missing?

Cheers,

G.

You need to join the owners group (Hub owners - Hubitat) to be able to embed media.

2 Likes

Welcome aboard. You can overcome this restriction by joining the "Owners" group (Hub owners - Hubitat).

Do you mind sharing the app name, the browser used and the hub model?

I am pretty sure this was probably a typo, but you've mentioned that your condition was "IF luminance <10" but in your details you mentioned if =>10, >50... Did you use greater or lower? Sharing screenshot of the rule may help, so when you have a chance, please join the owners group.

Wouldn't the more simple app Motion Light work. already has an option for Lux....

My example.....including a virtual switch that disables the motion activation...

2 Likes

For Rule Machine, this is how I would write it.

Required Expression: luminance equal to or less than 10
Triggers: Motion sensor active, Motion sensor inactive and stays for 5 minutes
Action:
If motion, turn on kitchen lights
else, turn off kitchen lights.

Thanks for your reply, I added myself to the group.

  1. Rule only runs when luminance is equal to or lower than 10 (I first tried with 50). (in other words, if dark enough, the rule runs)
  2. Running firefox on MacOS13.5.2 Hub version 2.3.5.152;
  3. Using basic rule app
  • It seems clear that the luminance condition is never taken into account because it doesn't appear in the condition at the top.
  • even if the luminance condition is "hidden" in there, the light still doesn't turn off for this very stupid/simple rule; I don't think the luminance condition can cause this to happen
  • I appreciate being able to use other rule sets - but nevertheless something as basic as this should work no?

Kind regards,

G.

I was also going to suggest Motion Lighting. I probably have 20 ML rules, some using illuminance. It works perfectly, but I use 2 of my Hue outdoor motion sensors (that aren't under an outside light source) for lux measurement and average them into an "average outdoor lux" device for using in the ML rules.

1 Like

Having a spot of bother with the edits. Anyway, I would like this basic rule problem resolved. Telling me to go somewhere driving backwards is fine, but I would like to fix driving forwards first ...

  1. This is the rule

  2. Then I select this one

  3. Here I go for the illuminance and click done

  4. This brings me back here with no way out

  5. The log is here

  6. Detection of illuminance is fine
    Luminance Hue

Obviously the steps with illuminance do not alter the rule under point 1.

Ideas to resolve the basic rule problem most welcome.

Kind regards,

G.

you need to change restrict trigger and pending actions to restrict the trigger only, thats why the light isn't turning off...

Motion Lighting <-Think Really Simple
Some find Rule manager is not intuitive for all with triggers and conditions and actions

If you really want to do a rule manager instead something like this is what you seek

Thank you, that resolves it. Guess this is as intuitive as SAP ... Will have to get used to the idiosyncracies. Also resolves the issue of not getting out of the dialog. Kind regards, G.

2 Likes

Can you try Chrome? Firefox may be the problem, as it doesn't look like clicking "Done" actually saves the luminance restriction. Here is how the rule should look if the restriction was active (I tried with Chrome and didn't experience the same issue):

Under the restriction, toggle the "Restrict trigger"

I guess i need to step out of this discussion as I didn't even know Basic Rule app even exists... :rofl:

Most of my Rules are still In Rules 4.0 format. These guys created to many ways to do the same thing, and all three ways are a solution to the same issue

You should try it. It's a quick, simple but powerful app. It runs 50% of my production hub.

Hi Bobby,

Thx for the follow up, as per my previous note, this is now resolved with the post of Mike Maxwell.

Everything working fine, and I now have a rule with the additional line for illuminance (like your example).

Kind regards,

G.

2 Likes

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.