Announcement

Collapse
No announcement yet.

Howto add a condition which is not a trigger?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • bsobel
    replied
    Originally posted by spud View Post

    I guess it would be possible to add such triggers. The plugin would need to constantly poll HS3 to get the list of running plugins, not ideal but possible.
    You could subscribe to log events and look for the "Starting Plug-In" log line from HS...

    Leave a comment:


  • spud
    replied
    Originally posted by rprade View Post
    I revisited this thread because another member was asking about this. For your Condition "A plugin is..." , couldn't Triggers based on a plugin having just been stopped or started be provided? This is not something I want or need in your plug-in, I was just wondering if that would be possible.
    I guess it would be possible to add such triggers. The plugin would need to constantly poll HS3 to get the list of running plugins, not ideal but possible.

    Leave a comment:


  • rprade
    replied
    Originally posted by spud View Post

    not a very good one, but now when a user choose a trigger that can only be a condition, the plugin displays "Not available as a trigger (IF / OR IF) only as a condition (AND IF)" as the only subtrigger choice.
    I revisited this thread because another member was asking about this. For your Condition "A plugin is..." , couldn't Triggers based on a plugin having just been stopped or started be provided? This is not something I want or need in your plug-in, I was just wondering if that would be possible.

    Leave a comment:


  • nfrobertson
    replied
    Thanks Spud.

    I sat there thinking about Tink's solution and why it might work for my use. I use a top level "My Plugin Name : Special Triggers" for the TrigNum=1 (I only have that 1 TrigNum), and then I include as the SubTrigNum the list of triggers/conditions. So, I finally am making use of Condition() to set a variable that tells the plugin what the user is doing. Down in SubTriggerName() have some logic to check it. If Condition() has set the variable to False meaning it's being used as a trigger, I return "" for the SubTrigNum's name that is a condition only. In my initial couple tests this appears to do exactly what I want. The list of sub-triggers only shows those that are actually the triggers. After that trigger is set, it moves on to condition mode and I adjust the logic to shows only those that are capable of being conditions.

    I see you have multiple top level TrigNums for EasyTrigger instead of one as the entry point with sub triggers like I'm doing. However, isn't this same mechanism possible in the TriggerName() call like I think Tink originally mentioned? I have developer debug logging on all these method calls right now and the very first thing that is done is Condition.Set() when a new event is started. I'd think that would set the variable and could be used in TriggerName() to control the top most level of triggers with the first IF (aka trigger) section ?

    Leave a comment:


  • spud
    replied
    Originally posted by nfrobertson View Post
    Spud, did you ever come up with a solution to this? I have this exact same issue and am trying to decide how to handle. I have a couple triggers and then a condition that can't be a trigger. I hit the same place you did where the condition can be selected as a trigger which isn't a good user experience.
    not a very good one, but now when a user choose a trigger that can only be a condition, the plugin displays "Not available as a trigger (IF / OR IF) only as a condition (AND IF)" as the only subtrigger choice.

    Leave a comment:


  • nfrobertson
    replied
    Originally posted by spud View Post
    I just end up with triggers that can't be used. For example in the EasyTrigger plugin "A plugin is..." can only be used as a condition but it still appear in the list of triggers.
    Spud, did you ever come up with a solution to this? I have this exact same issue and am trying to decide how to handle. I have a couple triggers and then a condition that can't be a trigger. I hit the same place you did where the condition can be selected as a trigger which isn't a good user experience.

    Leave a comment:


  • sirmeili
    replied
    Originally posted by spud View Post
    I just end up with triggers that can't be used. For example in the EasyTrigger plugin "A plugin is..." can only be used as a condition but it still appear in the list of triggers.
    Thanks Spud! I appreciate it.

    Leave a comment:


  • spud
    replied
    I just end up with triggers that can't be used. For example in the EasyTrigger plugin "A plugin is..." can only be used as a condition but it still appear in the list of triggers.

    Leave a comment:


  • sirmeili
    replied
    Originally posted by spud View Post
    I don't think it has ever been completed.
    How did you get around it or did you not?

    I have an idea for a condition, but it makes a really bad trigger and I would never want anyone to use it as such.

    Leave a comment:


  • spud
    replied
    Originally posted by sirmeili View Post
    Was this ever completed and if so, how do you create a "trigger" that is a condition only?
    I don't think it has ever been completed.

    Leave a comment:


  • sirmeili
    replied
    Was this ever completed and if so, how do you create a "trigger" that is a condition only?

    Leave a comment:


  • rjh
    replied
    Will probably be a while before we can get to this, but I see you submitted a ticket.

    Originally posted by spud View Post
    done: http://www.homeseer.com/bugzilla/show_bug.cgi?id=2062

    when can I expect to see this implemented? I really need it. Thanks

    Leave a comment:


  • spud
    replied
    done: http://www.homeseer.com/bugzilla/show_bug.cgi?id=2062

    when can I expect to see this implemented? I really need it. Thanks

    Leave a comment:


  • Rick Tinker
    replied
    Sure. Submit an enhancement ticket in Bugzilla and Rich can prioritize it.

    Leave a comment:


  • spud
    replied
    to make it work, couldn't the Condition property be set everytime before TriggerName is called?

    or as I said in the first place couldn't HasTriggers() takes a TriggerNumber parameter like HasConditions so that we can define conditions that are not triggers

    moreover it seems that you can do it at the top level from HS3 itself because that's the way "The Moon phase is..." work, i.e a condition that does not appear in the list of triggers

    Leave a comment:

Working...
X