|
Page 1 of 5
|
[ 62 posts ] |
Go to page: 1, 2, 3, 4, 5 Next |
| Author |
Message |
|
matt (support)
Site Admin
Joined: Jan 27, 2003 Posts: 11692 Location: Texas
|
 Group Trigger Plugin
Neat plugin idea.
Is the idea behind the meta 1) On Trigger and 2) Off Trigger that they fire whenever there is a transition from ALL devices in the group are OFF to at least ONE of them is ON (for #1), and when there is a transition of ANY of the devices being ON to ALL of them are OFF (#2)? If so, then the actions could be to update a KeypadLinc LED button to represent the ON state of a group of devices.
Can you instead of creating a custom plugin Device instead just create a custom plugin Trigger? It seems like that is more of what you want in this case.
_________________
|
| Wed Dec 14, 2011 3:42 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
Beta 0.9.7 is now available. The number of ON and Off devices is no longer limited. See the first post in this thread for more information.
|
| Thu Dec 22, 2011 1:41 pm |
|
 |
|
terrydew
Joined: Jun 10, 2011 Posts: 260
|
 Re: Group Trigger plugin
Great plugin
Any reason why I can't see devices created by another plugin? I have an alarm plugin Ians created (which is outstanding) that has a device for each zone. I would like to use group trigger with say all my motion zones. Does it only work for on off signals or will it also work for device state changes?
|
| Thu Dec 22, 2011 4:17 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
terry dew wrote:...Any reason why I can't see devices created by another plugin? I have an alarm plugin Ians created (which is outstanding) that has a device for each zone. I would like to use group trigger with say all my motion zones. Does it only work for on off signals or will it also work for device state changes?
The problem is that plugin defined custom devices do not contain the onState property like regular Indigo devices. So, the plugin author has to create a 'state' that can be used instead. There is a note to this effect at the bottom of the first post in this topic. It's easy to miss, so here it is again: A note for Plugin Developers: This plugin supports all Indigo devices which support the onOffState state indigo.devices.states['onOffState']. Support is provided for custom plugin devices which contain ...states['onOffState'] as a OnOff boolean. This will allow the states of alarm zones, relay boxes, etc. to be used as members of a group trigger.For an alarm system the zone state definition might look like: - Code: Select all
<State id="onState"> <ValueType boolType="OnOff">Boolean</ValueType> <TriggerLabel>Zone state is On (fault)</TriggerLabel> <ControlPageLabel>Zone state is On (fault)</ControlPageLabel> </State>
and the plugin code to update the state is : indigoDevice.updateStateOnServer(key='onOffState', value=True) or indigoDevice.updateStateOnServer(key='onOffState', value=False)
Last edited by berkinet on Fri Dec 23, 2011 8:25 pm, edited 1 time in total.
|
| Thu Dec 22, 2011 4:28 pm |
|
 |
|
terrydew
Joined: Jun 10, 2011 Posts: 260
|
 Re: Group Trigger plugin
Thanks. I missed the note. I know almost nothing about modern programing so if my question is dumb, please forgive.
Could you include access to variables in the device list so the variables could be set by other plugins to the correct "onstate"?
|
| Thu Dec 22, 2011 5:03 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
terrydew wrote:Thanks. I missed the note. I know almost nothing about modern programing so if my question is dumb, please forgive.
Could you include access to variables in the device list so the variables could be set by other plugins to the correct "onstate"?
Modern, unlike... ALGOL, APL, COBOL, PL/1, ADA, LISP, Fortran, Pascal, SNOBOL  Yes, adding support for variables is on the todo list. It is a little complicated to support a range of values. So, at least initially, I will support True or False values only. But, at least you would be able to use a variable as a semaphore between a device and the group trigger.
|
| Thu Dec 22, 2011 5:20 pm |
|
 |
|
terrydew
Joined: Jun 10, 2011 Posts: 260
|
 Re: Group Trigger plugin
Cobol Fortran. Not as much the age of the language but the time from last use, which is considerable. Don't know how to use the smiley face so have to make my own.  )) Thanks for having that on the list. I think it would be much easier than negotiating with numerous plugin developers for changes.
|
| Thu Dec 22, 2011 5:46 pm |
|
 |
|
IanS
Joined: Jun 16, 2011 Posts: 8
|
 Re: Group Trigger plugin
Added your suggested code above to the GE Caddx NX-8e plugin version 0.2.8 and sent to Terry offline to try. It should trigger any Alarm zone "triggered" state selected.
|
| Fri Dec 23, 2011 7:36 am |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
IanS wrote:Added your suggested code above to the GE Caddx NX-8e plugin version 0.2.8 and sent to Terry offline to try. It should trigger any Alarm zone "triggered" state selected.
Thanks. This must be @terrydew's lucky day . I also sent him an advance copy of the Group Trigger plugin with variable support. Happy Holidays to you.
Last edited by berkinet on Sat Jan 14, 2012 7:01 pm, edited 1 time in total.
|
| Fri Dec 23, 2011 12:54 pm |
|
 |
|
terrydew
Joined: Jun 10, 2011 Posts: 260
|
 Re: Group Trigger plugin
Yes I got both. Thank y'all for the effort. You must write code faster than I can talk. 
|
| Fri Dec 23, 2011 4:49 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
Beta 0.9.10 is now available on dropboxv 0.9.9 Dec 24, 2011 - Fixed a bug in handling of devices with no action set.
- Added support for Indigo variables.
- Changed device on/off logic to use device.states['onOffState']
- Added test to make sure devices have changed state.
v 0.9.10 Dec 24, 2011 - Fixed a startup bug in log level setting.
See the first post in this thread for more information.
Last edited by berkinet on Sat Dec 24, 2011 2:59 pm, edited 1 time in total.
|
| Sat Dec 24, 2011 1:41 pm |
|
 |
|
gregjsmith
Joined: Apr 01, 2003 Posts: 823 Location: Rio Rancho, NM
|
 Re: Group Trigger plugin
It's the first time I've installed this plug in. I get an error when the plug in tries to load. - Code: Select all
Indigo Group Trigger Error Error in plugin execution InitializeMain:
Traceback (most recent call last): File "<string>", line 1, in <module> File "plugin.py", line 46, in __init__ <type 'exceptions.AttributeError'>: 'Plugin' object has no attribute 'logLevel'
_________________ Greg In The Desert
|
| Sat Dec 24, 2011 2:05 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
Thanks for finding that, there should have been a default. I'll get it fixed in the next release. For now, just go to the plugin config and select a logging level. Let me know if that works.
|
| Sat Dec 24, 2011 2:10 pm |
|
 |
|
gregjsmith
Joined: Apr 01, 2003 Posts: 823 Location: Rio Rancho, NM
|
 Re: Group Trigger plugin
I'm not getting a config menu. Just a disable, reload and about menu.
_________________ Greg In The Desert
|
| Sat Dec 24, 2011 2:48 pm |
|
 |
|
berkinet
Joined: Nov 18, 2008 Posts: 1721 Location: Berkeley, CA
|
 Re: Group Trigger plugin
|
| Sat Dec 24, 2011 2:57 pm |
|
|
|
Page 1 of 5
|
[ 62 posts ] |
Go to page: 1, 2, 3, 4, 5 Next |
Who is online |
Users browsing this forum: No registered users and 0 guests |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot post attachments in this forum
|
|