Switchboard (Formerly Indigo Security Script)

Posted on
Tue Aug 14, 2012 10:06 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
loaded 60. No states updates. Here is log with debug on as one of the monitored doors are open.

Code: Select all
 Switchboard Debug                  Device (zone 006 - MASTER BED DOOR  ) is in Monitored Group 'Swbd test'
  Switchboard Error               Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 489, in deviceUpdated
  File "plugin.py", line 350, in trigger_zone
<type 'exceptions.AttributeError'>: 'bool' object has no attribute 'split'

  Switchboard Debug               state change list for "zone 006 - MASTER BED DOOR  ": [(u'zoneState', u'triggered'), (u'zoneState.normal', False), (u'zoneState.triggered', True)]


Geez... I don't understand why it wasn't caught during testing....

I reversed the definition of two of the new states....

https://dl.dropbox.com/u/241415/Switchb ... v0.60a.zip

Should solve this, but you'll need to update the states (again) for the Monitored Device Groups...

Sorry about that...

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Tue Aug 14, 2012 11:15 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Switchboard (Formerly Indigo Security Script)

Here is a trigger I came up with...same for Heat On...

Trigger: AC On

Trigger:
-Device State Changed
- Downstairs Thermostat
-A/C Equipment State
-Becomes On

Condition:
-Any, If device Monitored Device Group number of devices that are currently triggered is greater than: 0

Actions:
1. Plugin, Action Collection, Insert Device State Into Variable, Monitored Device Group: insert state triggered_in_group into 'tiggered_device_list' variable
2. Plugin, Airfoil, Save Current Speaker State
3. Plugin, Airfoil, Connect to speaker: Living Room (Still wish there was connect/disconnect to/from all speakers available in this plugin!!!)
4. Plugin, iTunes, Pause Playback and Speak Text, iTunes Server: "Excuse me, the air is on. Please close the following: %%v:1210387334%%", Delay by 0.02 minutes
5. Plugin, Airfoil, Restore Saved Speaker State, Delay by 0.5 minutes


I wonder If I can use an action group to streamline this at all...

It seems I have completed the first three items of all three use cases below....Now tomorrow I'll have to see about the last three items of each use case.

use case 1:
- hvac comes on (venstar w/ adapter, or insteon thermostat)
- check all windows and doors (triggerlinc or ds10a)
- use airfoil plugin to alert home owner which windows or doors are open
- pester home owner using airfoil plugin every x minutes with which windows or doors remain open
- if window or door becomes open during hvac operation, pester home owner to close after x minutes using airfoil plugin
- optional: if windows and doors aren't closed within a timely manner, turn off hvac

use case 2:
- Armed Home variable is set (system only cares about exterior openings)
- check all windows and doors (triggerlinc or ds10a)
- use airfoil plugin to alert home owner which windows or doors are open
- pester home owner using airfoil plugin every x minutes with which windows or doors remain open
- if window or door becomes open (after all openings have been resolved) while variable is set, alert home owner via airfoil plugin, send email/text, sound alarm, etc
- optional: if openings aren't resolved in a timely manner, do something...turn on lights, etc

use case 3:
- Armed Away variable is set (system cares about exterior openings, and inside motion sensors)
- check all windows and doors (triggerlinc or ds10a), and motion sensors
- use airfoil plugin to alert home owner which windows or doors are open, or if motion is detected in a certain room
- pester home owner using airfoil plugin every x minutes with which windows or doors remain open, or motion detected
- if window or door becomes open (after all openings have been resolved), or motion is sensed while variable is set, alert home owner via airfoil plugin, send email/text, sound alarm, etc
- optional: if openings aren't resolved in a timely manner, do something...turn on lights, etc

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Wed Aug 15, 2012 11:10 am
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Switchboard (Formerly Indigo Security Script)

I downloaded from the link for 60A but the file still says 60 and the behavior is the same. I think the link may be incorrect.

Posted on
Wed Aug 15, 2012 11:24 am
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
I downloaded from the link for 60A but the file still says 60 and the behavior is the same. I think the link may be incorrect.


Worked fine for me.

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Posted on
Wed Aug 15, 2012 12:36 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Switchboard (Formerly Indigo Security Script)

I deleted all switchboard devices and the plugin and then redownloaded. It now works.

As a test I setup a monitored group device with two doors. Status changed as expected for opening the doors. Showed true with a list of all the door devices listed. Great!! However when doors were closed one at a time there was no change when first closed and no change when both closed and the triggered state stayed true. If I did the change model type process, the status reverted to the correct values. I had understood from your instructions that a model change process would only be need if plugin stopped? The plugin in my test was never stopped. Also I just retried by just opening one door of the two door group and the "number of triggered devices" moved to 3 so it appears that counter is cumulative or is just part of the failure to reset when all doors are closed.

Posted on
Wed Aug 15, 2012 1:16 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
I deleted all switchboard devices and the plugin and then redownloaded. It now works.

As a test I setup a monitored group device with two doors. Status changed as expected for opening the doors. Showed true with a list of all the door devices listed. Great!! However when doors were closed one at a time there was no change when first closed and no change when both closed and the triggered state stayed true. If I did the change model type process, the status reverted to the correct values. I had understood from your instructions that a model change process would only be need if plugin stopped? The plugin in my test was never stopped. Also I just retried by just opening one door of the two door group and the "number of triggered devices" moved to 3 so it appears that counter is cumulative or is just part of the failure to reset when all doors are closed.



If the plugin is not stopped, it should be tracking the devices's correctly....

But what do you mean by "Model Change process"? Do you mean updating the state's? That only should be needed once when there is an update to Switchboard. If you deleted, and then recreated the devices, that will do the same thing.

The only reason I suggest changing the model of the devices, is to prevent from having users delete and recreate the device.

It's possible that bad data has been captured by the plugin, if that does happen, then it's possible that you'll want to wipe out the existing state data. The process of changing the model will do that as well...

What's the value of the Triggered_In_Group state for the device that is showing the bad data?

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Wed Aug 15, 2012 1:18 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
I downloaded from the link for 60A but the file still says 60 and the behavior is the same. I think the link may be incorrect.


I did not modify the plugin's version to indicate 60a, since this is a minor change, and I don't expect that many people previously downloaded it.

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Wed Aug 15, 2012 2:49 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Switchboard (Formerly Indigo Security Script)

I have attached a clip of the status window on the main indigo page. The device is a monitored group with two doors. I changed the model type to clear any old data and the opened and closed one of the doors 6 times.

You can't see all of the field but in triggered in group = there are actually 6 entries for the zone 7 master office dr device (which is the door I opened). The last_triggered and Last_updated field change with every open but do not change with a close. The device _triggered changed to true a first open then did not change again.

I also setup a control page with all the states listed as text but when I entered the switchboard device the states available did not have the same names as shown in the main window. I attached a capture of that page also.

Please let me know if I can run other tests for you. This is great plugin and this feature will make some good control page layouts possible.

Terry
Attachments
Switchbd control pg.tiff
Switchbd control pg.tiff (94.24 KiB) Viewed 7869 times
switchboard test.tiff
switchboard test.tiff (49.98 KiB) Viewed 7869 times

Posted on
Wed Aug 15, 2012 5:25 pm
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
I have attached a clip of the status window on the main indigo page. The device is a monitored group with two doors. I changed the model type to clear any old data and the opened and closed one of the doors 6 times.


I can't tell too clearly, but it looks like there maybe a space after zone 007 - Master Office Dr?

Can you check please? If there is a space after the name, I believe you would see this behavior.

- Benjamin

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Wed Aug 15, 2012 6:27 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Switchboard (Formerly Indigo Security Script)

Sharp eye! Yes there was a space after both device names. Deleted the space in both and it cleared the problem. My security devices are auto created by my security plugin so I will adjust all. Thanks for the effort. This is great.

Terry

Posted on
Wed Aug 15, 2012 6:55 pm
terrydew offline
Posts: 258
Joined: Jun 10, 2011

Re: Switchboard (Formerly Indigo Security Script)

Benjamin did you catch my note as to the names of the states presented when switchboard device added to control page are jumbled up. The values appear to be ok just the names of the states. three states have the same name etc.

Thanks Again
Terry

Posted on
Thu Aug 16, 2012 3:43 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

Brandt wrote:
Ben, I'm getting nothing but errors, and no variables updated:

Code: Select all
Aug 14, 2012 7:08:03 PM
  Received INSTEON                "Office Window" off (button 1)
  Switchboard Error               Error in plugin execution ServerReplacedElem:

Traceback (most recent call last):
  File "plugin.py", line 489, in deviceUpdated
  File "plugin.py", line 350, in trigger_zone
<type 'exceptions.AttributeError'>: 'bool' object has no attribute 'split'


Download 0.60a, and install it, and update the device groups again. I had accidently reversed the boolean field in the Indigo definition file. I don't know why my testing didn't reveal it, but it showed up in the real world.

https://dl.dropbox.com/u/241415/Switchb ... v0.60a.zip

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Thu Aug 16, 2012 3:52 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

terrydew wrote:
Benjamin did you catch my note as to the names of the states presented when switchboard device added to control page are jumbled up. The values appear to be ok just the names of the states. three states have the same name etc.


Yes, I think I see what your looking at... I have gone back through the definitions file, and fixed a few mistakes in the state descriptions...
I will be aiming to release 0.61 later tonight or tomorrow, to help resolve that...

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Fri Aug 17, 2012 9:36 am
bschollnick2 offline
Posts: 1355
Joined: Oct 17, 2004
Location: Rochester, Ny

Re: Switchboard (Formerly Indigo Security Script)

Brandt wrote:
Here is a trigger I came up with...same for Heat On...

Trigger: AC On

Trigger:
-Device State Changed
- Downstairs Thermostat
-A/C Equipment State
-Becomes On

Condition:
-Any, If device Monitored Device Group number of devices that are currently triggered is greater than: 0

Actions:
1. Plugin, Action Collection, Insert Device State Into Variable, Monitored Device Group: insert state triggered_in_group into 'tiggered_device_list' variable
2. Plugin, Airfoil, Save Current Speaker State
3. Plugin, Airfoil, Connect to speaker: Living Room (Still wish there was connect/disconnect to/from all speakers available in this plugin!!!)
4. Plugin, iTunes, Pause Playback and Speak Text, iTunes Server: "Excuse me, the air is on. Please close the following: %%v:1210387334%%", Delay by 0.02 minutes
5. Plugin, Airfoil, Restore Saved Speaker State, Delay by 0.5 minutes

I wonder If I can use an action group to streamline this at all...


In theory, yes.

You can use the "Use Action Group" option, but the Action group is triggered. There is no conditional to it, so you would only be able to place actions in there that would always be triggered... In your case, I don't see much that apply.

If you have any suggestions on a way to integrate this into the plugin, feel free to suggest it...

The email side, I think I can assist with...

I could add, to the monitored device groups:

* Custom Email Text (Text Field) w/Checkbox enabler
* Repeat up to XX times (Number w/Check box enabler)
* Resend email after XX Minutes (Number, enabled if Repeat is Enabled)
* Cancel emails if closed (Check box, enabled if Repeat is enabled)

If you enabled the Repeat, the plugin would create XX time/date actions that would send out the email... If the windows/doors/etc where closed, it would cancel any existing time/date actions...

------
My Plugins for Indigo (v4, v5, and v6) - http://bit.ly/U8XxPG

Security Script for v4 - http://bit.ly/QTgclf
for v5 - http://bit.ly/T6WBKu

Support Forum(s) - http://www.perceptiveautomation.com/userforum/viewforum.php?f=33

Posted on
Sat Aug 18, 2012 3:26 pm
Brandt offline
User avatar
Posts: 414
Joined: Dec 24, 2008
Location: Mission Viejo, CA

Re: Switchboard (Formerly Indigo Security Script)

I'll get back to you on the email thing....right now i'm focusing on text to speech alerts, next will probably be text/SMS and email.

On a side note, do you think you could add a check box that can be selected to add the word 'and' before the last item in the device list variable? That way it will sound more proper when using the variable to speak: "please close the following: master bedroom window, front door, and sliding glass door"

Indigo 7 w/ Dual-Band 2413U PLM
macOS High Sierra 10.13.x
2011 iMac 3.4 GHz Intel Core i7

Who is online

Users browsing this forum: No registered users and 3 guests