Author Topic: If door is opened for 5 minutes...turn off air  (Read 36279 times)

Offline aecchalet

  • Full Member
  • ***
  • Posts: 221
  • Karma: +1/-1
Re: If door is opened for 5 minutes...turn off air
« Reply #120 on: September 15, 2016, 05:41:51 pm »
I recently updated to Vera Plus from Vera 3 and undated the firmware to 1.7.2138.  I was speaking with Vera support about problems with getting my vera 3 online when I made this decision so they helped me with the transition.  They recommended that I not transfer my scenes and devices but recreate them.  This should make the system perform much more quickly. 
I decided to take Richard T. Schaffer's advice and try to do this with PLEG. (I had some trouble loading PLEG and PLC, which are the subject of another string.)
I would appreciate any comments on my first PLEG device, described below.

I created inputs using a trigger for each window and door sensor and each motion detector being tripped.
Here is the condition that I created, which would be positive when any sensored door or window was open for more than 60 seconds:
DoorWinOpen = ( tLFrBRWnOpen and ( tLFrBRWnOpen; Now > 00:60)) or ( tLHallWnOpen and ( tLHallWnOpen ; Now > 00:60)) or ( tLBkBRDrOpen and ( tLBkBRDrOpen; Now > 00:60)) or ( tLHallDrOpen and ( tLHallDrOpen; Now > 00:60)) or ( tLFrBRDrOpen and ( tLFrBRDrOpen; Now > 00:60)) or ( tLMstrBRDrOpen and ( tLMstrBRDrOpen; Now > 00:60)) or ( tULanaiDrOpen and ( tULanaiDrOpen; Now > 00:60)) or ( tUHallWnOpen; Now > 00:60)) or ( tUFrDrOpen and ( tUFrDrOpen; Now > 00:60)) or ( tUMstrBRWnOpen and ( tUMstrBRWnOpen; Now > 00:60))

Here is the condition that I created, which would be positive when it has been more than 30 minutes since any motion detector had tripped between the hours of 9 AM and 5 PM:
MDNotTrip = ( tLHallMDTrip; Now > 30:00) and ( tLMstrBRMDTrip; Now > 30:00) and ( tUGRMDTrip; Now > 30:00) and ( tUMstrBRMDTrip; Now > 30:00) and ( tUFoyMDTrip; Now > 30:00) and (09:00:00 < NOW < 17:00:00)

Then I created a logical action, which would be activated and change the SetModeTarget for each of of my 2 Trane thermostats to Off whenever the above conditions were true.  Do I need to make that "Off"? (I set options to repeat for these actions.)

The PLEG instructions say that I must restart Vera and reload browser for any newly created PLEG device to work properly.  Does that mean remotely reboot?
The instructions also say to click the Reload Luup button on the inputs, conditions or actions page.  My UI7 editor doesn't have a Reload Luup button on those pages but there is a Reload Lua button on editor options button drop down and a save changes button under the PLEG device.  I hit both of those.  Anything else that I need to do to save this?  Where is the backup button?
 
Do these conditions and logical actions look correct?

I need to test this PLEG device remotely, since I am 3000 mi away. I can set my thermostats on remotely and check remotely to see if they stay on so I don't need a dummy device to be acted upon.  Any suggestion on how I can test the conditions remotely?  I understand that I should make a dummy door/window sensor and trip it but don't know how to do either of these.  If I am supposed to use a virtualswitch and/or variablecontainer to do the test I don't understand how.

Thanks for any help!
 
« Last Edit: September 15, 2016, 10:54:18 pm by aecchalet »
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 2xAppl (ACT, GE/Jasco), 6xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolt Schlage

Offline aecchalet

  • Full Member
  • ***
  • Posts: 221
  • Karma: +1/-1
Re: If door is opened for 5 minutes...turn off air
« Reply #121 on: September 15, 2016, 10:44:01 pm »
My guest just arrived so I have people triggering motion detectors.  The motion detection part of this script doesn't work properly.  I rebooted vera and refreshed the browser then armed the PLEG device.  At that point, no one had trigger a motion detector or opened a door or window but it kept shutting off my AC within a minute of me turning it on.  I know it was the PLEG device because it stopped shutting off the AC when I put in in bypass mode.  Because this happened so quickly (<= 1 min), can I presume that the problem is in the DoorWinOpen condition?  It was 4 pm there so the time interval was true.
Anyone see any obvious mistakes?
Thanks
« Last Edit: September 15, 2016, 10:54:44 pm by aecchalet »
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 2xAppl (ACT, GE/Jasco), 6xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolt Schlage

Offline RichardTSchaefer

  • Master Member
  • *******
  • Posts: 9572
  • Karma: +729/-136
    • RTS Services Plugins
Re: If door is opened for 5 minutes...turn off air
« Reply #122 on: September 16, 2016, 06:13:29 pm »
I tend to ignore requests that do not include a STATUS report generated at the time of the problem to see both your logic and the state and sequence of Inputs and Conditions.
 

Offline aecchalet

  • Full Member
  • ***
  • Posts: 221
  • Karma: +1/-1
Re: If door is opened for 5 minutes...turn off air
« Reply #123 on: September 03, 2017, 08:35:36 am »
Richard, It has been a year since I wrote the PLEG program to control my AC.  I only visit my home 4 times a year and have had a variety of problems with sensors and locks but everything appears to be stable.  How do I generate a STATUS report?
Do I need to create a schedule in order for the PLEG programs to run all of the time?
I have wasted a lot of money on AC in the past year and would like to get these controls running.  Thanks for any assistance that you can give.
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 2xAppl (ACT, GE/Jasco), 6xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolt Schlage

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +18/-7
    • Worthington Engineering, Inc.
Re: If door is opened for 5 minutes...turn off air
« Reply #124 on: September 03, 2017, 11:22:09 am »
Try this:
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.

Offline aecchalet

  • Full Member
  • ***
  • Posts: 221
  • Karma: +1/-1
Re: If door is opened for 5 minutes...turn off air
« Reply #125 on: September 04, 2017, 01:08:38 am »
I made some changes to my devices then went to editor options/reload Lua.  Then I clicked on status report and nothing happened. 
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 2xAppl (ACT, GE/Jasco), 6xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolt Schlage

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 812
  • Karma: +18/-7
    • Worthington Engineering, Inc.
Re: If door is opened for 5 minutes...turn off air
« Reply #126 on: September 04, 2017, 09:46:16 am »
Make sure pop ups are enabled.  You will get a new browser window with the status report.  You can then save/print it as a PDF and upload it here.  Here is a sample.
Vera 3, UI7 1.7.947, CT101 t-stat, Everspring motion detector, GE/Jasco switch, Leviton outlet, AeonLabs door sensor, Insteon garage control, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual & Multi Switch, Weather, Sys. Mon.