Attempting a SmartTiles digital thermostat in lieu of a nest

Newbie here, I have been researching how to create a simple virtual thermostat that I can see in smartthings and on my tablets via smarttiles. I would like to hit an up or down arrow in the software which would change my thermostat value. The relay controlling my electric wall heater would come on until the temp on a nearby motion sensor reached that new set value. So kind of like a dynamically changing virtual thermostat. Does anyone have any idea how to make this, or something similar that I could modify?

Thanks in advance!


It’s a great idea to create a “hybrid pseudo” Thermostat Device Type Handler! As long as it conforms to the specs for “Capability Thermostat”, SmartTiles / ActionTiles ought to be able to use it just fine.

I don’t know if anyone has created such a DTH (it would probably need a companion SmartApp to sync the current temperature value and trigger the wall heater switch Thing, etc.).

This is not a trivial project for a newbie … but it would be very educational.

I would be careful of trusting the reliability of ST this much. If it has a platform issue, it could leave things on or off, or somewhere inbetween.

One of the core issues in a thermostat is that it “still works if ST is down or misbehaving”.


It seems like this is at least the fourth time this week that this topic has been brought up, and the answer is always the same.
The it’s too hot , it’s too cold apps can do exactly this. I would never rely on it for a main heat source though. I use it to keep the unheated back porch from freezing, but if ZigBee plug or PIR drop off mesh the dogs are getting a cold breakfast.

1 Like

I think it depends on how the app is written. If the app turns on/off the thermostat, you may have similar but not the same issues. The smarter thermostats have self protection for temp limits even if turned off.

Other too hot/ too cold apps just nudge the temp setting a couple of degrees. Even if ST fails, you are off by a couple degrees.

In both the above cases, your house wont’ freeze.

If you don’t use a thermostat, you could turn the system on, ST (or internet) fails and your system stays on, or stays off, without any “safety”. My view is this is not safe or prudent.


I don’t think I need the app to turn on or off the thermostat. But to turn on a relay/switch, and poll the room temperature sensor say every ten minutes. Compare the room temp to the set temperature on the simulated thermostat. Then show the simulated thermostat as a tile in smartTiles. I don’t really trust electric wall heaters, so I would rather they only run when someone is home. So I would want the smartapp to check a presence sensor, before checking the temp in the room. But maybe have some kind of override, on the super rare chance it falls below 45 degrees in the house.

I created a simulated thermostat, but don’t know how to connect it to the relay/switch and how to compare the current thermostat set temp to the temp on the room motion sensor. I think the device handler for the simulated thermostat would need to incorporate those actions? I guess I am not sure what info should be in my DH and what is in the smartapp.

A Device instance cannot talk directly to other Device instances (well… there are some really obscure ways, but not worth going in a non-standard direction).

So you basically need:

  1. A “dummy” custom DTH of Capability Thermostat. You would add this to your location manually, and it needs some very simple methods to keep it’s various Attributes up to date and read Commands. It doesn’t even need to have it’s own UI/Tiles … but if you define Tiles (metadata) for SmartThings then you have a secondary way of controlling it … a good idea, and important for testing too. Still – SmartTiles/ActionTiles only uses the underlying Attributes and Commands.

  2. A regular Temperature Sensor (or sensors!). No need for a custom DTH!

  3. A regular Switch (or Switches). No need for a custom DTH!

  4. A SmartApp to link all 3 of the above.

i.e., Your SmartApp will:

  • Ask you to input “Which sensors?”, “Which switches?” and will subscribe to them.

  • Read the Thermostat “set point” from the Thermostat Attributes.

  • React whenever it receives a Temperature Change event from the sensor(s) and check to see if Switch needs to be turned on or off. Here you might add code to
    make sure you are not bouncing on and off too frequently. (Swing range?).

  • React to physical (manual) on/off events from the Switch so you can push these to the Thermostat so it reflects if the heater was turned on or off manually.

Make sense??

Yes that method makes sense. Not sure if I can figure out the code to implement it haha. But I will give it a try over the weekend, and see what I can come up with!

1 Like

Have fun with it. :grin:

###My suggestion? …

Start with a much simpler educational case that will let you learn the same concepts you’ll use in the more complex case:

Instead of making a whole Thermostat DTH, just make a Virtual Switch DTH (template working code already available), and write a SmartApp that keeps it in sync with a Physical Switch. Next, see if you can make it react and sync to a Temperature sensor…

Ie, start simple one Capability at a time.

How are you getting on with it Craig? I am just about to start work on a very similar project so would be good to see what you’ve achieved to date.

1 Like

Honestly I haven’t gotten very far. Computer died. I tried doing the code part on my phone, but gave up pretty quickly. Haha. I started with the sinulated thermostat code in the smartthings templates and waa trying to tweak that. I was able to get my heater relay to come on from that but couldn’t get it to talk to my motion sensor for a temp value.

I know this is super old, but just thought I’d throw out there that I set this exact thing up.

I created a “Simulated Thermostat” in My Devices (just manually create a New Device and pick Simulated Thermostat from the drop down). I then use WebCore to keep it synced. In the example below I’m averaging two temp sensors but you can also do max/min/med/etc… It looks like code, but you’re really just interacting with drop-downs as you navigate the script.


The wiki for it is here: and there is a very helpful thread here: [DEPRECATED Thread: visit for assistance] webCoRE - Piston Design Help (ask your fellow members for assistance)

My job (or pison in webcore terms) to update the thermostat (you can import it using that 4 letter code thing):


Looks similar to what I’m trying to do with webCoRE and simulated thermostat, but my piston doesn’t seem to be able to keep up with the temperature sensor I’m using and wondering if you might have any recommendations.

Here’s a link to my post in the webCoRE community