Many people have invested in a smart thermostat that has the ability to do recovery, home/away modes based on presence and leverage these features. I thought since the thermostat already knows so much why now try to link it with SmartThings modes.
The code below is based on the Ecobee having Awake, Home ,Sleep and Away schedule. And that you use the auto settings for the motion detectors that puts the schedule into Auto Home. It’s the same technique I have been used with the Vera systems for others and wanted to being it to SmartThings. I also set flags since they are the easiest way to trigger other activities. It requires Ecobee Suite Version 1.4.x
Update 4/2/2018: Made some improvements over the weekend. Added for vacation and manual program changes. Also reduced the number of calls to the device thus memory footprint:
https://community.smartthings.com/t/release-updated-ecobee-suite-v1-4-0-free/118597
One thing I don’t have yet is a override if the Ecobee goes offline still working on that part of the code.