Nest + Temperature Based Thermostat SmartApp = Fail (now a WIN!)


(Randy Paine) #1

New SmartThings user here. I’m 3 weeks into this and I’m hooked already. I’ve already learned so much from the community here and I’ve got several new Device Types and SmartApps installed through the IDE. But I’ve finally hit a roadblock that I can’t figure out or find an answer to myself.

I’m using Patrick’s (@pstuart) device type for my Nest and it works well. This week I discovered Tim’s (@tslagle13) Temprature based Thermostat Mode smartapp and I’m trying to use them together. Last night it failed the WAF test when the temperature outside dropped into the 40s and the air conditioning came on.

I checked the logs and I see the mode SmartApp correctly send a “heat” command to the Nest. But a second later the Nest reports that it switched to “cool” mode which I was able to verify in the Nest app. The SmartApp did correctly switch the Nest to “auto” earlier in the day. I’ve looked through the code for both the SmartApp and Device Type and I don’t see any obvious disconnect, but I’m new to Groovy and the SmartThings API as well. Has anyone else seen this problem or have an idea what the problem might be?


(Tim Slagle) #2

This works 100% for my Z-Wave thermostat. The only thing I can say is this may not work with a nest thermostat. Not sure as i haven’t looked at the device code.

If my app sends the right command the device type may need to be tweaked or my app will need to be tweaked to work better with the device type.

What happens if you switch the heat and cool so when the temp reaches 40 degrees it sends a “cool” command? Wonder if it turns on the heat?


(Randy Paine) #3

@tslagle13 I didn’t mean to imply your code doesn’t work. I’m sure it works perfectly with the officially supported device types. I have also read here about the challenges of integrating with Nest so I understand this may not be easy.

I do think you’re on to something with switching the modes around. I did play around with it a bit after my wife went to bed. When I told the smartapp to switch the mode to cool, the Nest switches to auto (range). So is there a way to see in the IDE or the logs how a device enumerates its available modes?


(Patrick Stuart [@pstuart]) #4

It’s possible the NEST code I wrote from introduced some heat mode issues. I don’t have time to dig in but the code it was based on only dealt with cool mode set temps. I tried to make it work in auto or ranged mode, but could have introduced a bug or two in heat only mode.

Didn’t really want to test it with the heat on in the summer.

Really don’t want to put any more effort into it since hopefully an official api version is coming soonish…

If I find some free time, I’ll try to troubleshoot, but no promises.


(Tim Slagle) #5

No biggie. I wasn’t trying to put the issue down either.

If I have time tonight I’ll look at the device code and see what I can find. for informational purposes what happens if you set the app to send and auto command. Does it go to auto mode?


(Randy Paine) #6

So “cool” = “auto”. I’m going to try rearranging the input values to “heat”, “cool”, “auto”, “off” to see if it is just an issue with the order of the modes.

@pstuart Your Nest device is better than you’re giving it credit for. I can verify that the mode tile works for all modes in Things. I know we’re all hoping for official support, but if Google’s and Samsung’s lawyers work as slowly as ours do at work, I’d say we’ll have at least a 3 month wait.


(Randy Paine) #7

Changing the order of the input values didn’t help - “heat” still gives me “cool”. It is going to be cold for a while so I should have plenty of time to dig into the documentation this weekend and see if I can figure this out.


(NotoiousBDG) #8

Try my version of the Nest device type at Nest device type with a bunch of new features. I just did a quick test and the smartapp changes between heat and auto for me.


(Randy Paine) #9

@notoriousbdg - I had seen your code earlier in the week and tried it late the other night with success. But now my Nest tile doesn’t ever auto-refresh in the Things view. Is that normal for your device type?


(NotoiousBDG) #10

I’m using Pollster (http://community.smartthings.com/t/pollster-a-smartthings-polling-daemon/3447) to handle auto refresh. I’ll investigate to see what it would take to make the device type automatically refresh without Pollster.


(Randy Paine) #11

I set up Pollster on Sunday. OMG what a difference that makes! Now I’ve got @notoriousbdg Nest device type running smoothly as well as @pstuart Thermostat Away Mode on Motion and Schedule and @tslagle13 Temperature Based Thermostat Mode Smartapps. I’m also using @geko Pollster to refresh my Aeon power meter that never refreshes itself and my Hue lights that occasionally lose their minds.

Thanks to you all for your code and contributions. That and this community is what really makes SmartThings stand out from all of the other home automation systems right now.


(Tim Slagle) #12

Don’t want to speak for the others mentioned but I enjoy doing it. You’re welcome!