SmartThings Community

[RELEASE] 5-2 Day Programmable Thermostat Scheduler (Weekday, Weekend) with Remote Temperature Sensor for each Schedule

thermostat
climatecontrol
temperature
smartapp_hvac
rboyapps

#61

@RBoy any thoughts? Or anyone for that matter?

How to get $thermostat to display the display name without brackets?

e.g., right now $thermostat is [Thermostat Floor 2], and I’d like it to be Thermostat Floor 2.


(www.rboyapps.com - Make your home your butler!) #62

You can just simply remove the first and last characters. Use string.replace or regex to do it.

string.replaceAll("[","")
string.replaceAll("]","")

string is your variable which holds the string

Or

string.replaceAll($/^[|]$/$, “”)


#63

@RBoy Thanks for the reply. The regex seems wrong? I received unexpected char: 0xA error when trying it. So I tried it using the replaceAll to remove the brackets individually, and I get this:

snippet

log.info "Setting $thermostat cool to ${tempSetpointCool}°"
sendPOST("${schedule} is now active on $thermostat")

def sendPOST(message) {
	log.debug message
    message.replaceAll("[","")
	message.replaceAll("]","")
	log.debug message
}

In the logs, I see my first log.debug message (and it contains [Thermostat Floor 2]). After the replaceAll(), all I get is java.lang.NullPointerException: Cannot invoke method replaceAll() on null object


#64

Through (a lot) of trial and error, this seems to have worked for me (for now)

def tstat
thermostat.each { 
    tstat = it
}
log.info tstat

(www.rboyapps.com - Make your home your butler!) #66

or you could use thermostat[0]

in the previous replaceAll you need to use

message = message.replaceAll(xxx)

replaceAll returns a string in this case


#67

Makes sense. Thanks for the explanations @RBoy!


#68

Has something changed with the way SmartThings handles this SmartApp recently?

I’m noticing my thermostats are no longer following the schedule after about a day. The temporary fix is to go into the SmartApp and Re-Save the settings and it begins working again.

It’s been broken for about a week now.

Any thoughts?


(Yves Racine) #69

@drsprite, the issue is not related to a specific smartapp, it is a ST platform wide issue:

Regards.


(www.rboyapps.com - Make your home your butler!) #70

Bugfixed an issue after the recent platform upgrade. Update the code and DON’T forget to go back in and recheck your settings. You will need to reselect your thermostat(s) after the code update.

This fixes and issue of the mode always falling back to cool settings after the recent platform changes which changed the way some objects are returned.


#71

@RBoy how do we get the update? If I go to your site, looks like I need a login. Is the only option now to pay? Thanks


(www.rboyapps.com - Make your home your butler!) #72

I usually post the updates to the free apps after some time. The code here in the first post has been updated to reflect the fixes (see date stamps and change log)

But, yes if you want immediate access to the code updates, support and all of my other premium apps and devices I am asking for a one time fee to get access to the website. This is to continue supporting and building new apps and features.


#73

Good to know, thanks. I’ve been pretty disappointed with the scheduling system lately where my system runs at the wrong times. Hopeful ST fixed their problems, and the new version of this app works too. Trying it out now!


(www.rboyapps.com - Make your home your butler!) #74

Anyone interested in an option to turn off the HVAC for some scheduled instead of just programming it? Note however that this put the thermostat in Auto mode.


(Mark Whipp) #75

This time of year in Arizona we just turn off the HVAC :grinning: Instead of reprogramming your 5-2 app or uninstalling, I created a “Idle” mode and assigned it to run only in that mode. When/if it gets cold, I will put it back to the Home/Sleep modes.


(Anson Wong) #76

Hi RBoy

I have a difficulty to get the 5-2 days works with my CT100. I tried reinstall the apps and reboot the hub couple times. I tried to control the thermostat using smartthings app without any issue. Since I am using Celsius, I also tried change to Fahrenheit, but it still not working at all. Any idea?


(Anson Wong) #77

I double checked. The 5-2 Day did fire on schedule, and send “Setcoolingsetpoint” command to thermostat, but the thermostat did not do the job.


(www.rboyapps.com - Make your home your butler!) #78

Looks like your thermostat has trouble communicating with your hub. Try repairing it or repairing your z-wave network


(Anson Wong) #79

Hi RBoy,

Thanks for the suggestion. Just one more thing wanna make sure. Will the thermostat work if it is at “Off” mode?


(www.rboyapps.com - Make your home your butler!) #80

The SmartApp doesn’t change the thermostat mode. It only detects the mode and appropriately configures the temperatures. So if it’s off, it won’t do make any difference.


(Ian Eicher) #81

Having some trouble where the heat set points are not updating, but the cooling set points are. Manual changes to the set point through the device work. Here’s a section of the log:

2:31:02 PM:
debug
Parse returned [[value:79, unit:F, displayed:false, 

name:coolingSetpoint, isStateChange:true, linkText:_Thermostat,
descriptionText:_Thermostat cooling setpoint is 79°F]]

	c8a392a6-311e-4935-bb18-7530b83a9478

2:31:02 PM:
info
THERMOSTAT, latest mode = heat


	c8a392a6-311e-4935-bb18-7530b83a9478

2:30:30 PM:
trace
setCoolingSetpoint(79.0, 30000)


	c8a392a6-311e-4935-bb18-7530b83a9478

2:28:43 PM:
debug
Parse returned [[value:77, unit:F, displayed:false, 

name:coolingSetpoint, isStateChange:true, linkText:_Thermostat,
descriptionText:_Thermostat cooling setpoint is 77°F]]

	c8a392a6-311e-4935-bb18-7530b83a9478

2:28:43 PM:
info
THERMOSTAT, latest mode = heat

Heat setpoint should got to 69 and cooling set point should go to 79 at 2:30. Current temp is 72.