Ecobee control with motion sensors

None of them change the temperature, but they change the mode to custom and the hold until the next transition. So it looks like is doing the change but not reflecting the value given.

By the way, I didn’t make any changes and beofre all the updates I had it working. I also performed the registration (next until done) on the app and even made some changes on the timing to make sure it was correct. Thanks!

Here is text I recevied. As you can see, it says setPoint now at 75.


@rey_rios, as you’ve upgraded the smartapp during execution, state variables may be the issue.

I suggest to wait and see as the issue will correct itself at the next scheduled run.

If you upgrade your code to the latest version that I just checked in (v1.4), I added some additional conditions to avoid the notification above which is misleading (resume program when motion is detected).

Regards.

Thanks. I will update and try tomorrow. Have a great weekend.

Unfortunately this is still not working. I can see that your app changes to Custom, but there is no change in temperature. In fact if I look at SmartTiles, I see that it change the temp because your app does decimals in the temp.

Text still tells me the change was made but no change (diff)

Set by the app and put on Hold:

Finally my Schedule.

Hello @rey_rios,

I’m currently testing the smartapp at home, and for the moment, it seems that it works as intended.

However, for your use case, I’d suggest the following:

  • Grab the latest code at github (V1.9.2), save and publish.

  • Execute the smartapp on your device by pressing the ‘gear’ icon under My Apps, and then ‘next’ at each screen till done. That way, you’ll ‘update’ the smartapp and reset the state variables that may be the cause of your issues.

Let me know after if the smartapp sets a ‘home’ hold (desired temp=73F) at ecobee when motion is detected in the game room.

Thank you for your patience.

P.S. I added some additional conditions to avoid changing the mode to ‘away’ when the current default program is set to ‘Away’, which seems to be the case you describe above.

Regards.

Still not working. Pasting the logs to see if you see anything out of the normal. Thanks!

 9:47:34 AM: debug End of Fcn
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_tstat_for_more_less_heat_cool>no outdoor temp sensor set, exiting
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug ecobeeSetZoneWithSchedule>schedule Present:max_temp_diff= 4.0,temp_diff=0.0 for cooling
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>schedule Present,all temps collected from sensors=[]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug isRoomOccupied>result = true
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug isRoomOccupied>room Gameroom has been occupied, motion was detected at sensor Game Room Motion in the last 15 minutes
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug getAllTempsForAverage>looping thru all rooms,now room=Gameroom,indiceRoom=1, needOccupied=true
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>schedule Present: looping thru all zones, now zoneName=Gameroom, about to apply room Tstat's settings
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>zone=1:Gameroom: zoneDetails= [1, Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>schedule Present: zones= [1:Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug ecobeeSetZoneWithSchedule>set main thermostat Upstairs to present mode based on motion in all rooms
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug sending text message
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug verify_presence_based_on_motion>in Gameroom,presence detected, return true
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug isRoomOccupied>result = true
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug isRoomOccupied>room Gameroom has been occupied, motion was detected at sensor Game Room Motion in the last 15 minutes
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug End of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: trace check_if_hold_justified>state=[lastScheduleName:Present, scheduleHeatingSetpoint:0, scheduleHeatSetpoint:0, setPresentOrAway:, programSetTime:null, programSetTimestamp:, exceptionCount:0, scheduleCoolSetpoint:0, scheduleCoolingSetpoint:0, programHoldSet:, lastScheduleLastName:]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: trace check_if_hold_justified> currentSetClimate = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: trace check_if_hold_justified> currentProgName = Away
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: trace check_if_hold_justified> ecobee Mode = cool
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: trace check_if_hold_justified> location.mode = Home
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug Begin of Fcn check_if_hold_justified
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:26 AM: debug setZoneSettings>found schedule=Present, scheduled program at ecobee=Away...

Hello @rey_rios, the log you sent me reflects a normal behavior of the smartapp, as you can see in
bold below. When motion is detected in the game room, it sets the main thermostat to ‘Home’ (present).

I will do some further testing at my home, but this looks normal.

You should check if My Ecobee device has no other exception in the logs that would impede its normal behavior, because the smartapp behaves the way it should.

If no exceptions are found at the device level, then I’d recommend to uninstall and reinstall the smartapp.

Sorry about the inconvience.

009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug isRoomOccupied>room Gameroom has been occupied, motion was detected at sensor Game Room Motion in the last 15 minutes
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug getAllTempsForAverage>looping thru all rooms,now room=Gameroom,indiceRoom=1, needOccupied=true
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>schedule Present: looping thru all zones, now zoneName=Gameroom, about to apply room Tstat’s settings
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>zone=1:Gameroom: zoneDetails= [1, Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug adjust_thermostat_setpoint_in_zone>schedule Present: zones= [1:Gameroom]
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug ecobeeSetZoneWithSchedule>set main thermostat Upstairs to present mode based on motion in all rooms
009d3cbf-7d81-41e7-bc36-f99df54740b6 9:47:34 AM: debug sending text message

Regards

P.S. Please PM the logs next time as this takes a lot of space in the forum thread.

Should the highlighted be Home and not Away?

Hi @rey_rios,

  • The default program at ecobee is ‘Away’ (temp=75F) for 9-5 and the schedule ‘Present’ is associated with this program in the smartapp. So the hightlighted trace just indicates that the default program is ‘Away’ when the schedule Present is run (you may want to change the schedule Name to ‘Away’ to better reflect the default program in the game room).

  • When motion is detected in the game room in the last 15 minutes, then the ‘Home’ hold is set by the smartapp and the temp should change to 73F.

  • In subsequent runs of the smartapp (it runs every 5 minutes), if there is no motion in the game room, then the ‘home’ hold will be removed, and the default program (Away) will be resumed.

The logs that you sent me so far just reflects the above behavior, which is the intended logic actually coded in the smartapp.

P.S. I’m currently testing the smartapp to make sure that it works as intended at my home.

Here is what the change is doing. It does a change, but it defaults to the Away mode, not the Home mode.

Also, wanted to double check this setting is ok:

Hello @rey_rios, did you get my PM message?

I’d recommend to follow the instructions in the message I sent you and uninstall the smartapp, and reinstall it just to be sure that you have a clean state.

I’ve been testing my latest versions at home, and it works really well so far, and my setup is more complicated than yours (several schedules, many motions & temp sensors).

So far, all the logs I got from you just reflect the smartapp’s normal behavior, which is (between 9-5):

  • If there is motion in the gameroom, it will set the thermostat mode to present (Home program).

  • Otherwise, you should receive a notification (if detailed notification is set to true) when there is no motion in the last x minutes in the game room, and the thermostat’s default program (Away) will be set/resumed.

Based on the settings I’ve seen, your settings seem to be fine provided that you followed my detailed instructions that I sent you few posts earlier (2 weeks ago).

Regards.

Yes, I did. But when I try to delete the app from IDE I get this:

I am the only user.

@rey_rios, in order to uninstall the smartapp:

(1) Click on https://graph.api.smartthings.com/location/list

(2) Click on the smartapps link at the end of your location

(3) All the smartapps will be listed under your location, click on ‘edit’ at the top of the screen

(3) Scroll down to ecobeeSetZoneWithSchedule

(4) Click on uninstall (in red) on the line for ecobeeSetZoneWithSchedule

That should take care of it. You’ll then be able to reinstall it.
Regards.

Thanks. The app does not appear there, but here is what I did. I renamed it to “ecobeeSetZoneWithScheduleXX”. Created a new SmartApp. Now it seems to be working again!

Something was wrong with the previous one (I guess some residual stuff) but now it changes to home. I will keep an eye on it and see if it works as intended during the week. Thanks!