Release 2.2.8 issues

The older Rule Machine and Rule 5 are not compatible. When I brought this up in Beta testing, it was (in so many words) said that these apps were so different there is no possible way to make one type import into another.

So I not sure it is so much of a bug as it is a limitation of how these work behind the scenes. I don't think there is much hope of importing one to another, and frankly Bruce is right, why would you want to?

If you are changing something like wanting to use Predicates, you probably should be rethinking (and likely rewriting) the whole thing anyway. By the time you delete, insert, and change things it isn't the old rule at that point.

Maybe Bruce would be able to put a warning in the UI that says to not try and clone or import old Rule into Rule 5?

1 Like

Another reason to move rules from 4.x to 5.0 is to use the new hub variables.

I had a feeling that was the way. I had also tried exporting and importing manually, only to get the same error so yes I ended up doing exactly that. Rewriting from scratch

As to why switch? The writing on the wall says global variables are going away once rule machine 4.1 is retired, and so one way or another any rules which use them will have to move. I'm just getting a head start on it.

No, "retired" means only that you cannot create new rules in this version. New Rule versions have been introduced several times in the past, and some people still have rules dating back to the original version. There is no reason to change your rules if everything is working fine--though wanting to test things or try new features is certainly valid in itself. :slight_smile:

7 Likes

I'm one of those people with Rules extending back years:

Screen Shot 2021-07-21 at 7.19.50 AM

One interesting element of that is... this is not the same hub as they originated on. No surprise to those that have done this as well, but those Rules were all created on a C-3 and the whole backup was restored onto a C-5 about 2 months ago. The C-3 is retired now, back in its original box. The Rules never missed a beat during or after migration.

4 Likes

If so, this is a bug. It should only list the rules for that particular parent.

Checked, this is not the case. Rule Machine Legacy only offers its child rules for export/import/clone, and likewise Rule Machine only offers Rule 5.0 rules for that.

And, as documented in the release notes, it is not possible to import Rule-4.1 rules into Rule Machine:

1 Like

Yes thanks Bruce. I can confirm now after updating to 2.2.8.138 that it is listing rules available to clone as you have stated. The original post was under 2.2.8.136.and it was showing all rules at the time. But no longer.

Ok but when legacy is retired, will there still be global variables for those 4.1 and older rules? I had thought that once the app is gone they'll go with it. If not then it'll save me alot of unnecessary work.

I had a couple of Global Variables setup for regression testing of HubConnect but maybe a week or two ago I deleted a lot of the structure of my test environment... ST was blown away, and Global Variables. I guess it's just too much fun to discard things :slight_smile:

Again, "retirement" just means that you won't be able to install it as new. Existing installations will not break. So, as long as you keep Rule Machine Legacy (the parent app) around, global variables will continue to work. That is where they are stored. And you can't remove the parent app without removing all child apps in the process--the child apps being rules (verison 4.x and older)--so there's no need to worry about these two items separately. Unless you accidentally remove it and disregard the warning in the UI that will also remove all rules, of course. :slight_smile:

2 Likes

Hi @bravenel
I think I have found an issue with the UI.
I haven't actually tested that it is cancelling ok but thought I would let you know.

I have selected a switch to turn off with a delay that is cancelable.
When cancelable is selected it shows up ok.

Summary

image

When I click done the next screen doesn't show the cancelable text.

Summary

image

It is also missing from the next screen.

Summary

image

EDIT: I've just tested and it doesn't appear to be cancelling the delay.

1 Like

I will look into this.

Yeah, baby got thrown out with the bath water on this one... Fixed...

6 Likes

Hi @bravenel
I'm not sure the issue has been fixed.
Here is the rule I have set up.

Summary

image

As you can see it now reports that the 'off' is cancelable.
When the sensor goes inactive the 'delayedActCancel' appears in the scheduled jobs.

Summary

Unfortunately if the device become active again before the timer expires, the job doesn't actually cancel and remains in the job list and then the switch duly turns off.

You aren't cancelling the delay anywhere. ?? What would cancel it?

Afraid not. I just set this rule up to test the fix and this is what I'm seeing.

Edit. Now going out. If needed I can set up full logging tomorrow to gather more info.

@bobbles

Don't you have to have this?

image

At least I always have had to.

You don't really need a 'cancelable' delay (although you can). The way to do this is use 'Wait for Elapsed Time' to get the delay. Like all Waits, it is cancelled automatically if the rule is triggered.

2 Likes

Hey Bruce, I'm interested in how you would have written this rule - can you list the actions?

Same as above, just remove Cancel Delayed Actions; remove the delayed from the Off.

After Wait for event Motion, add Wait for Elapsed Time 30:00

Thanks. On another note - and I'm sure you have already said it...

Is it possible to export Rule 4.0/4.1 rules then import them into Rule 5.0?