I’m really just getting started with Sharp Tools. So far I am liking it’s useability. Many things that could be done with custom apps or JavaScript can be done with the built-in tools. I’m not a professional programmer, so I like to use the tools that the clever developers at Sharp Tools have created.
I’ve been making some Rule Engine rules lately and there are a few user-interface things that can be cumbersome and might warrant improvements someday. I’ll note what I’m seeing here and anyone who has similar GUI-related items can add to the list. When it gets big enough, a feature improvement might be warranted. To be clear, I’m talking about interface issues, not functionality. It might be better to put functionality ideas elsewhere.
Ideas I’ve noted so far:
-
Sometimes I make a rule with quite a few steps then later decide that I’d rather have a conditional statement at the top to decide whether or not to perform those steps. As far as I can see, there is no way to add an If Condition to an existing rule and I would have to make a new rule and reproduce all the steps.
-
When I find myself doing the above in #1, I think that I would like the ability to select a set of rule steps (consecutive or not) and copy them to another rule.
-
When I have a rule with many steps in it, I sometimes add a step but want it to be up within the existing steps somewhere. The drag feature allows me to do this, but I can only move the step as far as the screen shows. Going to the top does not scroll up further. So I have to drop the step in the middle, scroll, pick it up again, then drop it further up. Sometimes many times. Adding the scrolling ability would let me drag and drop just once.
-
When I’m doing #3 above, I wish that the last stepI touched would get highlighted somehow. When I drop and scroll I sometimes have trouble finding the rule again to pick it up. (especially when I minimize the viewer to get as many rows on screen as possible). I could see highlighted the last-touched rule step being handy when editing in general, as well.
-
In addition to ‘If-Condition’, ‘Action’, and ‘Delay’. the ability to add a comment would be nice. It would help keep many-step rules better organized and lets the user leave notes for future reference.
1 Like
I guess it’s just me talking to myself here… that’s okay. Here’s another:
- It does not appear that I can insert a conditional statement that encompasses existing steps. For example, I have a rule with a bunch of logic in it to allow the adjustment of a thermostat. I just added a manual override switch to the system. I want to adjust the rule to only execute if the manual switch is turned on (in automatic, you shouldn’t be adjusting anything). But if I add a conditional step and move it to the top, the other steps can’t be moved into the ‘then’ box for that new conditional step. So I have to re-write each one from scratch.
I kinda understand what you mean. It would be super cool to have an “and if” block like in Home Assistant, so the rule hits this before continuing on with the flow (basically independent of the flow). That way, you can add and remove “ifs” without disturbing the rule.
That said, there kinda are workarounds I use a lot—especially when revisiting a large rule that would take forever to recreate, and honestly, I’ve forgotten what most of it even does (basically, don’t break what’s not broken).
In those cases, I simply create another rule with the “if” statement I want to add to the existing rule. I copy the trigger from the existing rule to this new one, and then replace the trigger in the existing rule with a webhook. Then it’s as simple as adding the webhook call to the new rule with the “if” statement.
So now the existing rule is run from the new rule. I basically add webhooks to most rules.
-
Because it’s cool to run multiple rules in parallel from one rule,
-
You can run rules from within other rules at any point without duplicating stuff,
-
You can kinda test rules separately using the webhook too.
-
You Can Also Create Loops
I know this adds a potential stumbling block, but in my experience, SharpTools webhooks are a bit like your grandad when you were a kid—never let you down.
This can create a lot of clutter, and you can easily lose track of what runs what. I create categories within my SharpTools rules—this is easily done by giving the rules a sort of header. For example, using the same number, the same character, or even just a word like:
Trigger - Alarm
Trigger - Thermostat
You kinda get the drift. It makes it super simple to find trigger rules.
I hadn’t thought of that. Good idea! I was separately looking for ways to run a rule from a rule, and this fits the bill nicely.
Do you find it adds any lag-load to the execution? I suppose it’s one more trip to the cloud and back. There’s already a delay between hitting a rule button and the actual execution as displayed on screen. I don’t want to make it worse.
I still think open conditional manipulation would be appropriate for a ‘rule engine’. Maybe not top of the priority list, though.
I don’t run rules on my dashboard, but I do open Tasker dialog boxes which fire a SharpTools webhook fully loaded with parameters. These then populate dashboard variables, and I’m literally unable to blink before they’re populated — so, no.