Control Fan based on temperature + override option


#1

1) Give a description of the problem
I currently have a CoRE piston I’d like to bring over to webCoRE and add a few enhancements to it, It currently is to control a ceiling fan. It turns the ceiling fan on based on 1.motion or 2.the status of the harmony activities for devices in that room - this works great. It also switches the fan on to a certain speed based on current room temp.

2) What is the expected behavior?
All as stated above is fine

3) What is happening/not happening?
I’d like to add a condition, that if the fan is adjusted from the Z-Wave (GE) switch on the wall (up / down / off) then it remembers that settings, and does not adjust it back based on the temperature in the room for a set time frame.

Have not brought this into WebCore yet as this would be my first piston, pretty sure I can achieve the above additions though in WC? Thanks for any help :slight_smile:


#2

yes should be straightforward to get those additions done.


#3

Any pointers on how to do this… I cannot locate a way to identify if the actual physical button has been pushed to override the piston?


#4

if you do a if check for the device changed trigger and change which interaction to physical interaction and then manually adjust switch from the wall, does that show in the piston as true?

something like this … this is with a dimmer switch:


#5

It does, so for this situation I have that check at the top of the piston and then if true it waits 30 mins to run the rest of the piston. So lets say at 5pm I adjust the fan via the physical switch it won’t resume the rest of the piston until 5:30pm. At 5:30pm it will evaluate temperature and a few other devices to ensure the room is occupied and set the fan level.

What is the ‘cut off’ that the piston thinks the physical button was used? ie: at the next piston run, what stops webCoRE from ‘seeing’ the physical button interaction at 5pm?


#6

so far as the piston is concerned there is no cutoff. so there has to be some boundary created for the physical interaction, like mode changed or time of day changed or switch was turned off … something like that.

does that make sense?


#7

Hmm, so the piston will always registered the physical switch has been touched so this piston is really on good for a one-time use (per day? per hour) or just forever. So I need to the physical switch to almost trigger a virtual switch which I can reset and base the piston on this?


#9

so … say you did change the fan physically from the switch. ideally when would you want the piston to take back control of the fan speed? is it a time condition like a wait or change to temperature by 3 degrees or something else?


#10

30 mins.

I was thinking about this… and if I had another Piston that activated on that switch based upon it physically being changed, that then Piston could suspend this piston, and resume it after 30 mins… I think that might work?


#11

ok. we shouldnt need another piston. when switch physically changes use the wait for 30 set TCP to never and then exit. so at the top of the piston:

if fan switch physically changes
   with location (set TCP to never)
      wait 30 mins
   end with
   exit 'waited'
end if

also disable automatic piston state


#12

HI - Thanks for your help on this! looks like it is still ‘always’ seeing the switch as triggered…

pasting what i have below if you wouldn’t mind taking a look…

I set TCP never on the with and the IF statement…and set the disabled auto piston state


#13

on the with for line 20 set Task Cancellation Policy to never


#14

Thanks for your help - testing this now!


#15

So far so good, its been colder here tho so haven’t fully tested, but it does appear to be working correctly. Thanks for helping me understand the EXIT states etc.


#16

excellent. you are welcome.