[2.4.1.153] RM Rule - Hub Variable unchanged despite what is logged [fixed in 2.4.155]

I've come home after a night out and a few beers so I hope I've not missed something obvious here. I have a rule for each room that sets a hub variable 'roomDark' true when the lux falls below 50 OR the curtain closes in that room. None of those rules are working now. I turned on logs for this rule as it failed yesterday but I assumed that was down to me updating rebooting at an inopportune time (I made a point of resetting the HV's this morning so that the rule should have triggered correctly this evening). Here is the rule (captured when it is dark, hence the 'False' for the required expression):

(I'm not sure why %text% shows 1280 as it is 0)

There is nothing logged despite logs being on. It did not trigger. The curtain in the rule closed and shows 'closed' in the states, the illuminance went to 0 on the rear multi sensor (I have the value overlaid on my cameras so I know this dropped and reported normally)

@bravenel - this is one of the rules with a wait from a couple of days ago that filled the logs with errors until I clicked 'Done'. There are no errors now, however I've 4 rules identical to this that aren't working (one for Dining Room, Kitchen, Study and Dressing room)

Our of curiosity… Why do you have an Illuminance trigger for <=50? It will never trigger since you have a required expression that excludes that possibility (>50)…

The only time the rule will trigger is when the curtains get closed after illuminance is >50.

1 Like

Face Palm What GIF by SWR3

Bugger - I should've predicted that. I always get asked this. It's how you trigger crossing a threshold without repeated triggers. The required expression is false when greater than 50. When a value is reported that is equal to or less than 50, the required expression is true and it triggers. It's worked for several years and never failed. Every time I have an issue with a rule that uses this logic there's a post 'that won't work' but it does. Last time around I had to create a dummy rule like this, trigger it and produce logs for the naysayers. They still didn't believe me. (amazingly there are people in the US currently believing that there's a daily alarm here in the UK. When it sounds we have to go into the nearest house and drink a cup of tea or get fined.....seriously)

Try it - you might like it!

2 Likes

Well, I’m not in the US, so although I do believe that people in the UK drink more tea than people in the US, I’ve never heard of this bell thing! Lol

That said, I would love to see those logs showing that the illuminance triggered this rule!

I just had to try it for myself, and created a test rule that replicates the Required Expression and Illuminance trigger. It never triggered for me, as evidenced by the logs below. I would love to see how it is actually possible to trigger such a rule (with the Illuminance, not the closing of the shades).

My test rule:

The resulting logs:

Looks like you found a breaking change in 2.4.1.x.

This "threshold" use-case has been discussed many times in these forums (Bruce himself explained why it works) and was working in the last 2.4.0.x release. Try it for yourself if you can - I just did. I also can confirm I see the same (broken IMO) behaviour as you in 2.4.1.154.

@bravenel

1 Like

Interesting - I just downgraded to 2.4.0.123 and ran the same rule. It behaved differently than it does now:

In my opinion, the behaviour in 2.4.1.154 is accurate, but I can see how the previous behaviour had its benefits. Maybe a switch should be added to allow for the previous behaviour to occur… Not sure how to properly describe it though… getting to late…

1 Like

Yeah, I can see this too. Not at all sure yet what's going on. Looking into it.

Update: Found the problem; fix in next release.

7 Likes

Great - thanks for confirming. My rule collection has been quite the bug finder this week!

1 Like

Fix for this bug is in Release 2.4.1.155. You must open each affected rule and hit Done or Update Rule. Only those rules with overlaps between Required Expression and Triggers need this step.

1 Like

Great thanks. I've updated the platform version. After installing .155 I checked the logs first and can see the affected rules logged an error:

I guess that's expected.

I've now gone through each of the rules and clicked 'Done' to initialise them. The affected rules should trigger around sunset UK time, so I'll confirm everything is ok later.

Fix confirmed all rules triggered correctly again this evening :+1:

2 Likes

All the affected rules failed to trigger tonight. I've not a clue what's going on anymore as I've lost track. No logs, so no proof. As these hub variables are referenced in each rooms RL instance, when this happens I have to go into settings and manually switch the hub variables to get the lights working.

I'll turn on logging for one of the rules and open another post after the next platform is loaded if it continues.

Please show just one of the rules that failed, and it's Event Subscriptions.

This was the first one I noticed for the Kitchen. Please keep in mind I'm still on 2.4.155 in case that makes a difference:

There's a bug with variable comparison triggers, reported elsewhere earlier. Fix for that is done, and coming in next release. Failed rules will need Update or Done, but not ones that have RE false, like this one you showed.

Thanks for checking Bruce. I did wonder when I read the other threads but didn't want to assume incorrectly and pollute those posts. As they're external lux dependent the status of the RE will depend on what time of day I update but I'll keep that in mind.

It would help more if you could show a rule with either no RE, or RE true, along with its Event Subscriptions. When RE is false, there are no trigger Event Subscriptions, so can't see the problem.

OK. As they're all similar and it's dark now, all are RE false. In the morning I'll screenshot a rule and its event subscriptions while it's RE is true and before I install .157 in case it provides any info that may be needed later.

No need.

1 Like

Flashlight (aka torch) available? :slight_smile: I can't stand the suspense... :wink:

2 Likes