Automating fan speed by sensor readings. How do I do this?

So I am getting ready to get this part done. But I need to know how to do this...

So I have Iris V2 Motion Sensors in each room with a ceiling fan.

The bedrooms and Kitchen have Hampton Bay Universal Zigbee fan / light controllers. This provides 4 speeds, so 25%, 50%, 75% and 100%

The living room has a GE / Jasco 3 speed fan controller.

So just for example, let's say in the bedrooms I want the following automated actions.

70 deg F. Fans come on at 25%
72 deg F fans turned to 50%
74 deg F fans turned to 75%
76 deg F fans turned to 100%

I am not sure as I haven't had the living room fan under HE long enough, but I am figuring the analogous speeds would be 35%, 70%, and 100%, please advise....

So basically looking to know how to make this all happy...

The questions I have are as follows.

#1. How do I adjust / calibrate the sensor readings in HE? Is there support for this or are we just going to assume readings are correct?

#2. How do I read the various parameters / data coming from a sensor such as temperature, humidity, or battery state? So for this example, I want to read the temperature and use this as my trigger for an action.

#3. How do we determine what commands are used to control fan speeds? I.E. what percentage or is it high, medium, low?

#4. How do we approach setting up the rule to put this all together?

The temperature readings from the Iris V2 sensors won't be terribly accurate, and sensor placement will have a significant impact.

Re #2 .. just choose the capability that you are looking for when setting up a trigger or conditional. For example, choose Temperature and then choose the device to end up with a trigger such as

Temperature of Motion in Guest Room(67.37) reports >= 70.0

I don't know about the Hampton Bay, but the Jasco/GE fan controller offers just three speed: 25%, 50%, and 100%. You can set the percentage to whatever you want but the result will be one of those three speeds. For example, setting to 75% gives you full speed same as 100%.

I think we covered this well in a similar thread recently, but be aware that a ceiling fan doesn't alter the temperature in a room and doesn't do anything unless there is living being in the room. I mention this just in case your plan was in anticipation of having the fan cool an unoccupied room.

Thanks. I am aware of the effects of air circulation and temeprature.

You are right though, moving air doesn't actually cool the air, it however due to evaporation of almost impreceptible sweat on human skin, makes the humans in the space FEEL cooler.

It also has the benefit of keeping the air in the space turning over, and not allowing for stagnant air pockets in humid environments. I.E. helps disperse shower steam through a space faster etc... and is known to help with keeping an environment driver, hence the reason we place big air moving fans in rooms that have just been flooded and we are trying to dry them out...

I know being in Texas is a funny thing for me since I am VERY uncomfortable at 74 degrees ish with still humid air, but get that air moving and I am happy as a clam. My electric bill likes me running the AC less too even if all the ceiling fans in the house are on at high speed, it is a net cost savings over running the AC at a lower temp.

I do know the Hampton Bay controller gives 4 speeds. 25, 50, 75, and 100%. I wasn't sure about the GE / Jasco. Thanks for that feedback.

I am aware of some of the reading foibles of the Iris sensors, however temp in my experience isn't exactly an issue. The starting temp can be off, but rise and drop in temp tracks my non contact thermometer reading degree for degree.

Hence why I was asking about calibrating the reading in software.

Smartthings would allow me to set the current temp / baseline of the sensor. I would get a reading from my non contact thermometer, and adjust in software and know that it would work the way I wanted it to...

The kitchen is going to be tough, I have 2 sensors, one at the pantry door frame, the other at the entry door frame about 3 feet from the stove. The idea here is to keep the sweat factor down when making dinner. I may have to reconsider automating this lest I have a constant breeze cooling off the soup...

The percentage things on the settings is going to drive me nuts when issuing audio commands to Alexa. I need to figure out how to present normal speed commands to Alexa. Might have to set up some routines either here, or there to do that...

The Generic Zigbee Motion Sensor allows you to specify current Reference Temperature. Is that a way to provide a calibration? Failing all else, you could just make your trigger temperature thresholds account for the offset for that particular device and then note in the Note field why you were doing that.

Curious, what model Hampton Bay controller do have that offers four speeds? I'm looking for a fan control that can set the fan to 75% (that's how I found it that the Jasco/GE can't do it).

Re Alexa .. yeah, she's wonky at devices that have both percentage and word levels.

Hampton Bay Model No 99432 "Universal Smart 4-Speed Ceiling Fan Remote.

They are no longer being offered, and have earned a bit of a sketchy reputation. And they leave the original light switch that powered the ceiling fan in the wall... I have a fan in the master sutie vanity that can't use the Hampton Bay controllers, so I will be going with the Inovelli Fan + Light switch / controller.

Under Smartthings the speeds were low, medium, medium-high, and high. I have tested under HE and I get distinct level changes between 25%, 50%, 75% and 100%.

RE: Word levels vs percentages. Regular people call fan speeds low, medium, high etc... It's not Alexa, but rather HE that is in the weird camp on this one. Even if there is a correlation HE is using a numeric representation that isn't human friendly. Sort of like giving someone an IP address instead of a URL... It works, it's just clunky.

FWIW, I use @bptworld's Averaging Plus app to average a number of sensors in my Family room to control the two Ceiling fans according to the Mrs preferences.

My rule is below. In this case, I'm using a pair of HBFCs, but in the Master Bedroom, I have a similar rule using an Inovelli Fan/Light controller.

It works for us, but there are some edge conditions that could use solving (e.g a manual override) -- I'm sure give some of the Wizards around here, there are many other, possibly superior solutions, but this might give you an idea of one way it can be done.

S.

You bet it does.

The new to me fan controllers are here, so I will be installing them shortly. Can't turn them down for the price you know... anyway, so I am thinking this will require a rule for each space thus controlled. And I appear to be one motion sensor short for the living room. I miscalculated.

But the sensors in question are.

Front BR Motion Iris V2 motion sensor.
Middle BR Motion Iris V2 motion sensor.
Back BR Motion Iris V2 motion sensor.
Master BR Motion Iris V2 motion sensor.
Kitchen Motion 1 Iris V2 motion sensor.
Kitchen Motion 2 Iris V2 motion sensor.

The fan / light controllers are parent / child objects.
Front
Front Fan
Front light
Middle
Middle Fan
Middle Light
Back
Back Fan
Back Light
Master
Master Fan
Master Light
Kitchen
Kitchen Fan
Kitchen Light.

None of the bedroom lights are NOT on a motion sensor lest we roll over while sleeping and turn the lights on.

Not terribly interested in the time constraints as we are up and around at all hours day or night. Long story, irregular sleep schedules around this house.

I need to study the if / else statements, but I think I can hammer through it and make something work. It doesn't have to be pretty code, it just has to work...

The front, middle and back bedroom fan controllers are installed and working. The Kitchen fan is installed, but not working, that is the failed controller.

I am refurbishing the master suite ceiling fan. Hoping to finish that up this weekend. Once done, I will get my installs finished, and start on the configuration on them.

Okay I have the temp sensor A.K.A. Iris Motion sensor in the bedroom I want to start the automation on.

I start Rule Machine.
Give it a name.
Front Fan Control
Identify Trigger.
Front br motion Temperature
Now it gets tricky.

I want to express the following. Mind you rule machine may not be what I really want but lets say...

IF temperature >=68 AND <=69 set fan speed front fan to low or 25%.
ELSE
IF temperature >=70 AND <=71 set fan speed front fan to medium or 50%
ELSE
IF temeprature >=72 AND <=73 set fan speed for front fan to medium high or 75%
ELSE
IF temperature >=74 set fan speed for front fan to high or 100%

So how do I make this magic happen?

You're mostly there. Your logic seems solid, if you use RM, once you select your trigger, you'll hit the done button, and RM will ask you what actions you want to assign. Select "conditional actions", and the first one in the list is if [condition] then.

Select that, and you'll find an expression builder that let's you piece the if then else together.

You'll basically build each if/else with an if temp >= x AND <=Y then do something.

Be prepared to do it a couple of times, and avoid the browser back button like the plague.

Make sure you have a final "else" statement that turns off the fan if none of the conditions are met, and I suggest using changed as your trigger.

Also, don't forget the "end-if" at the end.

S.

1 Like

Yep. So I added the current temp reading to the device (V2 motion sensor). It;s off by 3 degrees. And then proceeded to set up the automation, the automation appears to be following exactly what the sensor is outputting, and not giving me the 3 degree temp adjustment, so I get to redo my math and rewrite the rule. But at least it works

FWIW that rules editor works, and it does keep you from making typos, but correcting mistakes such as pointing to a prior line and changing temp, or operands is not exactly user friendly.

Yeah... :slightly_smiling_face: I spent much time learning what not to do. But @bravenel has spent a lot of effort on it, and it's become very powerful.

It seems to be a bit less preferred to other options, but I prefer doing stuff in RM to most other methods.

S.

RM is now sort of the Quasimodo of apps.

3 Likes

But it has a kind heart that Iā€™m rather fond of. I hope it doesnā€™t suffer thatā€™s same fate.

1 Like

Agreed. I have become quite accustomed to it, and wouldn't like to see it go away for sure.

I use it for most of my more complicated lighting, my fans, and well, just about everything I do with Hubitat!

S

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.