The Vera Community forums have moved!

Advanced => Plugins & Plugin Development => Programming => Nest => Topic started by: rsoares28 on May 19, 2014, 01:51:02 pm

Title: HVAC On and Off Scene question
Post by: rsoares28 on May 19, 2014, 01:51:02 pm
Hello,  I created a scene to turn off my Nest if any windows are opened.  I cant seem to figure out away to turn the Nest back on when I close the window.

I tried creating another scene to turn the Nest on when all windows are closed but I only have the option to act on "tripped" under triggers.. not "closed"

Just some background,  i'm using the DSC plugin with an evisalink 3 for my DSC 1832 alarm system.

Thanks for any help you can provide,
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on May 19, 2014, 02:50:20 pm
Hello,  I created a scene to turn off my Nest if any windows are opened.  I cant seem to figure out away to turn the Nest back on when I close the window.

I tried creating another scene to turn the Nest on when all windows are closed but I only have the option to act on "tripped" under triggers.. not "closed"

Just some background,  i'm using the DSC plugin with an evisalink 3 for my DSC 1832 alarm system.

Thanks for any help you can provide,

Scenes are very basic and have alot of limited functions. When you out grow those, which is very fast you will find that most people move on to the PLEG app in VERA.

In PLEG you can do what you want to plus alot more. You probley don't want to always turn on the AC when all windows are shut though (this means any time all windows are shut it would be on, which is my house that would mean 90% of the time). If you do thats fine, but if not you can add alot more variables also. Using free apps in vera, like the weather app (or maybe you already have a physical temp sensor outside) Now you add to PLEG not only all windows are closed, but its 25 degrees hotter outside then inside and inside thermostat temp is starting to rise so kick on a/c since windows are shut.  Some also do home or away settings. Only do this if I'm also home.

Anyways PLEG will open the doors for so many more options. Check out the Program Logic section of the forum if you get a chance.
http://forum.micasaverde.com/index.php/board,48.0.html
Title: Re: HVAC On and Off Scene question
Post by: waynehead99 on May 19, 2014, 03:44:40 pm
I setup what your doing with pleg myself and just recently added the weather underground plugin into the mix to give me more control.

One thing to add though if your doing ac is to put a delay on everything. I have a 5 minute delay on shutoff and start up so that walking thru a door doesn't shut it off and also to have a delay on startup to protect ac unit from cycling too much.

Pleg really is the only way to go for something like this. Look at the beginner doc as it has an example in there for this that you can build off of.


Sent from my iPad using Tapatalk HD
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on May 19, 2014, 06:09:56 pm
One thing to add though if your doing ac is to put a delay on everything. I have a 5 minute delay on shutoff and start up so that walking thru a door doesn't shut it off and also to have a delay on startup to protect ac unit from cycling too much.

You shouldn't need a Delay on anything as there is already a delay built in your thermostat. My Trane Thermostat defaults and wont let you go any lower then 3 min on and 5 min off (or vise versa I can't rem.) TYou can how ever adjust it longer and this delay is in the thermostat so no matter if you manually turn the a/c from the thermostat or turn it on from and app or have PLEG turn it on there is a built in delay. Adding a Delay to PLEG will only overlap (do nothing) the factory built in delay. 
Title: Re: HVAC On and Off Scene question
Post by: waynehead99 on May 19, 2014, 06:16:55 pm
I still feel better with the delay and it also keeps the AC or heater from turning off when I am just opening a door to walk thru it. No need for it to turn off at all on those cases.
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on May 19, 2014, 06:25:14 pm
I still feel better with the delay and it also keeps the AC or heater from turning off when I am just opening a door to walk thru it. No need for it to turn off at all on those cases.

What ever floats your boat.

As far as opening a door and a/c or heat going off I think is a bit much. That's all how you have your PLEG setup.

If you really wanted to do something like that then only shut the a/c or heat down if any door or window remained open for more then "X" amount of minutes. This would cut your on and off if you were only walking threw.

Even then I would like a warning (alert maybe) rather then an A/C shut down, I wouldn't want to find out a while after the a/c is off cuz someone opened the bath room window and never shut it.

If its a nice day outside and I start opening windows then have PLEG shut off a/c only if 2,3 or more windows are opened that would signal its not an accident I opened 3 windows.


 
Title: Re: HVAC On and Off Scene question
Post by: waynehead99 on May 19, 2014, 11:47:39 pm
What you say makes sense. I have the doors on there too just because we like to have them open when it's nice to let more air in with the screens closed. It's just me and my wife so leaving a window open and forgetting just doesn't happen. And if it did and the AC didn't go on because of it... Well lesson learned :)
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on May 21, 2014, 06:00:53 pm
Wow thanks for all the great replies. I'll certainly look Ito pleg.

So to confirm there's no way (without pleg)for the nest turn back on when I close the door or window I originally opened?
Title: Re: HVAC On and Off Scene question
Post by: waynehead99 on May 21, 2014, 07:44:17 pm
Really no. Vera scenes use or statements on their triggers and you will need and statements.

I guess you could use luup code to do what you want if you know the language.


Sent from my iPad using Tapatalk HD
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on May 21, 2014, 08:20:35 pm
Your limited with scenes.

After that you find your self cutting things short just to make it work in a scene..... Then you test out PLEG (learning curve) once you get a few things going you never want to use scenes because PLEG can do it all plus so much more.

Don't sell your self short the possibilities are endless. Get PLEG going play with it a bit to find out the basics, setting an input, where to put a condition and setting an output. After you get inputs setup post in the PLEG section and someone can help you write a quick condition (as long as we know what you want and what your input names are) then you can start playing with that. 
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on May 22, 2014, 05:52:41 pm
Playing with pleg now.. Pretty confusing but the pay off look worth the effort.  Thanks for the advice everyone
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on May 22, 2014, 06:55:44 pm
Playing with pleg now.. Pretty confusing but the pay off look worth the effort.  Thanks for the advice everyone

The hardest part is the so many different conditions you can create.

Just get your inputs listed, and post what you want to do and someone can give you a quick condition that will get you started. Then you add a action (what will happen when condition is true). Really 3 steps.

Inputs
Conditions
actions
Title: Re: HVAC On and Off Scene question
Post by: AgileHumor on May 22, 2014, 09:37:37 pm
Hello,  I created a scene to turn off my Nest if any windows are opened.  I cant seem to figure out away to turn the Nest back on when I close the window.

For the Nest, I just use the Home/Away to turn it off.  This has the benefit of cooling or heating if your emergency limits are reached (like 50 degrees to keep the pipes from freezing).

Here is how I do it in PLEG:

Trigger:
* DoorsOrWindowOpen = Switch turns on (combination switch plugin for door/window sensors)
* ThermostatOff = Thermostat is turned off

Conditions
* Thermostat_On = !ThermostatOff and (DoorsOrWindowOpen and (DoorsOrWindowOpen;Now > 10:00))
* Thermostat_Off = ThermostatOff and (!DoorsOrWindowOpen and (!DoorsOrWindowOpen;Now > 1:00))

The actions flip home and away.

I've attached my Occupancy PLEG Config Report for more details.

Title: Re: HVAC On and Off Scene question
Post by: waynehead99 on May 22, 2014, 09:59:21 pm
Wow I am gonna have to take a look at that report and steal some things maybe. You have a lot going on there.

Advise for a pleg beginner, start small and simple. Even that report is above my level and I am still learning.
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on May 23, 2014, 08:29:43 am
Thats Awesome AgileHumor!! Thanks for the guidance

I actually got it working yesterday but i like your idea of using home/away as opposed to On/off.

Looks like an amazing tool, i will be sure to donate money to the developer
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on May 31, 2014, 11:10:44 pm
I'm noticing my nest auto sense (turning to away mode when we leave the house) is not working.  Could this scene have anything to do with that?

What i'm thinking is since the windows are closed when we leave the house  the nest is forced to stay in "Home" mode as opposed to auto switching to "Away"

I'm gonna try changing my settings in pleg to reflect Nest off = Off and Nest On = Cool(seeing its summer) as opposed to what it is now; Nest Off = Away and Nest On = Home.

Edit: Wait.. would the above change mean the nest still wont be able to auto away when the windows are closed as windows closed = Cool setting?
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on June 06, 2014, 05:26:32 pm
So its pretty obvious now that the scene I created is overriding the nest auto away.  I figured I will now create a scene to put the nest in away mode once the alarm system is armed "away".  That works, but now I have to create another scene to set the nest to "home" mode once the alarm is disarmed.

Does this sound right?  Kind sounds like when the Dr gives you a pill for an issue, and the pill has side effects that causes other issues that in turn requires more pills lol

Is there a way to turn off the nest when a window is opened (for longer than 5mins) and once the window is closed the nest goes back to normal operation?

Thanks
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on June 06, 2014, 09:34:16 pm
So its pretty obvious now that the scene I created is overriding the nest auto away.  I figured I will now create a scene to put the nest in away mode once the alarm system is armed "away".  That works, but now I have to create another scene to set the nest to "home" mode once the alarm is disarmed.

Does this sound right?  Kind sounds like when the Dr gives you a pill for an issue, and the pill has side effects that causes other issues that in turn requires more pills lol

Is there a way to turn off the nest when a window is opened (for longer than 5mins) and once the window is closed the nest goes back to normal operation?

Thanks

Problem is nest is a smart thermostat and wants to do its own thing. But vera is smarter and capable of alot more. Now your trying to over ride nest and use it as a basic on off switch for your ac . All this is fine but then 250 for what a 90.00 zwave thermostat can do already?
Title: Re: HVAC On and Off Scene question
Post by: rsoares28 on June 06, 2014, 11:19:50 pm
Thanks for the reply.. Makes sense.  So to confirm there is no way to setup the scene where closing the window can return the nest to its normal operation... Meaning not forced to say on the "cool" setting (even though no one is home)  because the windows are closed
Title: Re: HVAC On and Off Scene question
Post by: watou on June 07, 2014, 12:08:06 am
I'm not sure that it matters in this case that the Nest is a "smart" thermostat.  It seems relatively straightforward to write one or two scenes, one that sets Nest to away when the alarm is armed, another (optional one) to set the Nest to home when the alarm is disarmed (or, instead of writing this scene, just walk in the door past your Nest set to auto-away mode, and it will switch itself to home mode).  You wouldn't use the state of the Nest's home/away switch to indicate or trigger anything itself in this scenario, but instead you just set it on or off depending on the alarm system's armed state.  Nest's auto-away, if you have that turned on, will switch to "away" mode after a period of non-activity, but since you aren't relying on Nest's home/away state to trigger scenes, I don't see how that would matter.

As for turning off AC, switching to away, etc., if a window is left open for five minutes, there is the PLEG plugin that people have used to implement this kind of thing successfully.  Search the forums to find those threads.

All the best,
watou
Title: Re: HVAC On and Off Scene question
Post by: integlikewhoa on June 07, 2014, 10:44:27 am
Thanks for the reply.. Makes sense.  So to confirm there is no way to setup the scene where closing the window can return the nest to its normal operation... Meaning not forced to say on the "cool" setting (even though no one is home)  because the windows are closed

PLEG can do this and much more. That's what I use. Scenes run out of options fast. PLEG seems hard at first but you get the hang of it quickly. After you use PLEG you'll never use scenes (or don't need to) as everything becomes easier in PLEG.

It's very simaler as a scene as you set your input, trigger and the output, action but it has a center section called a condition that you can say if this, this and this happen in these input, triggers then do this action.

On top of that you have unlimited options in the conditions. example:

This, this and this in this specific order
(this and this) or this
this before this

So yes when windows closed you can have nest set to a certin state, but you might want to add more to it. Or any time all windows are closed weather a/c is on or off you a/c is going to go to that state. PLEG you can add all windows closed and a/c is on.

You can set it reverse turn a/c off if any windows is opened...... Maybe that's to specific, so turn a/c off if any window is opened more then 5 min. or if more then 2 of any windows are left open. Or if any window is open or any exterior door is left open for more then 2 min. These are all possible in PLEG.

You would set all your inputs doors and windows. You would make a condition called something like "ACHold" or "ACPause" or what ever then make the condition like I stated above.

"ACPause" = Any window opened OR any door open > 2:00min
then ouput or action when that happens would be set to turn your ac off or to away.
You would then have to create an On condition to turn if back on when those reset. But you don't want this to run any time you close all windows and doors or it would always be on when you left. So you need to use something like this.

"ACBackON" = all windows and door closed after "ACPause" has been actived

You might even throw in a virtual switch in the middle to make it easier.