Bug in RM [or user mistake]

Don't know how to describe this bug better than with this video, sorry.

https://www.cloudhq.net/screencast/0665b17d73.webm

If you select the field with your mouse can you change the selection with your arrow keys on the keyboard?

Yes and this is how I eventually got it to work. This was clearly triggered by something I had done wrong somewhere in this app right before, even though I'm not sure what. I still thought it could be useful to report it.

Also, I just had to put my hub in safe mode because I noticed that when I'm working on a RM rule and adding somewhat inconsistent modifications, the rule is being updated even though I'm not done editing and that can cause the hub to become unresponsive.

@bravenel, I also noticed that even when paused, all the conditions are being checked, even though, of course, they're all skipped, at least from what I can see in the logs; this is also a cause for issues in regard to the fact that sometimes I'm really fooling around while editing... Do you think it to be possible to make sure a rule doesn't run at all when being edited?

Don't know what was happening... I could really see the conditions being checked after pausing the app, but after a clean reboot I can see the app, while being paused, doesn't log. DOn't know what went wrong.

I would suggest this is a tricky one purely because if I was editing an existing rule, I would want it to carry on being evaluated. Imagine if you leave a rule open by mistake or were to leave it open and go and make a cuppa then the rule may need to be evaluated for your automations to carry on working.
The best way I have found is to copy a rule and then edit that.
You can then toggle between the two by using the pause button to make sure you get it working as you wish. When happy, just delete the one you no longer need.

As with all these things, I suppose we will never have things that suit everybody. :):thinking:
Just my observation.
All the best.

There is actually no way to know this is happening at any given instant. You can always pause a rule if you need to. Your observation about conditions being checked is not correct. Restrictions are checked, and if paused, the rule exits. But, Restrictions are being retired. It will still check if it's paused when any trigger event happens, and exit immediately if paused.

So would I. My point is that it is updated with every condition I change while I'm changing it. Now, it would take a set of screen casts videos to show that happening live, but I heard it is bad practice to send videos instead of screenshots. I'm not going to spend more time on this. What I'm talking about is easily falsifiable, hence testable.

@bravenel

I get it about rules being checked and exited immediately, which answers one of my two concerns.

Now, for what regards the other concern, that is rules being updated while still being edited, what I can tell you is that it just happened again. I have an AC controlled through a switch within a rule named "AC closet management" (don't know if you can access it through my online profile though) and, as I modify/delete some conditions without which the switch would, for example, turn off, it turns off. As I said in an earlier post, it is quite easy to reproduce. Set a rule to turn on/off a switch under certain conditions with a proper frequent trigger that can be activated while you're editing, like a highly sensitive motion sensor, then go to edit the action and select "erase expression", then trigger the trigger and then see if the condition still applies while you haven't pressed the "update" button whatsoever.

As I said, it is not possible for a rule to know that it is being edited and behave differently. Just pause the rule if this is an issue.

1 Like

Well, as last time I reported a bug, you seem pretty stubborn for what regards your baby RM haha! I wish I could see your face when you watch this screen cast! LMAO -

"https://www.cloudhq.net/screencast/f94940fea4.webm

Boring.

It's not stubborn, it's simply a fact. I don't understand why you disbelieve what I've explained twice now -- that it is not possible programmatically for a rule to know that it is being edited so as to automatically pause itself and then know when it should resume. This isn't a bug. Just pause the rule if you have a problem with this, as you do know what is going on. It is one button click to Pause. Rules are event driven, and if events are thrown at an installed rule, I don't know what else you would expect to happen.

Anyone can create a rule that misbehaves due to what they do to it. You get a prize for demonstrating that.

Tell me, do you edit code of software while it's running? Do you expect that to work?

Tell me, do you edit code of software while it's running? Do you expect that to work?

Well, at least it doesn't apply new conditions and modifications while editing... It has to be saved first. What my video shows you is clearly that RM applies new conditions as they get entered. When I edit my code, it has to be saved before the new version is applied to currently running instances. This part, I'm having a hard time to understand when you state that it is impossible for the app to know that it is being edited. Well, it should be possible for the app to be run without new modifications until new update. At least this is how all apps I create work... not that, in all honesty, I'd want to compare my level as a programmer to yours in any way. I think we just misunderstand about the matter of the isssue, that's all. You seem to think that I wish the app knew it was being edited, and it may be due to my previous phrasing. What I'm saying is that it should not modify currently running instances of the rule until the new edition is updated and saved as such. Otherwise it is taking the risk to crash the hub while editing, which is the very issue I faced when I created this post.

Now, maybe the point where I'm getting lost is the fact that you're talking about a rule within the app and not an app per-se.

You are both right in a way. Yes, it is not possible in this configuration of OS and the rest of the system to make it different then what is is right now. At least not without redesigning the whole system, which would be a pain because you would want backwards compatibility. So that's why it is what it is. Though maybe it is possible to add a button with a double role "pause and edit" this rule. Because not everybody would want to pause a rule when editing.

Besides that you do want the form to submit on every change so you can see the "result" in the listing. If it wouldn't submit between edited fields it would be a pain because you would have to remember the changes you've made to it until you submit manually.

All things together it is not easy to create a system which is perfect. And if you do want a system which is perfect, I think you'd have to settle with almost no innovation. And since HA is still in an early stage of innovation I would think that that would not be a good thing. So I much rather have a system with some (less then others, if you ask me) quirks, then a system with a lot of old and conservative possibilities.

1 Like

When editing the rule you are modifying its script directly. Pretty much like editing running code in RAM. It doesn't use some other storage where a rule's script is kept until you hit Done. Just pause the rule if this is an issue.

Perhaps it could work as you expect by using a separate copy that is "loaded" when you hit Done. But there would still be an issue with the running rule and what state it is in at the moment you hit Done. There are pros and cons to both approaches.

1 Like

Another bug in RM:

https://www.cloudhq.net/screencast/800c984b129a76.webm

Previously mentioned bug fixed with last release, but still several issues remain. Here is what is just an example among other issues rendering RM painful:

https://www.cloudhq.net/screencast/5829dd4b757ce1.webm

I know that you think showing a video is the way to report something, but I can't tell from your video what you think you're reporting. If you really want me to look into it, you're going to have to show the actions section of rule in a screenshot, and describe the specific sequence of steps that you think doesn't work. I'm happy to look into any issue, but videos don't work for me most of the time.

2 Likes

Another one here:

https://www.cloudhq.net/screencast/1c5992493042a6.webm

And here is a screenshot showing that after selecting "edit action" (the one encircled in black), the menus won't show:

in other words, now, whenever I need to edit a conditional action, I have to delete it then rebuild it.

I've run into this. Refreshing the page fixes it.

not for me

That's because you haven't clicked on the one choice available to you: Done with this action. For certain actions, ones that have no extra content such as END-IF, the only choice when you create it or edit it is to hit Done with this action. When you do that, the normal selection of choices to add, insert, edit, delete actions will reappear.

2 Likes