Author Topic: turn off heat when no motion detected  (Read 597 times)

Offline jchin

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +0/-0
turn off heat when no motion detected
« on: December 22, 2017, 04:45:45 pm »
How can I setup a scene where if there is no motion detected for 30 minutes, change the temperature on the CT100?
Basically I want to turn off the heat (set it to 65F) if nobody is in the basement.
I just installed a Monoprice motion detector in the room.
This automation is all new to me.

Offline jchin

  • Sr. Newbie
  • *
  • Posts: 47
  • Karma: +0/-0
Re: turn off heat when no motion detected
« Reply #1 on: April 14, 2018, 06:52:03 pm »

I used the light sensor in the motion to trigger instead of motion detection.
So if the lux level increases above 5 lux, it triggers a scene that turns up the temperature.
Another scene is triggered when the lux level goes blow 5 to turn down the temperature.

Offline aecchalet

  • Sr. Member
  • ****
  • Posts: 254
  • Karma: +1/-1
Re: turn off heat when no motion detected
« Reply #2 on: April 26, 2018, 08:07:00 pm »
Several years ago several forum members and I created a LUA script to shut off the AC when there has been no motion in any of my motion detectors for 30 min.  This can be changed to shut off the heat instead.  However I recently managed to also do this with PLEG.  PLEG is a programming virtual device that allows one to create much more complicated scenes that is much easier to use than LUA for most of us non programmers.  If you download the PLEG basics manual and read it about 10 times it will begin to make sense!

With PLEG, you start by identifying you Inputs (Triggers, Schedules and or device Properties).  Then you create a condition that analyzes these inputs to fire an action.  Finally, you define the logical action to be taken, once your desired condition is met or  "true".

Here is a list of my triggers which are active when my motion detectors (MD) are 'no longer tripped': tMDLwHallNoMo, tMDLwMBRNoMo, tMDUpFoyerNoMo, tMDUpGRNoMo and tMDUpMBRNoMo.

Here is a schedule that I defined:
s9a_5P starts every day of week at 9 AM and ends after an 8 hrs interval.  (I didn't want to turn off AC when guests are in my home but in bed or lying on couch watching TV.)

I defined a simple PLEG condition which is true when neither of my thermostats are in the cooling mode because I didn't want the action firing when the ACs was already both off.
cTstatsCooling (Repeats): (pLwTStat_ModeStatus eq "Coolon") or ( pUpTstat_ModeStatus eq "CoolOn")

Here is my condition (Repeats), which consists of my above condition, my schedule and conditional phrases.  It would be positive if any AC unit was cooling and it has been more than 30 minutes since any motion detector was last tripped between the hours of 9 AM and 5 PM:
cTstatsCooling and s9a_5P and (tMDLwHallNoMo; Now > 30:00) and (tMDLwMBRNoMo; Now > 30:00) and (tMDUpFoyerNoMo; Now > 30:00) and (tMDUpGRNoMo; Now > 30:00) and (tMDUpMBRNoMo; Now > 30:00)

I have not been able to use PLEG to define my desired action of turning OFF my ACs.  I just don't see that as a choice for my thermostats (Trane) within PLEG.  Fortunately, you can use a PLEG condition within a regular Vera scene.  I built my Vera scene such that when my above PLEG condition is true, it fires my desired action.  My thermostat appears as a GUI image when creating an action in a Vera scene and one just clicks on the OFF button to turn off each AC.

This is a bit of a work around using a PLEG condition within a Vera scene but it works for me.
Vera Plus 1.7.2138; 12xHRDS1, 2xTrane SCHTZMT400 Tstats; 5xZIR00, 4xCA9000 PIRs; 2xHA01C Recept; 2x2wy ZDW120W switch; 1xAppl (ACT, GE/Jasco), 1xLite Dim Mod (GE/Jasco, Evolve);  2xDead Bolts Schlage

Offline Don Phillips

  • Hero Member
  • *****
  • Posts: 1462
  • Karma: +41/-36
Re: turn off heat when no motion detected
« Reply #3 on: April 26, 2018, 08:48:01 pm »
I have my thermostat controlled by the House Mode, which is triggered by 2 iPhones. Home Mode is on when either phone is home. Away is on when we are both gone, Night Mode is a set schedule, and Vacation mode is manually set, usually via VeraMate on my phone.

So using PLEG, not only are the heating and cooling setpoints set for each mode, but it looks at outside temperature and sets the thermostat to heating or cooling mode. If <60F, turn on Heat. If > 65F, turn on cooling.

With this setup, I seldom look at the thermostat let alone fiddle with it.

Here is my PLEG status report to see how I have it set up.
Vera 3, 1.7.1040, CT101, Everspring Motion, GE/Jasco Switch/Dimmer, Leviton outlet, AeonLabs sensor, NuTone garage door, Blue Iris, Sricam SP011, iPhone locator, APCUPSD, VeraMate, VeraAlerts, PLEG, House Modes, Countdown Timer, DVR, Virtual/Multi Switch, LB60Z-1 bulb, Hue, Alexa, Zooz 4-1