Temperature Controlled Fan

I have been trying to automate my master bedroom fan to change speed based on the room temperature.

But have had no luck getting it to work at all.This is how i have it set up.

Inputs : Device properties name : MasterTemp = CurrentTemperature

Condition: cFanSpeed = (MasterTemp<68) ? 0 :((MasterTemp<73) ? 25 : ((MasterTemp<76) ? 50 : 100))

Action: Master Fan SetLoadLevelTarget newLoadlevelTarget {(cFanSpeed)}

I don’t know what I am doing wrong or if this is even possible ?

Yes it is. Let me show you my example, which I simplified a bit…

Trigger
BedroomFanOn Bedroom Fan is turned on true

Device Properties
BedroomFanSpeed Bedroom Fan LoadLevelStatus 30
ThirdFloorCoolSetPoint Third Floor Thermostat CurrentSetpoint 78
ThirdFloorTemp Third Floor Thermostat CurrentTemperature 79

Conditions

[ul][li]BedroomFanManualOperation: (NOT ((BedroomNeedsFanOnLow; BedroomFanSpeed<30) or (BedroomNeedsFanOnMedium;BedroomFanSpeed<30) or (BedroomNeedsFanOnHigh;BedroomFanSpeed<30)) and BedroomFanOn) or (NOT (BedroomNeedsFanOff;!BedroomFanOn<30) and !BedroomFanOn)[/li]

[li]BedroomNeedsFanOnLow: ((!BedroomFanOn and ((!BedroomFanOn; ThirdFloorNormalMode) or !BedroomFanManualOperation)) or (BedroomFanOn and !BedroomFanManualOperation)) and ThirdFloorNormalMode and ((ThirdFloorTemp - ThirdFloorCoolSetPoint)> 4 and (ThirdFloorTemp - ThirdFloorCoolSetPoint)<= 1)[/li]

[li] BedroomNeedsFanOnMedium: ((!BedroomFanOn and ((!BedroomFanOn; ThirdFloorNormalMode) or !BedroomFanManualOperation)) or (BedroomFanOn and !BedroomFanManualOperation)) and ThirdFloorNormalMode and ((ThirdFloorTemp - ThirdFloorCoolSetPoint)> 1 and (ThirdFloorTemp - ThirdFloorCoolSetPoint)<= 3)[/li]

[li]BedroomNeedsFanOnHigh: ((!BedroomFanOn and ((!BedroomFanOn; ThirdFloorNormalMode) or !BedroomFanManualOperation)) or (BedroomFanOn and !BedroomFanManualOperation)) and ThirdFloorNormalMode and ((ThirdFloorTemp - ThirdFloorCoolSetPoint)> 3) [/li]

[li]BedroomNeedsFanOff: BedroomFanOn and (!ThirdFloorNormalMode or (!BedroomFanManualOperation and ((ThirdFloorTemp - ThirdFloorCoolSetPoint)<=4)))[/li][/ul]

Actions

[ul][li]BedroomNeedsFanOff Bedroom Fan SetLoadLevelTarget newLoadlevelTarget=0[/li]

[li]BedroomNeedsFanOnHigh Bedroom Fan SetLoadLevelTarget newLoadlevelTarget=80[/li]

[li]BedroomNeedsFanOnLow Bedroom Fan SetLoadLevelTarget newLoadlevelTarget=30[/li]

[li]BedroomNeedsFanOnMedium Bedroom Fan SetLoadLevelTarget newLoadlevelTarget=50[/li][/ul]

There is a check for manual operation, and if in manual Vera doesn’t manage the speed (until a !ThirdFloorNormalMode event [Thermostat goes into energy savings mode] and then a ThirdFloorNormalMode event). Otherwise Vera will alter the speed of the fan depending on the difference between the actual temperature in the room and the thermostat cool set point…

I know your calculation may be a bit more straightforward, but I have no experience with conditions that don’t return a boolean, and I like the more specific and relative ranges. And you might have a situation where your changes are firing way too often and tying up the z-wave network - I had even with my range setup and I now only allow changes every five minutes. I took out the five minute intervals from the example, but it is a simple Self Retrigger timer.

In fact, that is likely your problem - the condition with the associated action needs to change from true or false to trigger… So calculate cFanSpeed as you are doing, but have a second condition that compares the current fan speed to cFanSpeed and if they are different - THEN fire the action to set the speed…

@Drcashman, your logic would mostly work provided you set Repeat on for the Condition cFanSpeed? This is necessary to have the Action fire whenever the Conditions changes value. While this should work for the cases when the calculated fan speed is non-zero, when cFanSpeed is zero, the Action will not fire. You can get around this by using two Conditions.

Conditions
cFanSpeed Repeat=No (MasterTemp<68) ? 0 : ((MasterTemp<73) ? 25 : ((MasterTemp<76) ? 50 : 100))
cTempChange Repeat=Yes MasterTemp

Actions
cTempChange Master Fan SetLoadLevelTarget newLoadlevelTarget {(cFanSpeed)}

Thanks guys got it working. ;D

Rex, I think that was the problem when fan speed cFanSpeed was 0 Action did not fire.

wilme2 you gave me more ideas on what can be done.

I’ve had a vera lite for more than a year and just recently started getting into automation not just remote control but without this forum I would not know were to start.

Once again thanks for your help!