SmartThings Community

New Virtual Thermostat With Device

devicetype
smartapp
echo
thermostat
googlehome

#41

I have my smarthings multi-sensor and Lutron appliance switch configured, and power off works, but power thermostatemode: Heat does not turn it on. The switch turns on and off when controlled directly.


#42

Hey all,

I have been trying to find a better solution than the stock Virtual Thermostat so I thought I would try this one by eliotstocker.

I am using it to control an oil radiator in the baby’s room. However I am having the same issue as with the stock Virtual Thermostat.

As you can see from the screenshot below, the sensor is reporting 20.5c but the virtual thermostat is showing 21c.

I have the target temperature set to 21c and the threshold set to 0.4c.
The virtual thermostat should be turning ON the heater, but it doesn’t and it takes a considerable amount of time, usually the sensors having to drop another 0.5c to update the virtual thermostat.

The thermostat also takes too long to turn OFF the heater resulting in the temperature getting too high.

Is there something I am doing wrong?

I am still a newb to Smartthings, searching the forums people mention CoRE, I have no idea what this is or how to use it. Do I need to go down this route?


#43

OK, it appears that this issue only happens when changing into Night mode (which the thermostat is set to run).
After the change to night mode, the thermostat will not sync the temperature until the temperature sensor reports a new temperature (after switching to night mode).

Is there a way to force the thermostat update?

Also once the setpoint temperature is reached, the thermostat will not turn off the heater. It only does it once the temperature sensor reports 0.5c over the setpoint.

Setpoint of 21c reached, heater still on:

0.5c over the setpoint, thermostat turns heater off:

The issue is, the way oil radiator heaters work is that when you turn them off they still have a lot of residual heat that continue to heat the room once the heater is switched off. Because the thermostat waits a further 0.5c to turn off the heater, the room actually gets to 22.5c due to the residual heat. I have tested this by manually turning the heater off once the setpoint of 21c is reached and the most the room will heat up to is 21.5c (which is fine).

So is there a way to get the thermostat to turn the heater off the miniute the setpoint temp is reached?

Thanks in advanced.


(Enis Hoca) #44

I looked at the code and it’s reacting to the event and doing the diff math on the event. I also use this and don’t see the issues you are seeing. Suspect it’s your temp sensor and how frequently it’s rasing the event . I am using this with a homegrown ESP8266 “thermostat” and not seeing any of what you see. That said the code is pretty simple, have a go at it


(Daniel Jafari) #45

Sorry if this has been answered before, but why is there two similar Smart Apps, and which one should I use? Also, is there a way to change the temps to F? I had to use google home to force it to heat to 70 F, as it was reporting 23.3 degrees (in C).


(Dean) #46

Thanks @eliotstocker this is exactly what i have been looking for! tried the virtual one in ST ide but it only does fahrenheit not celsius! and has to much other crap in that i don’t want.
Using this with uk gas combi with fibaro dual switch, one channel of switch is heating on/off works great many thanks!

If you add more than one temp sensor does it work on a average reading across them all?


#47

@DT39, yes, from a Feb 4 post:

New Feature:
Average temperature across multiple temperature sensors is now included


(Dean) #48

@eliotstocker Question & suggestions. Does the app poll for update of the device state as in my case we can just turn on heating manually via ST. So it would be good if it could check device state every 5 or 10 minutes maybe and resends on or off command if temperature is out of setpoint. Also a status of device on or off in the tile display would be great. :+1:


(KB) #49

I have this working with two items: the Pool Gas Heater on/off switch, and the Pool Temp sensor. I can get the pool heater to turn OFF, but I can’t get the switch to tell it turn ON. Thoughts?


#50

Hello!

I am using this DH with a SmartThings Multi sensor and a Google Home, and it works very well. Thanks for putting this together!

I have one question though- as far as I can tell, there are only two states for this device, off and heat. If it is set to “off”, and I ask the GH “what’s the temperature on Sensor1”, the response is “Sensor1 is off and it’s currently 75 degrees…” If I set the device to “heat”, the only response I get is “Sensor1 is set to heat.”

Is there any way to configure this so that I only get the temperature in the response? I just want to hear “It’s 75 degrees.”

Any help would be much appreciated. Thanks!


#51

@Shinkiro, I’m using the smart app with an Aeotec MultiSensor 6 and Amazon Echo. When I ask “what’s the temperature of ___ thermostat?”, I get “___ thermostat temperature is 22.7 degrees.” whether I have it set to Off or to Heat.


#52

Yeah, the GH handles thermostats differently. If you just modify the default DH by adding “capability: thermostat”, GH will respond the same way- (device) is off and the temperature is (whatever). But if you query something that works natively, like a Nest, it simply gives you the temperature. I think there’s some variable that needs to be passed to the GH from the DH in order to get a simple answer, but unfortunately I have no idea what it is or how to go about it.


#53

This is a great idea and execution! I just want to add to the requests for cooling compatibility if you get a chance at some point. It would be the perfect solution for easy control of my window A/C units from one central location!


#54

Any way to put a limit on time it runs, or perhaps setup notifications if running longer then a specified time period?


(Evan) #55

Any chance you could post more info about you homegrown ESP8266 thermostat?


(Enis Hoca) #56

I use a couple - DHT22 and DS1821, I am using them ST_Anything. Its a fairly straight forward setup 3 wires, power, ground and data pin goes to any of the GPIO pins. Then rest of the magic is in ST_Anything, just read the instructions in that thread and code examples


(Evan) #57

Gotcha, those should be easy enough to throw together.


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

Has there been any headway on using this for cooling, for Window Air Conditioners?

Our home has several window units, and I’d like the ability to use a thermostat tile in ActionTiles to control the window units, or use Alexa to adjust the temperature.


#59

I modified mine to work, but just quick and dirty for now.

It’s two lines to change in the “Virtual Thermostat with Device” smart app. I’ve included them below. Each line is preceded with its original commented out with //. Note that this is dirty in that the whole UI still displays as if you were heating but instead it turns on the device if the sensor temp is above the setpoint.

//if ( (desiredTemp - currentTemp >= threshold)) {
if ( (desiredTemp - currentTemp <= threshold)) {
heatingOn()
// } else if ( (currentTemp - desiredTemp >= threshold)) {
} else if ( (currentTemp - desiredTemp <= threshold))


(The Viking AKA "Holy Crap You're a Giant!") #60
private evaluate(currentTemp, desiredTemp)
{
	log.debug "EVALUATE($currentTemp, $desiredTemp)"
	// heater
	//if ( (desiredTemp - currentTemp >= threshold)) {
	if ( (desiredTemp - currentTemp <= threshold)) {
		heatingOn()
	//	} else if ( (currentTemp - desiredTemp >= threshold)) {
	} else if ( (currentTemp - desiredTemp <= threshold))
		heatingOff()
	} else if(state.current == "on") {
        updateTimings()
    }
}

I get an error on this with line 182, the line reads:
} else if(state.current == “on”) {

Do I remove this line? I have no coding experience, so I’m not sure what to do.