This object is in archive! 

Has STOP in IFs stopped working?

Mattias Backman shared this problem 9 years ago
Known

Hi,


I have had to change quite a few rules that seem to have stopped working. Might be related to the internet loss of this week, or something changed in the rule processing. Anyone else seen this?


The ones that are broken are of this structure:

IF ( x ) {

STOP

}

<stuff that should happen...>


Looks like all my STOPs within IFs are happening regardless of the logical result of x, and that it started the last couple of days.

Replies (5)

photo
1

Could be


But why are you using the stop? I have over 100 rules and never use a stop.

photo
1

I have quite a few rules where I only want to continue if a condition is true. Such as blink a light if the alarm is still armed. A neat way to achieve that is to STOP if that condition is not true. The alternative is to check for the condition being true and having all the rest of the rule within the IF block. Should be the same effect but using the STOP would make for a lot cleaner and more maintainable rules.


I have checked and am now convinced that my rules that used to work have just stopped (haha) working, without me changing anything. So I smell that STOPs have changed behaviour and can't be contained within IFs?

photo
1

At least i use the stop, when i want prevent to end of rule won't run in any case, if start condition does not allow.

Let's say, if i have a rule for yard lights, which goes on when motion sensor sees motion, and then shuts them off after 5min. If i have switched them on manually, i don't want them go off, if somebody moves in the yard. My thoughts for this. So, if lights are already on, when rule starts due motion sensor, it returns(stop) right after it sees that lights was already on.

photo
1

This is actually even more weird. I looks like all IFs evaluate to try, that is

IF (Lamp A INTENSITY > 40) {

SET Lamp A Goto level 0

}

will now turn off lamp A regardless of the previous dimmer level.


Anyone else seen this? Otherwise it seems that my rules are corrupt in some way.


Can I somehow wipe the compiled rules on my box to make sure that synchronizing really overwrites them with fresh data from the graphical rules?

photo
1

To check this..i do this:

Make a new rule

Something simple and do a sync and see if it works. If it works that the sync works :)

Leave a Comment
 
Attach a file