Ecobee control with motion sensors


(Rey Rios) #1

@yvesracine I am looking for an app that would change the temperature to a specific setpoint when it senses motion, then after a specified amount of time without seeing motion will go back to the ecobee schedule. Ideally, this would be time based and weekday based.

For example, my game room which is upstairs, is hardly used during the day so the schedule temperature during the day is set at 76 degrees. When my kids go there to play on a day there not a school. I want to be able to sense motion and change the temperature to 72. After there is no motion for 45 minutes, it will go back to the schedule temperature. I only want this rule to run from 9am to 5pm.

I tried another smartapp that did this, but I had two problems with it. One, it didn’t go back to a schedule but to a setpoint. Second, it the middle of the night it would reset the temp (although I told it only to do from 9-4) and the temp would change to 76.

I tried one of @yvesracine apps but it does not really allow to set a temperature and it also requires you put values for an outdoor sensor. It cannot not also be timed controlled, so in the middle of the night it would change my temp.

Any ideas or other apps that would be able to accomplish this? I have the Ecobee Smart SI, not the Ecobee 3.

Thanks!


(Yves Racine) #2

@rey_rios, first, please let me know which smartapp you’ve tried so far.

The way you describe the smartapp, it looks like it is the MonitorAndSetEcobeeTemp smartapp, but it does not look like an exact match based on your feedback.

Did you try the 2 following smartapps (which don’t require an external outdoor sensor)?

The ecobeeSetZoneWithSchedule will use your ecobee Smart SI`s scheduling capabilities and adjusts the setpoints at the thermostats based on motion and outdoor temp sensors (if needed). The schedules defined are dependent on your predefined programs set at ecobee.

I don’t know if if this is the smartapp that you previously used or not.

https://github.com/yracine/device-type.myecobee/blob/beta/smartapps/ecobeeSetZoneWithSchedule.groovy

Otherwise, there is similar one where you can define your own schedule times and setpoints (or ecobee climates).

It is called ScheduleTstatMultiZonesSetup:

https://github.com/yracine/device-type.myecobee/blob/beta/smartapps/ScheduleTstatMultiZonesSetup.groovy

Between the 2 smartapps, I think that one of them should meet your use case.

Let me know.
Regards.


(Rey Rios) #3

Thanks. let me try those. This is the one I tried: MonitorAndSetEcobeeTemp


(Yves Racine) #4

@rey_rios, just to let you know, I don’t understand the following statement about MonitorAndSetEcobeeTemp:

“I tried another smartapp that did this, but I had two problems with it. One, it didn’t go back to a schedule but to a setpoint. Second, it the middle of the night it would reset the temp (although I told it only to do from 9-4) and the temp would change to 76.”

You cannot specify any adjustment timeframe (ex. 9-4) in the MonitorAndSetEcobee smartapp.

You could do it in ScheduleTstatZones. The only drawback is that the smartapp entirely relies on the ST scheduling capabilities, and (as you may be aware of) there are a lot of scheduling issues with the platform at the moment.

That’s why I created ecobeeSetZoneWithSchedule which relies more on ecobee’s own scheduling to do about the same.

Regards.


(Rey Rios) #5

Sorry for the confusion, that statement was from another smartapp I found on the forum.


(Rey Rios) #6

I couldn’t get the ecobeeSetZoneWithSchedule to work for me.

Here is what I did.

Main Ecobee: Upstaris (which is really the only one I want to manage with motion)
Rooms = 1
Zones=1
Schedules=1

Room setup
Upstairs thermostat

Motion sensor=Game Room Motion

Threshold=15 minutes (which I assume means it will run for 15 minutes after the last motion is detected)

Zone 1; includes Gameroom room

I tried “Will do temp adjustment only when Occupied” on and off and didnt get any notifications or changes in thermostat

Schedule 1

Name = Present

ecobee program = Sleep (which is the one I have for a 72 temp)

Zones inlcuded = 1: Gameroom

Set room thermostat only is set to on


(Yves Racine) #7

@rey_rios, to get more information about the capabilities of the 2 smartapps, look at this thread:

For your use case, here are my setup recommendations:

  1. Use a different program from Sleep as this default ecobee program is usually used at Nights only

Use the ecobee portal or your ecobee app to do so.

You can create a new program, call it (for example) “NoKidsAtHome” and set the cooling setpoint to 76 (you should also set a heating setpoint for the Winter)

Alternatively, you can also use the ‘Away’ program at the ecobee portal if the temp settings are the same as when no Kids are At Home. This would be easier and quicker for you to set it up.

  1. Set your Upstairs’ Home program to the desired temperature (72) when the Gameroom is occupied.

You can do this at the ecobee portal or via the ecobee app.

  1. Assign the new ecobee (NoKidsAtHome) or the Away Program for the 9-5 timeslot at the Upstairs thermostat (I don’t know if you have many in your house or not)

You can do this at the ecobee portal or via the ecobee app.

  1. In ecobeeSetZoneWithSchedule, if you want to just adjust the Gameroom’s temp when it is occupied, then
  • Do the room, zone, and schedule setup (in your case, it’s already done)

In the general setup page:

  • Set your main thermostat to [Away,Present] based on all Room Motion Sensors to ‘on’
  1. Adjust the room settings for your specific use case:

In your Game room setup:

  • Don’t set up any room thermostat as this is used only when you have a main thermostat and some additional room thermostat(s) for fireplace(s), electric baseboard(s) in the room.
  • Don’t set up any vent switches (this feature could be used later if you are planning to have smart vents to direct your cooling/heating air flows to the right zone).
  • Indicate which motion sensor to be used to detect motion in the Game room
  • You can also set up an additional temp sensor in the room if your Upstairs thermostat is far from the Game room for better temp adjustment
  • “Will do temp adjustment only when Occupied”: set it to ‘on’
  • Threshold in minutes for motion detection: The adjustment will only be done if the smartapp has detected motion or no motion in the last ‘x’ minutes.

If you set it to 45 minutes, then the smartapp will do the temp adjustement based on the last 45 minutes (if it has detected motion or not). You can set it up to a smaller time window if needed, so the smartapp will be more reactive to any change in motion (15 minutes is the default).

  1. Adjust the schedule settings for your specific use case:
  • Set the ecobee program associated to this schedule to NoKidsAtHome or Away depending on your choice at step 3)
  • Don’t set up any More/Less Heat/Cool thresholds as you don’t want to use an outdoor temp sensor or a weather station for temp adjustment
  • Set up the max temp adjustment to 4F.
  • Leave the Set Room Thermostats Only flag to ‘off’ as you don’t need this feature in your case.

That should be it.

The smartapp should then be able to make temp adjustment at your Upstairs thermostat when the game room is occupied only and then set the cooling setpoint to 72 (Home program). Otherwise, the default program will run at the ecobee thermostat (Away or NoKidsAtHome).

Let me know how it goes.

Regards.

P.S. For the rest of the day, you can set up any other ecobee programs (ex Sleep at Nights) at the ecobee portal.
I’d also suggest to set up the holdType parameter in My Ecobee Device to nextTransition so that any hold will be valid till the next Transition according to your ecobee’s program scheduling.


(Rey Rios) #8

I think it might be working but I am not sure yet. I got a text confirmation, but it didn’t change the setpoint. It kept it at 76.

Quick questions about the threshold, does it mean that it needs to wait for 15 once motion is detected to change the temp? or does it mean once motion is not detected, it waits 15 minutes to change back the setpoint.

I will play a little bit more later. Getting some progress.


(Yves Racine) #9

@Rey_Rios, when the smartapp runs (every 5 minutes), it will check whether there has been motion in the last ‘x’ minutes. If motion has been detected, it will trigger the program/climate change, otherwise, it will not do any program/climate adjustment.


(Rey Rios) #10

Here the text message I got:

ecobeeSetZoneWithSchedule>schedule Present, in zones=[1:Gameroom],cooling setPoint now =76.0°,adjusted by avg temp diff (0.0°) between all temp sensors in zone

The Away mode is on right now at 76 and it kicked off but did’t change the temp.


(Yves Racine) #11

@rey_rios, it should change the program/climate to ‘Home’ (cooling setpoint should be set at 72 prior to execution) when somebody is detected in the Game room. If no motion is detected, it will leave the temp at 76.

The msg that was sent just notifies you that the Away climate/program was initially set for the 9-5h timeslot.

At the next run (in 5 minutes) and any subsequent ones (between 9-5), the smartapp will check if motion has been detected and adjust the program/climate (with the right temp/fan settings) when needed.

Bye for now.


(Rey Rios) #12

Great. I had the Schedule ecobee program of the Schedule Setup set to Home, thinking that is what it will change it too.

I changed that to Away (after re-reading your instructions)

Now it seems to work. I will play with it. Once thing that it seems to be working flaky is the text. Some times I receive it and most times it fails. I don’t wan to do notifications since my wife would be getting those as well.

Thanks for your help. This is was a bit cumbersome but I finally got it. Thanks for your patience.


(Rey Rios) #13

The only problem I see if that if I putmy kids to sleep and I walk by the motion detector afterwards, it will change my temp when there is no movement back to Away. The whole second story is gameroom and their bedrooms. Is there a way I can tell it to stop motion detection at a specific time or simply go back to program instead of away?


(Yves Racine) #14

@rey_rios,

Just grab the latest code (v1.1)

I added another check to make sure that a temp/fan settings adjustment will only be done during the schedule run (in your case, ‘Present’) associated to the default ecobee program for the 9-5 timeslot ( ‘Away’ as specified in a previous post).

To answer your point, you don’t need to specify a timeslot within ecobeeSetZoneWithSchedule as the smartapp relies on the ecobee’s scheduling: you’ve already defined ‘Away’ as your default program from 9-5 at ecobee.

The smartapp will resume your program (to ‘Away’ as this is your default program for the 9-5 timeslot) only if there is no more motion in the Game room (according to your threshold) after motion was detected.

P.S. If you don’t want any temp adjustment after 5h pm for example, you just need to assign the ‘Sleep’ program schedule or any other program than ‘Away’ (with the temp/fan settings of your choice for the Night) at ecobee from 5h pm to 9 am.

My Smartapp will not make any temp adjustment for the Sleep program schedule , only for the ‘Away’ program schedule as defined in ecobeeSetZoneWithSchedule.

If you want to control everything from SmartThings based on timeslots, then the scheduleTstatZones smartapp will be a better choice. However, like I said in an earlier post, given the ST scheduling issues at the moment (hopefully, they will be fixed soon), this smartapp is less reliable than ecobeeSetZoneWithSchedule.

Regards.


(Yves Racine) #15

@rey_rios, any texting issue should be reported to ST support as I only use the default sendSms method available to me… In brief, I don’t have any control over the ST texting issues.


(Rey Rios) #16

Now is working as intended. Thanks you so much! :smile:


(Rey Rios) #17

I noticed that with the new updated version this is not working again. I see that SZWS (SetZoneWithSchedule) changes the mode from Away to Custom, but I see no changes in the temperature. I have selected max of 4.

Anyway I can troubleshoot this? Form the logs?

https://drive.google.com/open?id=0B-8oXPtMyr9Xbm01V2U0QkdpMzg

https://drive.google.com/open?id=0B-8oXPtMyr9XNDVNSVA4X2t5dnM


(Yves Racine) #18

@rey_rios, I don’t have access to those logs…


(Yves Racine) #19

@rey_rios, when you say: I don’t see any changes in temperature; do you mean at the physical thermostat, at the portal, or for My Ecobee Device (under Things)?

If you see the mode changing to Away to Custom, then it means the a program schedule change has been done. Please double check that you have the right temperature settings for the Home program/climate.

Regards.


(Rey Rios) #20
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug End of Fcn
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>schedule Present, set all ventSwitches at 25% to avoid closing all of them
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>schedule Present, in zone Gameroom, room Gameroom, temp_diff_at_sensor=-0.19999695, avg_temp_diff=0.0
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>schedule Present, in zone Gameroom, no data from temp sensors, exiting
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug getAllTempsForAverage>looping thru all rooms,now room=Gameroom,indiceRoom=1, needOccupied=true
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>zone=1:Gameroom: zoneDetails= [1, Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>schedule Present, desiredTemp=75.0
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:50 PM: debug adjust_vent_settings_in_zone>schedule Present: zones= [1:Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:49 PM: debug End of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: trace check_if_hold_justified>state=[lastScheduleName:Present, scheduleHeatingSetpoint:0, scheduleHeatSetpoint:0, setPresentOrAway:present, programSetTime:1437159109455, programSetTimestamp:2015-07-17 13:51, scheduleCoolSetpoint:0, scheduleCoolingSetpoint:0, programHoldSet:Away, lastScheduleLastName:]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: trace check_if_hold_justified> currentSetClimate = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: trace check_if_hold_justified> currentProgName = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: trace check_if_hold_justified> ecobee Mode = cool
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: trace check_if_hold_justified> location.mode = Home
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: debug Begin of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:56:48 PM: debug setZoneSettings>found schedule=Present, scheduled program at ecobee=Away...
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug End of Fcn
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>schedule Present, set all ventSwitches at 25% to avoid closing all of them
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>schedule Present, in zone Gameroom, room Gameroom, temp_diff_at_sensor=-0.19999695, avg_temp_diff=0.0
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>schedule Present, in zone Gameroom, no data from temp sensors, exiting
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug getAllTempsForAverage>looping thru all rooms,now room=Gameroom,indiceRoom=1, needOccupied=true
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>zone=1:Gameroom: zoneDetails= [1, Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>schedule Present, desiredTemp=75.0
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:49 PM: debug adjust_vent_settings_in_zone>schedule Present: zones= [1:Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: debug End of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: trace check_if_hold_justified>state=[scheduleHeatingSetpoint:0, lastScheduleName:Present, scheduleHeatSetpoint:0, programSetTimestamp:2015-07-17 13:46, programSetTime:1437158810078, setPresentOrAway:present, scheduleCoolSetpoint:0, scheduleCoolingSetpoint:0, programHoldSet:Away, lastScheduleLastName:]
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: trace check_if_hold_justified> currentSetClimate = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: trace check_if_hold_justified> currentProgName = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: trace check_if_hold_justified> ecobee Mode = cool
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: trace check_if_hold_justified> location.mode = Home
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: debug Begin of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 1:51:48 PM: debug setZoneSettings>found schedule=Present, scheduled program at ecobee=Away...