It would be great to have a way to select a device and see what rules the device belongs to. This helps with troubleshooting in regards to possible “rule clash”, and other issues. With SmartThings it was possible to see this in the IDE with both regular “rules” from the old app (classic), or with WebCORE pistons that a device might belong to.
As far as I can see there’s no easy way to see what SharpTools rule a device belongs to. Thank you!
For example, today I have to replace a Zigbee bulb that has finally kicked the can after 6 years. If there was an easy way to “replace” the device in SmartThings new EDGE platform I would use that, but alas there is not. So I need to add the new bulb, and manually update all rules… The thingis I’m not exactly sure what all of the rules are that it could belong to… it’s painful.
Second example, I created a SmartThings automation, which was similar to a SharpTools rule and accidentally included the wrong device in my SharpTools rule… it took me an hour to figure it out because I wasn’t even thinking it was included in the rule that was affecting it.
I can see this as something which is listed when viewing a device’s details in the area found under “View Account / Manage Location / [device name]”
In the same vein, I’m trying to clean up my variables and it would be nice to see which variables are attached to which rules in the manage variables screen or something like that. I’m adding a vote to this.
I would add this would really help in the situation you replace a sensor, or are migrating from for example an old virtual switch to a new edge enabled virtual switch. Examples, I replace a motion sensor due to it being faulty, or I move from a virtual/simulated switch to and edge device. To me it would make sense to simply add a section to Account-Location-Things. When you pick a Thing today you get Capabilities, Attribute Values, Commands, Simply add a Rules/Used in rules section.
Thanks for the example use case with replacing a sensor.
If only it were a matter of “simply”! While I haven’t done a deep dive on the technical analysis of this particular request, at surface glance we would need some way of tracking and retrieving the associations in an efficient way. Currently, the rule only knows about the devices/variables within the flow at runtime and it wouldn’t be particularly efficient to query all the rules and parse each one looking for a particular device identifier. Depending on the approach taken, there could also be other complexities of maintaining the device associations and making sure they are up-to-date… or challenges with backwards compatibility for existing rules.
We appreciate the example use-case and as this continues to gather more votes, we’ll eventually do a deeper analysis and see what options we have.
Well that explains the other extremely frustrating item. When you replace a sensor, there is nothing in the rule engine to indicate the rule is no longer good (i.e. the trigger sensor is no longer valid). Example, trigger is this Mudroom Motion - motion changes to ‘active’. The rule will no longer trigger (because you have replaced the Mudroom Motion, but the rule still has the original description) which looks valid, you edit the rule it looks valid (Mudroom Motion - motion changes to ‘active’, but if you edit the trigger, you will notice in select device that no devices are selected (the original device was removed). You simply pick the new device and it fixes it. It would be great if either the rule was flagged (invalid device being used), and if the rule editor highlighted no longer valid statements.
After going through this again an out of the box idea. Add the ability to print a rule, and at the rule engine, an option to print all rules (just print each rule into 1 output). Print would generate a simple text file kind of like
Rule: Name
Trigger: trigger clause
Flow : flow clause
This would enable somebody wanting to find where something is used to get 1 file, by printing at the rule engine, that they could simply search in.
I’d like to bump this again, as I know I have “dead” devices that I’ve replaced but finding what rules they are in so I can select the “replacement” device is a huge chore. At least an indication that the rule has a missing device would be a first step.
Thinking this is still a good idea. Just curious how many votes are needed to move a feature request…
While I’m NOT implying this would be “simple” to automate, I’m wondering if this could be incorporated to the search. I have a list of all my devices, even virtual devices in excel. If I search using " " I seem to get the associated rules. I’m not positive I’m getting them all so any feedback would be helpful.
2 rules in my [LIGHTING] category and 2 rules that set a variable [V].
It goes without saying that a native way to do this would be best, but if anyone is interested in setting up your own way of doing this, Ability to see what rules a device belongs to , you can make your own Excel Spreadsheet and set it up so every device and variable that is in each rule can be tracked across the sheet. I have 185 rules, so the first part is a bit painful. (rainy day project). After you do the heavy lifting, adding things one at a time is not so bad. You need to capture the name of all your rules and put them in Column “A” on Sheet1. (Get them from SharpTools). Then you need to capture each device and variable that is used in that rule and put them in the cells to the right. Then capture ALL of your devices and variables, (you can copy/paste from SharpTools), and put them in a list with no duplicates and no spaces on Sheet2. You may need to manually add things like Pushover because that won’t be in your list of “things” in SharpTools. Then you will conditionally format Sheet1 to highlight what you select in the box in cell A1. Every rule that is associated with the device or variable you selected will be highlighted. Right click any highlighted cell and select filter by color. You will then have just those rules. In my video, I’m looking for all the rules that my “Steps Motion” is associated with.