Core Functionality Similar to "Super Conditions" Plugin

Posted on
Sun Apr 16, 2023 12:12 am
MontyPySpock offline
Posts: 6
Joined: Dec 12, 2021

Core Functionality Similar to "Super Conditions" Plugin

With the (awesome new) changes to Indigo stopping support for older plugins like Super Conditions, and with the developer of that plugin (Colorado4Wheeler) no longer developing their plugins for Indigo, I wondered if implementing similar functionality to what the plugin provides as core functionality is on the dev radar.

I was always surprised that a plugin like Super Conditions was necessary in an otherwise sophisticated app like Indigo: there are a lot of situations that require that kind of If/Then/Else functionality, and it always seemed like something that should be built into the core app. The availability of the plugin made it not a big deal...but with the next version of Indigo that's no longer the case.

So with Super Conditions on life support and the clock ticking, it seems like the time to build that functionality into the next version of Indigo.

Posted on
Sun Apr 16, 2023 6:24 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Core Functionality Similar to "Super Conditions" Plugin

I took a quick look at the Super Conditions repo and it doesn't appear to be open sourced (I didn't spot a license) so that plugin may be EOL.

I never used that plugin myself, and instead use Indigo's built-in "If Python script returns True" feature which allows for almost limitless conditions. I get that not everyone wants to learn Python, but the logical fundamentals are pretty approachable in my opinion. In fact, this is pretty much what the plugin is doing behind the scenes.

Not trying to discount your suggestion, just offering up one option to get similar features that are already available in Indigo.

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Posted on
Sun Apr 16, 2023 7:07 am
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Core Functionality Similar to "Super Conditions" Plugin

I'm guessing it's been on the dev list for 10 years and was never prioritized. I use the Python if true feature as well but I agree 100%, this would be a valuable core function through the client.

Posted on
Sun Apr 16, 2023 9:25 am
jay (support) offline
Site Admin
User avatar
Posts: 18220
Joined: Mar 19, 2008
Location: Austin, Texas

Re: Core Functionality Similar to "Super Conditions" Plugin

It is on the request list, but given the various ways already in place to accomplish this, demand has been quite low.

The non-script way to accomplish this is to duplicate your trigger that fires when TRUE, then reverse the conditions such that the opposite is TRUE and then execute the actions for that condition. Yes, it takes 2 triggers to accomplish the then/else functionality, but it doesn't require any scripting.

Jay (Indigo Support)
Twitter | Facebook | LinkedIn

Posted on
Sun Apr 16, 2023 3:57 pm
Londonmark offline
Posts: 509
Joined: Feb 29, 2012

Re: Core Functionality Similar to "Super Conditions" Plugin

+1 on the feature request. Am a big fan of super conditions but trying to wean myself off.

Posted on
Thu Apr 20, 2023 1:49 pm
colin_d offline
Posts: 34
Joined: Nov 08, 2014
Location: East Sussex

Re: Core Functionality Similar to "Super Conditions" Plugin

+1 for me too. It helps if only to clarify the logic and purpose of the triggers involved, things can get messy after a while.

Posted on
Tue Apr 25, 2023 2:10 am
MontyPySpock offline
Posts: 6
Joined: Dec 12, 2021

Re: Core Functionality Similar to "Super Conditions" Plugin

I can code in Python, but the If Python script returns True feature isn't useful as a replacement for the Super Conditions plugin. If Python script returns True functions at the entire Trigger or Schedule level, under the Conditions tab. The power of Super Conditions is that it functions within the Actions tab (or within an Action Group), enabling you to apply a condition to an individual Action.

The only thing that I see that operates on the Actions level that would apply is the Server Action "Execute Script", which allows me to run embedded Python code. Using that, I can granularly test my individual Condition and then perform the Action (in Python code) if true. I'm presuming that's what you meant.

One downside, as you mentioned, is having to know how to code in Python and learn the IOM; that's ok for me (albeit taking longer), but it's much less approachable for non-coders. The other downside is obfuscating the individual conditional Action, rendering the list of Actions less readable and not visually self-documenting in the Actions list, although the "execute embedded Python script" Action does show the first part of the code, so with a leading Python comment you can make things somewhat self-documenting. That's actually better than Super Conditions, which rendered everything as just "conditional" in the Actions list.

The non-script way to accomplish what Super Conditions does is to split a single Trigger/Schedule into multiple Triggers/Schedules (one for each Action that needs to be Conditional), using the Conditions tab as appropriate. That very quickly gets messy and defeats some of the elegance and readability of a configuration, but it's doable.

But core functionality that provides the ability to do If/Then processing for individual Actions in Trigger/Schedule Actions tabs, or in Action Groups, would not only make this functionality much more approachable for non-coders, but it would also make it visually self-documenting along with all the other potential Actions in the list. I could see it rendering as an atomic indented If/Then statement right there in the Actions list. I'm glad it's on the development radar somewhere, although at a low priority.

Ultimately, the "Execute Script" Server Action looks like it's my solution for now: thanks for bringing that my attention! I replaced all my Super Conditions with "Execute Script" embedded Python code, so I'm good to go for the next Indigo version. :D

Posted on
Tue Apr 25, 2023 7:18 pm
ryanbuckner offline
Posts: 1080
Joined: Oct 08, 2011
Location: Northern Virginia

Re: Core Functionality Similar to "Super Conditions" Plugin

Agree. It's an important core feature

Posted on
Wed Apr 26, 2023 9:20 am
jltnol offline
Posts: 994
Joined: Oct 15, 2013

Re: Core Functionality Similar to "Super Conditions" Plugin

FWIW, with the help of many here, I've been able to put together some basic "if, then" python scripts, which can handle a variety of "conditions" all under one action. And while I think I have one or two triggers based on "If python is true...." I don't have many, mainly because I'm not sure how to use this feature, and just a first glance it seems just a bit limiting, given the need to test for more than one condition for some triggers.

So a big +1 for elevating this into the core of Indigo.

Posted on
Wed Apr 26, 2023 11:19 am
DaveL17 offline
User avatar
Posts: 6756
Joined: Aug 20, 2013
Location: Chicago, IL, USA

Re: Core Functionality Similar to "Super Conditions" Plugin

jltnol wrote:
I don't have many, mainly because I'm not sure how to use this feature, and just a first glance it seems just a bit limiting, given the need to test for more than one condition for some triggers.


Just to add to your decision-making, you can do many conditional tests in Python with no problem. It's something it's exceedingly good at.

Code: Select all
x = 2
y = 3
z = False

if x >= 2 and y <= 3 and y > x and not z:
    return True
else:
    return False

I came here to drink milk and kick ass....and I've just finished my milk.

[My Plugins] - [My Forums]

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 11 guests

cron