Page 4 of 7

Re: Group Trigger Plugin

PostPosted: Sun Feb 26, 2012 8:08 pm
by terrydew
Never mind! Missed the part about the checkbox meaning ignore conditions not process conditions. Starring me right in the eye but all I was checking was is the box checked which it was. Removed check and everything works like a charm. Teach me not to do this kind of stuff after wine. Thanks again. :D

Beta 0.9.15 available

PostPosted: Thu Mar 15, 2012 9:16 pm
by berkinet
Beta 0.9.15 is now available on dropbox

This release adds an option to save the name of the triggering variable or device to an Indigo variable. This can be specified independently for the On and Off trigger events. The Indigo variable name(s) can be set by the user.

Re: Group Trigger Plugin

PostPosted: Sat Mar 17, 2012 12:25 pm
by terrydew
updated to new release and got the following

Code: Select all
 Reloading plugin "Group Trigger 0.9.15"
  Stopping plugin "Group Trigger 0.9.15" (pid 64008)
  Group Trigger Debug             <<-- entering deviceStopComm: Group Door Open, 648352520
  Group Triggers                  Plugin processing disabled for group trigger Group Door Open
  Group Trigger Debug             <<-- entering deviceStopComm: Group Motion, 346364470
  Group Triggers                  Plugin processing disabled for group trigger Group Motion
  Group Trigger Error             exception in triggerStopProcessing(Group Motion): 346364470
  Group Trigger                   shutdown called
  Plugin "Group Trigger" disconnected
  Starting plugin "Group Trigger 0.9.15" (pid 64022)
  Plugin "Group Trigger" connected
  Group Trigger                   Meta Triggers Plugin Initialized

  Plugin "Group Trigger 0.9.15" started
  Group Trigger                   Plugin startup.
  Group Trigger Debug             versionCheck() called
  Group Trigger                   Your plugin version, v0.9.15, is current
  Group Trigger Debug             Trigger Startup
  Group Triggers                  Plugin processing enabled for group trigger Group Door Open
  Group Trigger Debug             Finished device processing:
   On dict is: {648352520: []}
   Off dict is: {648352520: []}
   Triggers are: {648352520: {'actionOff': u'428342652', 'process': True, 'saveVarOFF': '', 'saveVarON': u'whichdoor', 'responseOff': 'trigger', 'condOff': False, 'responseOn': 'trigger', 'condOn': False, 'timeOut': u'', 'actionOn': 648352520, 'selfOff': 'No'}}
  Group Trigger Debug             Finished variable processing:
   On dict is: {648352520: [u'1036850980', u'587771681', u'370948314', u'1337008962', u'667800221', u'1192603301', u'1172733019', u'1419308057', u'436775088', u'168875380', u'1556965903', u'1575511318', u'1179951223', u'244177793', u'442776527']}
   Off dict is: {648352520: [u'1036850980', u'587771681', u'370948314', u'1337008962', u'667800221', u'1192603301', u'1172733019', u'1419308057', u'436775088', u'168875380', u'1556965903', u'1575511318', u'1179951223', u'244177793', u'442776527']}
   Triggers are: {648352520: {'actionOff': u'428342652', 'process': True, 'saveVarOFF': '', 'saveVarON': u'whichdoor', 'responseOff': 'trigger', 'condOff': False, 'responseOn': 'trigger', 'condOn': False, 'timeOut': u'', 'actionOn': 648352520, 'selfOff': 'No'}}
  Group Trigger Debug             Trigger Startup
  Group Triggers                  Plugin processing enabled for group trigger Group Motion
  Group Trigger Error             exception in triggerStartProcessing(Group Motion): 'key saveToVarON not found in dict'

Re: Group Trigger Plugin

PostPosted: Sat Mar 17, 2012 1:14 pm
by berkinet
terrydew wrote:
updated to new release and got the following

Code: Select all
...
  Group Trigger Error             exception in triggerStartProcessing(Group Motion): 'key saveToVarON not found in dict'

Sorry, I should have noted that you need to open the Group Trigger device, click Edit Device Settings... and then Ok, Save.

Re: Group Trigger Plugin

PostPosted: Sat Mar 17, 2012 5:01 pm
by terrydew
Got it. It works.

Thanks

Re: Beta 0.9.15 available

PostPosted: Sat Sep 08, 2012 5:44 pm
by DU Lou
berkinet wrote:
Beta 0.9.15 is now available on dropbox

This release adds an option to save the name of the triggering variable or device to an Indigo variable. This can be specified independently for the On and Off trigger events. The Indigo variable name(s) can be set by the user.


When I click on the link to get the plugin I get this instead:
Screen Shot 2012-09-08 at 7.41.37 PM.png
Screen Shot 2012-09-08 at 7.41.37 PM.png (5.38 KiB) Viewed 10544 times


I would love to test while its still in beta though :)

Thanks,
~Lou

Re: Beta 0.9.15 available

PostPosted: Sun Sep 09, 2012 2:56 am
by berkinet
DU Lou wrote:
...When I click on the link to get the plugin I get this instead:
Screen%20Shot%202012-09-08%20at%207.41.37%20PM.png
Screen%20Shot%202012-09-08%20at%207.41.37%20PM.png (5.38 KiB) Viewed 10532 times
...


I have checked the Dropbox link and it is working.

This sounds like a Windows virus. Are you trying the download on a Mac? If so, possibly you are you running the Nginx web server as a proxy and have a configuration problem.

Re: Beta 0.9.15 available

PostPosted: Sun Sep 09, 2012 1:47 pm
by DU Lou
berkinet wrote:
DU Lou wrote:
...When I click on the link to get the plugin I get this instead:
Screen%20Shot%202012-09-08%20at%207.41.37%20PM.png
...


I have checked the Dropbox link and it is working.

This sounds like a Windows virus. Are you trying the download on a Mac?

That is strange. Yes I am clicking the link from Safari v6.0 (8536.25) and using MAC OS 10.8.1 So I am not sure how I would be getting a windows virus.

If so, possibly you are you running the Nginx web server as a proxy and have a configuration problem.

I have never even heard of the Nginx web server let alone would no if it is configured properly as a proxy on my Mac :)

Update: Hmmmm Just now I was able to download the plugin without issue. Not sure what happened during the previous attempts...

Re: Group Trigger Plugin

PostPosted: Wed Sep 12, 2012 7:32 am
by ckeyes888
Sorry if this is answered anywhere but can Group Trigger check for any change to a group
of variables? I have a number of variables holding numeric states that I need to trigger
on any change to any of them.

Thanks,

Carl

Re: Group Trigger Plugin

PostPosted: Wed Sep 12, 2012 7:42 am
by berkinet
ckeyes888 wrote:
...can Group Trigger check for any change to a group of variables?...

Yes. You can select on any number of variables (zero or more). Depending on how you configure the trigger, it will fire when any of the watched variables change from true to false or false to true or both.

However, while a range of values for true and false (0/1, yes/no, on/off, etc.), including user defined (a/b, foo/bar, etc.), are supported, all comparisons are boolean - the new (changed) value must be either the true value or the false value. Undefined values are ignored. Also, there is no provision for watching for a simple change in value (since any change can not be defined as true or false).

Re: Group Trigger Plugin

PostPosted: Wed Sep 12, 2012 10:30 am
by ckeyes888
Got it, thanks. I'll just use a few triggers instead since I need to trigger from
any change in numeric value.

Carl

Re: Group Trigger Plugin

PostPosted: Wed Sep 12, 2012 9:22 pm
by hamw
Just to ask, why is it not possible to trigger on an arbitrary change, for instance a variable changing from "Playing" to "Paused"?

Re: Group Trigger Plugin

PostPosted: Thu Sep 13, 2012 1:09 am
by berkinet
hamw wrote:
Just to ask, why is it not possible to trigger on an arbitrary change, for instance a variable changing from "Playing" to "Paused"?


The Group Trigger plugin only supports two actions: The ON action (what to do when something turns ON) and the OFF action (what to do when something turns OFF). For devices these are triggered by the device becoming ON or OFF. For variables, this is triggered by a change in the variable value from some value defined as ON and another defined as OFF. You can set arbitrary values (foo/bar, Playing/Paused, etc) to represent ON and OFF or also use the default supported values like True/False, Yes/No, 1/0, etc. So, in your example, if the variable value was only ever Playing or Paused, you could define this as the True and False values, and associate an action with each value. But, if the variable changed to Stopped, then the plugin would have no idea what to do, and would ignore the change.

The problem with recognizing "any change" as a trigger option is that the plugin has no idea what to do, should that change be seen as an ON or an OFF. Think of it like a yes no question: Are you hungry? The only actionable responses are ones that can be interpreted as True or False (Yes or No). If you answer: I like french fried potatoes! I cannot interpret that as a Yes or a No.

If you look through the plugin documentation I think you will see how this actually works on action.

Re: Group Trigger Plugin

PostPosted: Thu Sep 13, 2012 10:37 am
by ckeyes888
You've written a terrific plugin but I am a bit curious how the app itself can trigger on any change to a variable, but the plugin can't. To the layman it would seem all the plugin
would have to do is execute the action.

Thanks,

Carl

Re: Group Trigger Plugin

PostPosted: Thu Sep 13, 2012 3:49 pm
by berkinet
ckeyes888 wrote:
...I am a bit curious how the app itself can trigger on any change to a variable, but the plugin can't. To the layman it would seem all the plugin would have to do is execute the action. ...


I am not quite sure what you mean by "the app" but I will see if I can still answer your question.
The plugin is designed to:
  • execute an action when a when a monitored device turns ON or a monitored variable becomes true
  • execute an action when a when a monitored device turns OFF or a monitored variable becomes false
  • Or both of the above.

You are correct that all the plugin has to do is execute the appropriate action. That is easy for devices since the plugin monitors the on/off state of the device. But, for variables it must, somehow, figure out if the variable value is either logically true (ON) or false (OFF). The plugin knows that a variable's value has changed, and it automatically receives the new value. It then tests that value to see if it is true or false. If the value cannot be determined to represent a logical true or false, then it is simply ignored. At present, there is no provision for an undefined state.

I suppose the plugin could be modified to have another action to execute on any variable or device change. But, at this time it does not do that, and I have not seen a compelling use case for adding such a feature. Perhaps if there was a way for a plugin to pass information into the Action, it might make more sense to support an Action on any change on variable or device. With such a capability the trigger could then pass the device or variable name and state/value to the Action. But, that function is not presently available in the plugin or scripting APIs.

Another way to approach the need to monitor a group of variables for any change might be to have whatever process sets/resets the variable's value also call an Action group to do something. That would be synchronous and, IMO, a better approach than using variables as a semiphore.