SmartThings Community

New Virtual Thermostat With Device


(The Viking AKA "Holy Crap You're a Giant!") #61

I think I got it… Missing a { at the end of the modified line.

(The Viking AKA "Holy Crap You're a Giant!") #62

So I’m noticing that the units aren’t cycling off at all, even with the modified code.

Is there a way to convert the entire device/smartapp to cooling only?
Is it as simple as replacing every instance of “heat” or “heating” with “cool” or “cooling” respectively?

Reversing the logic for the on/off in the modified code makes sense, but beyond that I get lost in syntax, so I don’t know what to change.

Finally, the thermostat temperature shows in F, but the adjustment for the thermostat shows in C. Any way to make it all F for us US savages?

(The Viking AKA "Holy Crap You're a Giant!") #63

Line 161 of the DTH and down has the Centigrade/Fahrenheit adjustment.

def shouldReportInCentigrade() {
//there is no way to do this dynamically right now, a number of the functions that call this function are compile time evaluated :(
return false //Set this to true for Centigrade, false for Fahrenheit  so that enums and colors are correct (due to ST issue of compile time evaluation)
/*try {
	def ts = getTemperatureScale();
	retVal = ts == "C"
} finally {
	return retVal

(Wipika) #64

I’d like to echo the request for cooling support, and tweak the temperature setpoint to allow for 0.1 increments.

@eliotstocker happy to help with the above to the best of my ability, feel free to pm me!

(Max Tay) #65

Exactly what I am looking for using door sensor and temperature sensor to turn heater switch on/off.

(Frank Reymenants) #66

Hi All :slight_smile: Great looking app, will come in handy for sure but now, being one of the hottest summers EVER in Belgium for me, Cooling mode would be fantastic! Any news when thats ready or being worked?

(Frank Reymenants) #67

I like your thinking :slight_smile:


+1 on this - I’d like the heater option to be made optional too. My use case would be reporting only, it would be great if this could be implemented :slight_smile:

(Dominic) #69

Sorry to be a bit dim, but can someone explain how to set this up. I’ve copied the code for both device type handler and smartapp and published it. I added the device from within the IDE. Then the smart app from within smartthings app on my phone. When I add the app I get a page that says Thermostat Manager, Devices, New Thermostat. If I click on “New Thermostat” it just hangs waiting for ages then does nothing. I can click save.
I see the thermostat device, but don’t see how it works.
I was expecting at some point to say which device I am using to measure the temperature and which device it swhould turn on and off but haven’t done that anywhere.
I guess I’m missing something basic about the installation and setup process.

(Barry Murphy) #70

same issue; doesn’t appear to work; creates the virtual thermostat and captures the temperature from the sensor, but doesn’t record or save or allow me to set values / temp for the threshold

(David) #71

Anybody having issues with this? It doesn’t seem to turn off my heater outlet or turn it on.

(Chris S.) #72

It’s working for me. though I have been screwing with it for days. I finally just linked the repository then imported it and over wrote the piratemedia/smartthings : Virtual Thermostat With Device code with this

saved and published then

modified the handler to have this code at line 163 to get fahrenheit

return **false** //Set this to true for Centigrade, false for Fahrenheit  so that enums and colors are correct (due to ST issue of compile time evaluation)

(KO) #74

Very happy to find this solution!

Though, it does not seem to respect the “Door open” function. It just keeps on heating to the set temp even if the door is open. Anyone any thoughts on this?


(Enis Hoca) #75

@Flukster - what is different between your code and the one in the repository?

(Chris S.) #76

Nope. Mine honors the door open. No clue what would be different. I have remmed a bunch of things out in the DH but that was just to turn off all of the different Temps because I only need 1.

(Chris S.) #77

From my example above I just changed the true/false value to give me f instead of c


Hi there,

I need some help with the set up please.

I have copied the handler code and create the new handler, then I have copied the smartapp code and create a new app from this code, both of them are published and active.

From the app on the mobile I can see the smart app and configure things, ok.

But I have two fibaro ZW5 sensors and I would like to read the temperature from Google Home assistant but I don´t know how to do this, I can´t see the virtual thermostat from Google Home, I can see the fibaro sensors but these do not report the temperature to google home. If I do add manually a virtual thermostat from IDE and select this handler, automatically I can see the new device on google home app and I can ask to google home about the temperature but I can´t select the correct sensor from where to read it, it select the same one all the time. Any help please ?


(MacTechGenius) #80

Any updates on cooling functionality? I implemented the mod posted by @BartschLabs but a cooling a cooling UI would be great.


Am I right to assume that the smartapp is set to update the state of my heaters once every hour? The app does everything I want, but updates way to rarely, which results in the temperature in my living room fluctuating wildly. Is there any way to have it check the temperature and turn heaters on/off more often? (every 5-10 minutes).

SmartTiles dashboard: How to add adjustable thermostat, custom DH
(Ulf Thomas) #82

I have the same issue: the thermostat starts heating even though the window switch is reported open.