Help with Thermostat


#1

I new to programming in webcore and need advise.
I have a thermostat the is giving heat to the bathroom floor.
Very simple scenario: When home mode is activated set temp to 23 degrees celicius. When the humidity is high set the temperature to 25 degrees celcius.

  1. It feels like the smartThings hub is slow after implementing the code, should i use a timer with intervall instead of checking criterias continiusly?
    2.Does the logic make sense?

#2

Anyone?


#3

Does the code make sense and do I need to optimize the code?


#4

I am a huge fan of precise triggers over conditions for things like this.

IF humidity raises above 80% <-- Only triggers once when it crosses the threshold
Then set heating point to 25 degrees
End IF

IF humidity drops below 75% <-- Same goes for this line
Then set heating point to 17 degrees
End IF

(I intentionally left a small gap between the two numbers so it won’t go on/off quickly when it is on the fence)


I would re-think the logic in lines 12-21.
Either
(A) it stays at 25 degrees until the humidity drops (as shown above), or
(B) it stays at 25 degrees until 30 minutes have passed.
(but not both, or it may cycle temps way too often)

It is also important to consider conflicting statements causing havoc. For example, what if the humidity is high (thermostat to 25 degrees) and the garage temp is less than 5 degrees (thermostat to 23 degrees) There is going to be some serious competition going on, and the results will not be good.


#5

Need some concrete advice please.
As it it now, the piston is working the first time/or if I press “Test”.
By “working”, I mean running/checking conditions.
The first IF question should pick up the +80% humidity but it only tries once.