Thermostat SmartApps that uses Virtual Switches to control Mode/Fan/SetPoints

@DarcRanger - thanks for all your work on this. I am totally new to SmartThings and all it’s associated apps / community / etc. I have a CT100 that I successfully joined to my hub as well as an Amazon Echo that can control devices on my hub. I have tried as best I could to follow your directions listed throughout this thread but seem to be coming up short.

I was able to create the new Device Type in IDE and create a new device (although none of the types you reference in this thread are an exact match). I seem to be at a loss for where to go from there. You mentioned SmartTiles so not sure if that is required (or to be honest what it is).

At this point all I’m really trying to do as I swap over all my z-wave devices from an Alarm.com panel to ST is control the CT100 via voice using Echo. If you don’t want to spend a bunch of time walking a total newbie through this I totally understand. Perhaps you could suggest some topics that I should read up on to learn more about the functionality of SmartApps and how to leverage the awesome work you and others have shared.

Thanks in advance.

@Jeremy_Bryant,

SmartTiles is not required, it was what prompted me to create the first app. Access to the Echo was a side benefit that expand to additional apps to get certain function accessible via switches.

Where exactly are you stuck in the process and which app Mode/Fan or one of the setpoint ones? What is the issue, using the app to select the type of switches then finding them through the app or selecting the thermostat? Or creating virtual switches based on device type.

@DarcRanger I’m looking at just Setpoint as I can change the mode myself. I created the Device Type with your code from Github and then created a device. I was a little confused on the Type setting in Device as I couldn’t find one named “Virtual Momentary Dimmer”. Closest I could find was just labled “Momentary Capability”. I chose that, added my location and hub and created / published both.

At that point I’m not sure what to do and where the Echo integration comes into play. Do I need to create the virtual switches if I only want to use Setpoint?

**Updated - I should note I am using the V2 hub if that makes a difference.

The normal Momentary switch in the IDE is called Momentary Button Tile. You should be able to go to the IDE under “My Devices” and edit the switch to change the device type “Momentary Button Tile” without the need to create new switches. My device type is called "Momentary Dimmer and it would appear near the bottom of the list. The device list in not quite in alphabetical order. The original device types are, but any custom device types appear near the bottom of the list.

Once you edit the device types of your switches to either the ones listed above, the you need to find and install my app from your phone app. In the phone app select the last icon and the bottom of the screen that looks like the sun. On that screen you will see Things and SmartApps at the top of the page. Select the SmartApp option. Then scroll to the bottom of the page and select My Apps. On that page you should see a list of smart apps that have been published to your app list. Select the app that you published in the IDE for the SetPoint.

If you only save and not published your app in the IDE, go back there ans select the “My SmartApps” link and fine the app. Open that link and when the code appears click the publish button on the upper right portion of the screen.

As for the Echo integration, the Echo can only interact with switches and dimmers, so using virtual ones brings the control through the Echo. Also to add SmartThings to the Echo, you need to go into the Echo settings via the app or website and go to Home Automation. From there you should see the SmartThings option. Select that and follow the prompts to select the switches that can be used by the Echo. Once that selections is done either push the Discover my devices link in the app or ask the Echo to discover you devices.

I do not have V2 hub yet, but no has come to me with capability issues yet.

Let me know if you need more information.

Thanks - I think I’m almost there. I’ve created the two devices for heat / air but based on your recent reply I’m confused on whether I paste your code into the “My Device Types” or “My Smart Apps” sections of the IDE or both. I ended up with it in both, went through the MyApps section and configured it. Alexa can see the devices but says that command isn’t available on “insert my device name here”… I created two and named them “Heat” and “Air”.

In the IDE paste my SmartApp to control the thermostat under your smartapps. Paste my device code “Momentary Dimmer” into your Device types. The IDE will give you an error message if the code is entered in the wrong location. The phone app will let you populate the app with your selection of thermostat and switches.

I really appreciate all the hand holding - I’ve often thought I was fairly technical until I started trying to figure this stuff out.

I’ve pasted “DR: Thermostat Setpoints: V-Momentary Dimmers v2.1” into My Device Types and “DR: Thermostat Mode/Fan:V-Switches v1.1” into “My SmartApps”. I’ve also created two devices named “Air” and “Heat” that are set up as “Momentary Button Tile”. All are published and assigned to my only location / hub.

I’ve opened the “My Smart Apps” section of the iPhone App and selected the “Heat” switch and “Air” switch I created for their corresponding switches in the App setup. I left the “Auto” section blank. I’ve selected my thermostat labeled “Downstairs Thermostat” which is controllable through the ST hub on it’s own.

I’ve had Alexa search new devices and it can see 4 devices (two are fans I have on Z-Wave switches). The other two devices are the “Air” and “Heat” switches. When I say “Alexa, set Air to 70” it tells me “That command doesn’t work on device Air”.

I feel like an idiot :smiley:

What did I screw up?

Only thing I can think of is not saying degree or say turn instead of set?

Thanks for all the support. I will mess around with it and see what I come up with.

My Alexa control recently stopped working. The momentary switch is reflecting the correct percentage. For some reason th thermostat never receives the command. Any suggestions?

Fantastic job! I’ve been thinking of getting a nest or ecobee thermostat. Do you think a program like yours could control either of these thermostats with echo? I’ve been trying forever to figure this out for myself and eventually my Mother who is getting older and needs help moving about the house. If I could figure out how to connect echo to a thermostat it would help tremendously!

@drake0508,

If it was once working there are a few basic steps to try. The only thing I can think to check is to verify if you selected regular setpoint or the quickset option. Also ask Alexa to rediscover you devices. The other option could be delete install app and re-install with rediscovery by Alexa.

@Jwjbs,

I have been told ecobee works with this, although I do not know which version they have. Nest should work, if it can use the HeatSetpoint and CoolSetpoint commands. No one has gotten back to me about using it with Nest. If not I can try to look into the code to see what commands they are using, and try to add that command option, like I did with the quickSet option.

Thank you for your reponse. I’m still on the edge deciding between an ecobee3 or Nest so I’m not sure what I’ll do. Thanks !

This is great work thanks @DarcRanger. Im trying to set this up but am a bit confused as to which version of the app I should use. There are six different choices in your github at https://github.com/DarcRanger/DR-SmartThings/tree/master/Thermostat. Which should I use please?

@dworkman

I moved some app around to clean up this section. I also created a new Read Me file for my Thermostat App Folder to describe what each app does.

Let me know if you need more clarification. Basically there are apps to control the Thermostat Fan and/or Mode. There are apps that can change the setpoint either by a slider or by step increases/decreases.

Thank you so much! I will try installing tonight.

Anyone have any luck getting this to work with Nest? This is exactly what I’ve been looking for (One button for +1 degree and one button for -1 degree) and I’ve tried all I can, but no luck… any tips?

Very nice work! I love it. I have a new use for it. I have an Amazon echo and wanted to control my two thermostats with it. The echo only finds switches and lights. I am going to attempt making virtual switches and use this to have some limited control of the thermotstats in the house. Not as good as being able to say, “Alexa, turn the kids thermostat to 75 degrees” but at least I should be able to control mode and fans.

I have two Pearl thermostats integrated into Smartthings.

@jasonvick,

What did you select for the Thermostat setPoint method? setHeatingSetpoint()/setCoolingSetpoint() or quickSetHeat()/quickSetCool().

I do not have a Nest, but have glanced at the device type code. It should use setHeatingSetpoint()/setCoolingSetpoint(), which is the standard command for all thermostats.

If you are using that instead of quickSet let me know, and I will try to look deeper into the Nest device type code.