Group Trigger Plugin

Posted on
Wed Feb 18, 2015 6:19 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

Korey wrote:
berkinet wrote:
[size=75]
Korey wrote:
Getting this error, ...

Could you set the plugin to max debug level and send me the output.


Here you go:...

[/size]Well, to start with, I'd look at the input named "iTunes" What type of device is that, and what are you triggering on?
Then you should also check the inputs: "Pool Temp," "Rack Temp," "Spa Temp" and "Rain Gauge"

It looks like all of these are variables. Make sure that the possible values equate to true or false, or that you have added the values to the plugin config as true or false equivalents.

Posted on
Wed Feb 18, 2015 7:25 pm
Korey offline
User avatar
Posts: 811
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Group Trigger Plugin

berkinet wrote:
Korey wrote:
berkinet wrote:
[size=75]
Korey wrote:
Getting this error, ...

Could you set the plugin to max debug level and send me the output.


Here you go:...

[/size]Well, to start with, I'd look at the input named "iTunes" What type of device is that, and what are you triggering on?
Then you should also check the inputs: "Pool Temp," "Rack Temp," "Spa Temp" and "Rain Gauge"

It looks like all of these are variables. Make sure that the possible values equate to true or false, or that you have added the values to the plugin config as true or false equivalents.



iTunes is the iTunes server plugin in that ships with Indigo, the other 4 are RFXCOM sensors.

* None of those devices are selected to trigger the group.

I've deleted the trigger and started from scratch, the error still persists. :?

--
Korey

Posted on
Wed Feb 18, 2015 9:29 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

Korey wrote:
...iTunes is the iTunes server plugin in that ships with Indigo, the other 4 are RFXCOM sensors.

* None of those devices are selected to trigger the group.

I've deleted the trigger and started from scratch, the error still persists. :?

According to the debug trace you posted, you have a trigger that is trying to monitor the states of the devices I noted...
Code: Select all
 Group Trigger                   Group Trigger                   deviceUpdated Called
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Rain Gauge
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Rain Gauge
  Group Trigger                   deviceUpdated: Complete.
  Group Trigger                   deviceUpdated Called
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:iTunes
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:iTunes
  Group Trigger                   deviceUpdated: Complete.
  Group Trigger                   deviceUpdated Called
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Spa Temp
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Spa Temp
  Group Trigger                   deviceUpdated: Complete.
  Group Trigger                   deviceUpdated Called
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Rack Temp
  Group Trigger                   deviceUpdated: newDev onState ERROR: 'key onOffState not found in dict' for device:Rack Temp
The plugin is failing because the "devices" do not contain an "OnOffState" state. That would be expected for a trigger based on a variable.

Can you select the trigger in the main Indigo window and then... Right click (control-click) and select Copy Python Reference
Then, from the Indigo menu bar, select Plugins -> Open Scripting Shell
In the terminal window that open, type:
print
followed by a space and then paste the copied trigger reference and press return. The session should look something like:
Code: Select all
>>> print indigo.triggers[682345003]
configured : True
description :
deviceId : 1144555727
enabled : True
folderId : 294691087
globalProps : MetaProps : (dict)
...


Please post the output here.

Posted on
Wed Feb 18, 2015 11:25 pm
Korey offline
User avatar
Posts: 811
Joined: Jun 04, 2008
Location: Henderson, NV

Re: Group Trigger Plugin

berkinet wrote:
Please post the output here.


Here you go, sorry for the hassle. :( .


Code: Select all
Last login: Mon Feb 16 13:39:45 on console
indigo:~ Indigo$ /Applications/Indigo\ 6.app/Contents/PlugIns/launch_indigopluginhost.command ; exit;
Python 2.5.6 (r256:88840, Oct 11 2012, 20:14:10)
[GCC 4.2.1 Compatible Apple Clang 4.0 (tags/Apple/clang-418.0.60)]
Connected to Indigo Server v6.0.20, api v1.18 (localuds:1176)
>>> print indigo.triggers[36842226] # "Arrive home - Multi"
configured : True
description :
enabled : True
folderId : 1009982173
globalProps : MetaProps : (dict)
     com.berkinet.grouptrigger : (dict)
          metaCmdOff : (list)
          metaCmdOn : (list)
               Item : 313744140 (string)
               Item : 763509552 (string)
               Item : 513673865 (string)
               Item : 973178421 (string)
               Item : 1813087375 (string)
               Item : 1179322073 (string)
               Item : 1850707466 (string)
               Item : 1609118702 (string)
               Item : 1909309234 (string)
               Item : 67784344 (string)
               Item : 184793945 (string)
               Item : 1381780147 (string)
               Item : 252858186 (string)
               Item : 117947082 (string)
               Item : 1854445732 (string)
               Item : 85413848 (string)
               Item : 135332310 (string)
               Item : 18005806 (string)
               Item : 117657707 (string)
               Item : 1367942755 (string)
               Item : 28736398 (string)
               Item : 440236319 (string)
               Item : 347860978 (string)
               Item : 583583476 (string)
               Item : 473325813 (string)
               Item : 1099146787 (string)
          metaDevOff : (list)
          metaDevOffAction :  (string)
          metaDevOffResponse : 0 (string)
          metaDevOffSource : 0 (string)
          metaDevOffTrigger :  (string)
          metaDevOffTriggerConditions : false (bool)
          metaDevOn : (list)
          metaDevOnAction :  (string)
          metaDevOnResponse : 2 (string)
          metaDevOnTrigger : 192521180 (string)
          metaDevOnTriggerConditions : false (bool)
          metaDevTimeOut :  (string)
          metaVarOff : (list)
          metaVarOn : (list)
          saveToVarOFF : false (bool)
          saveToVarON : false (bool)
          varNameOFF :  (string)
          varNameON :  (string)
id : 36842226
name : Arrive home - Multi
pluginId : com.berkinet.grouptrigger
pluginProps : emptyDict : (dict)
pluginTypeId : metaDevice
remoteDisplay : True
suppressLogging : False
upload : True
>>>

--
Korey

Posted on
Thu Feb 19, 2015 3:08 pm
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

Korey wrote:
...
Code: Select all
metaCmdOn : (list)
               Item : 313744140 (string)
               Item : 763509552 (string)
               Item : 513673865 (string)
               Item : 973178421 (string)
               Item : 1813087375 (string)
               Item : 1179322073 (string)
               Item : 1850707466 (string)
               Item : 1609118702 (string)
               Item : 1909309234 (string)
               Item : 67784344 (string)
               Item : 184793945 (string)
               Item : 1381780147 (string)
               Item : 252858186 (string)
               Item : 117947082 (string)
               Item : 1854445732 (string)
               Item : 85413848 (string)
               Item : 135332310 (string)
               Item : 18005806 (string)
               Item : 117657707 (string)
               Item : 1367942755 (string)
               Item : 28736398 (string)
               Item : 440236319 (string)
               Item : 347860978 (string)
               Item : 583583476 (string)
               Item : 473325813 (string)
               Item : 1099146787 (string)
   
I don't see any specific problem. It looks like you will need to find the device associated with each of the IDs noted in the Trigger definition. You can do that from the scripting shell using the same general syntax you used to print the trigger:
    print indigo.devices[device_id_goes_here]
I suspect 4 of these will actually print an error like:
    KeyError: 'key id 1404642663 not found in database'
and those will be variables that somehow are defined as on items in your trigger.

Posted on
Tue Mar 31, 2015 2:30 pm
JohnS offline
Posts: 25
Joined: Mar 26, 2014

Re: Group Trigger Plugin

Berkinet,
I am trying to use the Group Trigger with 6 Leak Sensors. I have set up the Group Trigger to trigger on an “incoming insteon event”. I was trying to trigger on an “on command received’ regardless of its Group(1,2 and 4). I have also set it up to save the name of the triggering device into a variable which already exits. Upon enabling the Group Trigger, I get the following error;

Group Trigger Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 954, in triggerUpdated
File "plugin.py", line 222, in triggerStartProcessing
<type 'exceptions.UnboundLocalError'>: local variable 'devId' referenced before assignment

Any light that you could shed on this would be appreciated.
John

Posted on
Wed Apr 01, 2015 10:24 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

JohnS wrote:
...I was trying to trigger on an “on command received’ regardless of its Group(1,2 and 4). I have also set it up to save the name of the triggering device into a variable which already exits. Upon enabling the Group Trigger, I get the following error;

Group Trigger Error Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
File "/Library/Application Support/Perceptive Automation/Indigo 6/IndigoPluginHost.app/Contents/PlugIns/plugin_base.py", line 954, in triggerUpdated
File "plugin.py", line 222, in triggerStartProcessing
<type 'exceptions.UnboundLocalError'>: local variable 'devId' referenced before assignment

A couple of thoughts here. First, try reloading the plugin. It sounds like the trigger you created was somehow read before it was complete.

However, I do not think this is going to do what you want. The plugin only looks for Insteon Group 1 "On" events. To trigger on any On event you'd probably have to create a triggers for each Group for each device for each state (On and Off) and have those triggers maintain a variable. Then, have the Group Trigger watch the variable. That would be 6 triggers per device, plus the group trigger. So, a total of 37 triggers. But, it should work.

Please let me know how you get join with this,

Posted on
Wed Apr 01, 2015 5:14 pm
JohnS offline
Posts: 25
Joined: Mar 26, 2014

Re: Group Trigger Plugin

Berkinet,
I tried reloading the plugin and tried recreating the group trigger with no luck, the same error message. Since the Group trigger doesn’t work with Group 2 or Group 4 on commands, I’ve abandoned the approach.
I did use individual triggers much earlier but was looking for an easier (at least in my mind) way of incorporating the same result as I’m planning to add at least 3 more leak sensors.
I’ve successfully tried two other approaches. One requires 3 triggers (one for receipt of a Group 1 on from any device. one for Group 2 on and one for Group 4 on). The second approach requires 6 triggers (one for each leak sensor that would trigger upon receipt of any command from the sensor). In both approaches the triggers would execute the same python script which would parse the last line of the Event log to determine the name of the leak sensor and the Group of the on command and take appraise action. The script only requires three lines to be added for a new sensor, two for the sensor and one for the associated timer (your timer plugin).
I had hope that the group trigger would have been applicable, since it would have made life even easier. I am using it successfully in a number of other applications.

I am using a number of your plugins; AD2USB, Group Trigger, Meta Devices and Timers and Pester and appreciate all of them.
Keep up the outstanding work .
John

Posted on
Wed May 03, 2017 11:52 pm
mssearch offline
Posts: 18
Joined: Mar 27, 2016

Re: Group Trigger Plugin

Hey again @Berkinet!

Was wondering if there was any chance I could compel you to toss this plugin on Google Drive as well?

It looks like this might significantly reduce the number of triggers I'm having to create to setup the various automations I want to accomplish.

Thanks again for your efforts with all of your plugins!

Posted on
Thu May 04, 2017 12:54 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

mssearch wrote:
Hey again @Berkinet!

Was wondering if there was any chance I could compel you to toss this plugin on Google Drive as well?...

No problem. I actually moved the entire folder, but haven't posted the updated links. The Drobox client app showed the URL but with Google Drive I have to go to their web interface to get it. Just an extra step and, I guess, I am lazy.

Here you go: https://drive.google.com/open?id=0B3q1C ... UE5Q2lROU0

Posted on
Fri May 05, 2017 12:00 pm
mssearch offline
Posts: 18
Joined: Mar 27, 2016

Re: Group Trigger Plugin

Thanks once again @Beriknet!

Posted on
Fri Jul 28, 2017 7:32 am
JohnS offline
Posts: 25
Joined: Mar 26, 2014

Re: Group Trigger Plugin

Berkinet,
I am running Indigo Pro, version 7.03 and Group Trigger v0.9.20. For a while, once a day I’ve been getting the following error message:
“””
Received INSTEON 36.D0.73 on (button 4)
Group Trigger Error no address to name data found for received command:ackValue : 0
address : 36.D0.73
cmdBytes : [17, 0]
cmdFunc : on
cmdScene : 4
cmdSuccess : True
cmdValue : 0
replyBytes : []
Group Trigger Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File “plugin.py”, line 500, in insteonCommandReceived
UnboundLocalError: local variable 'cmdDev' referenced before assignment
“””
The 36.D0.73 device does not show up in my Indigo device listing.
I’m at a lost as to how to eliminate the error and the 36.D0.73 device.

Any assistance you can provide would be appreciated
John

Posted on
Fri Jul 28, 2017 11:19 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

JohnS wrote:
Berkinet,
I am running Indigo Pro, version 7.03 and Group Trigger v0.9.20. For a while, once a day I’ve been getting the following error message:
“””
Received INSTEON 36.D0.73 on (button 4)
Group Trigger Error no address to name data found for received command:ackValue : 0
address : 36.D0.73
cmdBytes : [17, 0]
cmdFunc : on
cmdScene : 4
cmdSuccess : True
cmdValue : 0
replyBytes : []
Group Trigger Error Error in plugin execution ReceivedBroadcast:

Traceback (most recent call last):
File “plugin.py”, line 500, in insteonCommandReceived
UnboundLocalError: local variable 'cmdDev' referenced before assignment
“””
The 36.D0.73 device does not show up in my Indigo device listing.
I’m at a lost as to how to eliminate the error and the 36.D0.73 device.

Any assistance you can provide would be appreciated
John

Did you replace an Insteon device that was part of a group trigger? That may be the reason. If so, try deleting the trigger and recreating it.

Posted on
Sat Jul 29, 2017 12:39 pm
JohnS offline
Posts: 25
Joined: Mar 26, 2014

Re: Group Trigger Plugin

Berkinet,
I deleted all enabled group triggers and re-created them. The error I posted earlier still occurred.

Any other suggestions would be appreciated.
John

Posted on
Sun Jul 30, 2017 1:54 am
berkinet offline
User avatar
Posts: 3290
Joined: Nov 18, 2008
Location: Berkeley, CA, USA & Mougins, France

Re: Group Trigger Plugin

JohnS wrote:
Berkinet,
I deleted all enabled group triggers and re-created them. The error I posted earlier still occurred.

Any other suggestions would be appreciated.
John
Well, something on your network is squawking the address 36.D0.73. Perhaps it is your Insteon modem. Have you checked to see if it has a phantom entry for that address?

Who is online

Users browsing this forum: No registered users and 6 guests