Bug: rule editing stuck when invalid config


#1

I somehow managed to save a rule where tCapab5 is set, tstate5 is present and empty, tCapab6 is present and empty, tstate6 is absent.

Since then, the configuration interface for that rule doesn't show any widget .
The rule, however, works.


#2

Ah, probably you edited the rule after you'd created it in some way that got it messed up. I've been meaning to document this issue.

If you're going to modify the structure of a rule in any significant way, for example removing a condition, I recommend that you simply remove the rule and start a new one. If the rule is so ganked up that you can't even edit it, you can remove it from the app details page for that rule.


#3

Will do but please add input validation :stuck_out_tongue:


#4

Below are some Rule editing guidelines. Do you really want our time invested in preventing rule editing errors, versus new apps/features etc? It's certainly doable, but not a small undertaking.

The biggest thing to bear in mind is to never remove any condition or trigger event except the last one (work backwards). You can edit any condition or trigger event all you want, but removing one other than the last one is going to bust it. Whenever conditions are edited, the rule needs to be revisited unless there is only one condition. Actions can be edited all you want.


#5

I don't want to sound harsh but, yes. Input validation is the fundamental of all web apps and it will have two very important results in the long time:

  • will save you valuable support time (even more as you will probably grow more than linearly)
  • will give you a rock solid product
  • will likely help prevent security issues

hundreds of semi working or unreliable features will be a pain to maintain.

The editing rules that you described might be a sign of a rule storage format that you will have to change sooner or later, or it will haunt you like a ghost. Been there, done that :wink:


#6

The artifact of an app written a few years ago, when I was a youngster... Trust me, I just spent many hours removing another latent weakness. All in due course...


#7

I do trust you. Habitat looks very promising. And let me also thank you all for all your efforts!


#8

I ran into the same issue. I wasn't sure if the rule would keep working and see an error when trying to edit the rule. Fortunately, I am new enough to Hubitat (which is being referred to as HE?) that I deleted the rule machine and started over.

I have read your later posts in this thread and understand the commitment needed to eliminate all possible errors. However, I do agree with dwery, in that a stable platform is ideal before you expand your customer base and become overwhelmed with requests.

As a work around, I would like to suggest/request that a method to remove rules is added where the user does not have to open the rule. Having a rule that I can't view or modify would haunt me and as I get past the initial setup. The idea of having to remove all rules is very unappealing. Having said that I'm beginning to thing I need to look into the backup features that are setup. That might be the ideal solution for now. I welcome your thoughts and appreciate all that you, the team, and community have done.


#9

This is already possible. Open the app status page for the rule in question (gear icon from app list left of the rule). At the bottom is a button to remove the rule.


#10

HE = Hubitat Elevation, the proper name for the hub. :slight_smile:


#11

When selecting the gear icon the option at the bottom is a button that says "Remove App". I was afraid this would remove the Rule Machine and not just the rule that contained the error since on the rule page the button simply says "Remove". It may be the the button name needs to be changed on the status page to avoid confusion.


#12

Doh! I've been so overwhelmed the last couple of days with just thinking of the possibilities after coming over from Iris that I hadn't even paid attention to the full name. In the last two days I have setup a simple dashboard and migrated what components would work with HE over. I'm so glad Iris forced my hand into finally finding a better solution. I'm absolutely loving HE!


#13

Excellent news.

But we are still here to help :frowning: .. maybe throw us some ground balls or something??

:smiley: :smiley: