Better (different) Thermostat Device

Hi I have some problem when running. For me, when adjust setting like changing temp, switchmode, my thermostat response to the change very quickly, but Smartthings app doesnt refresh the settings, actually the app was not updating the setting at all.

Do i need to remove and re-add my thermostat?

Another problem is when adjust temp, say my current temp is 70, first click to heatup increase my temp by 1, change to 71, second click doest do anything. then click once on heatdown, decrease by 2, change to 69.

Please advise what should i do, Thanks!

Nothing wrong with this code…that is just how SmartThings works at the moment. I get the same exact thing. I believe they are working on updating things to work better with Thermostats, so hopefully that goes away once they do.

ok… guess i can only revert back the device type and wait…

If you wait 2 seconds between button pushes. There’s a 1.5 delay between command send and command execute.

I updated the device file to use the new icons that are available.

Enjoy!

pic

@twack,

Thanks, I like the new icons!

@twack,

I’m using your code, but my thermo looks different (aside from me adding the name next to the temp reading). Any ideas why this looks like this? I’m using a Samsung S4:

my thermo

Look at the arrows, and the Fan should say it’s circulating. The wordwrap and font size are also different, and I’m not specifying either of those items.

Hello @JSCG350,

Arrows: This is a bug in Android where the label placeholders display as “–” under/above the icon. Sometimes its there, sometimes not. I have not figured out hpw to make it go away permanently.

Fan Circulating: There is no icon for “Circulating” in the code notes on github, I explained that I display a small “c” on the fan on icon. You can see it on your screen shot. I’ll request another icon for circulating.

Wrap and Font: This is using the defaults in SmartThings. I’ve struggled with getting nice layouts due to ST fonts and fitting. I’ll request documentation (ha-ha) on this.

Meanwhile, would you want me to post the un-icon code back up on github?

Twack

Hi @twack,

No worries, I can easily live with your new version. Thanks for the explanation, and the updated version.

A new icon was added and I figured out how to get rid of the “–” issue for android.

Code is updated and at:

Happy Hacking!
Twack

Sweet, thanks worked perfectly!

I added “,wordWrap: true” to valueTile for temperature hoping it would word wrap like in your example, but no luck. I’ve seen that used in other device types, so I thought it would be worth a try.

Thanks again @twack.

For adding the newline into the display, what should work, and does on iOS but not android is the following:

state … label: ‘This is some text\n${currentValue}’

Again, it does work on iOS, but not Android. A bug is filed. I’d add it into your code now and it will work when ST updates with the fix in the build.

Twack

This is great, @twack… much needed improvement! I’ve ALMOST got it working but it’s not quite behaving correctly. I created the new device type, only checked the ‘thermostat’ capability check box when creating the new device type and then added the 6 custom commands. Copied your 531 lines of code and replaced the starter code. Saved and then went in and updated my Honeywell Z-Wave Thermo to be this new device type. Force closed and re-opened the ST app in iOS.

After that - the thermostat in ST app shows up with your new icons and layout - looks great…however for some reason it will only decrement the temperature from the current setting ONCE - like a single degree - and increment it ONCE. So…the temperature started out as 67. I can only go down to 66 or up to 68. In the logs I see that if I repeatedly hit the down arrow, it just keeps returning “Setting heat set point down to: 66”.

In addition - the tiles are not updating - meaning even when it does lower the temperature to 66 (and the temp is lowered on the thermo) - on the tile it still says 67. Same holds true for when I cycle between modes - even though it turns the thermo off - on the tile it still says heat. It’s like it’s not pulling back the current thermo status correctly… so every time I hit down, it’s not decrementing off of the refreshed (lowered) value.

What did I do wrong?

@BrianA,

Sorry, you must also check these:

Configuration, Polling, Refresh, Temperature Measurement, Thermostat

I’ll update the header instructions in the code.

HTH,
Twack

@Twack - worked like a charm…thanks!

Thanks Twack! I’m also using your updated code and it’s working great.

I also didn’t have these device types set “Configuration, Polling, Refresh, Temperature Measurement, Thermostat” but do now and seems to be working better.

This is awesome. The first thing I noticed when installing my CT100 was I hated those little sliders. I hope the dev guys adopt your design into the production software.

One feature request, is it possible for you to put a spinning “working” indicator on a tile after pressing until the polling shows the last action was complete. I have had trouble before where my stat was “off” and I tapped it to turn it to “heat” but it didn’t respond right away so I tapped it again, and then it jumped two modes to “cool” If it had a working spinner that started right after my first tile press showing me it was trying then I would sit back and wait for the tile to repopulate with the current mode.

or even better would be to take the suggestion from this post http://build.smartthings.com/forums/topic/suggestions-to-improve-thermostat-controls/ and make the mode select different buttons. Like 3 radio buttons.

I am not getting this to operate my CT100. I did the full install instructions and the device view changed to all of your new tiles, but It is not responding to any commands. I have tried changing temperature and mode, and refreshing, but nothing changes…

Hmm…almost sounds like you didn’t check the boxes for the following capabilities on the device type in the ide: Configuration, Polling, Refresh, Temperature Measurement, Thermostat

I know I’ve missed that in the past. Hopefully it is as easy as that!

Jeff

^ you are right. I did miss those steps. All I had checked was thermostat. I also had to add the custom commands.

Guess ill read better next time!