EcobeeStateTriggerHA

The Unofficial SmartThings Blog
Jump to: navigation, search
This smartapp is Ecobee approved badge YVESR.png
ecobee3 Thermostat with Sensor, Wi-Fi, 2nd Generation, Works with Alexa

ecobee3 Thermostat with Sensor, Wi-Fi, 2nd Generation, Works with Alexa

Category: My Apps

Author:Yves Racine

ST Community handle http://community.smartthings.com/users/yvesracine/activity

Company Link: http://www.ecomatiqhomes.com#!home/mainPage

Code location: http://github.com/yracine/device-type.myecobee/tree/master/smartapps


If you like My Ecobee Device and related smartapps, please support the developer by clicking on the paypal link below:

https://paypal.me/ecomatiqhomes



Summary

ecobeeStateTriggerHA, the smartapp that allows you to do (quasi) RT automation based on ecobee's thermostatOperatingState within SmartThings

Typical use case: you may want to turn on/off switches or execute a routine when the thermostatOperatingState has changed (idle,cooling,heating,fan only)

Prerequisites

 * ecobee device connected to ST via MyEcobee device
    => see http://thingsthataresmart.wiki/index.php?title=My_Ecobee_Device
 * Use of pollster or a smart rule engine to refresh My Ecobee device every minute or so (for quasi real-time processing).
  https://github.com/statusbits/smartthings/blob/master/smartapps/statusbits/pollster.src/pollster.groovy

Supported Features

  • The smartapp subscribes to your ecobee thermostat's OperatingState for any mode change.
  • The smartapp can execute a routine based on your events selection
  • The smartapp can turn on/off or flash some switch(es) based on your events selection
  • Multiple instances of the smartapp can be created to cover all your HA needs
  • The list of RT events supported are the 'cooling, heating, fan only, idle'


Troubleshooting

.................................................................................................................................

Issue #1: I don't know how to create a custom smartapp

.................................................................................................................................

See the explanations of a fellow community member here:

http://community.smartthings.com/t/faq-an-overview-of-using-custom-code-in-smartthings/16772

And, here are some basic explanations with screenshots.

  • Point your browser to you SmartThings IDE for your country (i.e. http://ide.smartthings.com or whatever your shard is) and Log In.

Loginscreen.jpg

  • Once you are logged in, find the My SmartApps link on the top of the page. Clicking My SmartApps will allow you to produce a new SmartApp.

MySmartApps.png

  • Find the button on this page labeled +New SmartApp and click it.

+NewSmartApp.png

  • Since you already have the code in your computer’s clipboard, find the tab along the top section called From Code. In the area provided, paste (typically CTRL+V) the code you copied from GitHub. Click Create in the bottom left corner of the page.

NewSmartAppCreate.png

  • This will bring up another page, with the code now formatted within the IDE. If the code was copied correctly, there are no other steps except to save and publish the code. In the upper right corner of the page, find and click Save. Now, click Publish (For Me), and you should receive a confirmation that the code has been published successfully.

SavePublish.png


You can also use the github integration and update your repo:


GitHub Settings:

Owner: yracine

Name: SmartThingsPublic

Branch: master

You then need to save & publish each "edited" smartapp.


.................................................................................................................................

Issue #2: I created the smartapp in the IDE, but I don't know where to execute it

.................................................................................................................................

For the initial setup, under the ST app, click on the Marketspace item in the bottom menu, and then, on the smartapps link and finally, MyApps (last item in the list).

If you still do not see your smartapp, please make sure that you have published it in the IDE!

For any subsequent execution, under the ST mobile app, click on automations>smartapps in the bottom menu. The list of installed smartapps will then appear.


.................................................................................................................................

Issue #3: I want to upgrade the code but I don't know how

.................................................................................................................................

Most of the time (unless specified otherwise), you just need to copy and paste the smartapp's new code into the IDE at:

https://graph.api.smartthings.com/ide/apps

- Click on the smartapp that you want to update

- Paste the code into the code window (and make sure to copy all the lines)

- And save & publish.


You can also find the smartapps under the SmartThingsPublic github repo. If you have the github integration, you just need to select the ecobee apps that you need when you "Update from Repo" (yracine is at the end of the "New - only from github" list).

GitHub Settings:

Owner: yracine

Name: SmartThingsPublic

Branch: master


.................................................................................................................................

Issue #4: I want detailed Logging/Notifications

......................................................................................................................................

In order to have detailed Logging/Notifications, you'd need to do the following:

  • a) Notifications & Other Settings Setup> On the last setup page, set the following flag to true
   input "detailedNotif", "bool", title: "Detailed Logging & Notifications?", required:false


  • b) To receive push notifications, answer 'Yes' to the following input parameter
   input "sendPushMessage", "enum", title: "Send a push notification?", metadata: [values: ["Yes", "No"]],


.................................................................................................................................

Issue #5 - My new Ask Alexa's Message Queues are not showing up in the smartapp

.................................................................................................................................


You'd need to execute the ecobeeStateTriggerHA smartapp under Automation/Smartapps in the ST mobile app by doing "Next" till "Done" to subscribe to the new AskAlexaMQHandler. The new handler will then be able to process any Queue refresh value from Ask Alexa.


You can then go to the AskAlexa smartapp, and make any queue changes... The updated queue values will be then sent to the smartapp.