[Release] Fan Thermostat with manual override

I'm running v2.2.8, and I've been using this app to control all of my fans with no problems.

If it's not controlling your fans at all, try just opening the settings page for each app instance and clicking done. That will cause the app to re-initialize its event subscriptions. If that doesn't work check the logs for the app and see if there are any errors. If there are, post them here and I'll take a look.

After some troubleshooting and investigation it looks like I'm having an issue with my Z-Wave mesh and the thermostat. I tested with a virtual thermostat and everything works as expcted.

@mbudnek, love this app. I've moved all my fans to it. Works great, thank you.

Just one question: In a couple rooms, I use 1 or 2 motion sensors so that the thermostat only operates the fan when someone is in the room. I've reduced the retrigger time and motion timeout to small enough numbers so that fan pretty much mirrors human movement. However, I've noticed the fan staying on even when we're out of the room for a prolonged period. I've confirmed that the two motion sensors didn't activate. When I poked around I noticed that the Manual Override was activated at the same point the motion activated the fan. I can't figure out why that would happen. I assume the Manual Override is supposed to activate when you flip the fan switch manually, right?

I've been able to reproduce a scenario where the fan is off, motion sensor gets activated, so the fan activates as expected, but so does the manual override even though there was no fan switch manually flipped.

Am I thinking about this wrong? TIA....

Interesting, that definitely should't be happening. Manual override should only activate if something other than this app controls the fan (i.e. a wall switch, a rule machine rule, etc).

I'll investigate. Are you using on/off switches or multi-speed fan controllers?

I'm using multi-speed.

I also noticed one other thing, just troubleshooting. If motion is activated, and the temperature is below the setpoint, the fan doesn't turn on (as expected) and the motion override is not activated (also as expected). Only when motion is activated while the temperature is above the setpoint does this weird manual override activation occur. Hope this helps squash the bug! :grinning:

Great app btw!

I'm trying to send the Fan Thermostat virtual device over to home assistant via the Hubitat home assistant addon. I'm guessing because it doesn't implement the full thermostat capability, it doesn't carry over to HA as the climate entity.

I had a play around with the code and added the thermostat capability to the driver (that's all I know). Result is when carrying over to HA it now properly creates a climate entity I wanted. However I am only able to set the mode to 'cool' but not able to turn the mode to off. I can set the modes to cool/off fine on the HE side. I'm guessing there's something else I probably need to add after adding the thermostat capability for it to work. That's as far as my coding skills would go :stuck_out_tongue: Would be nice to have the 'OFF' working.

@mbudnek, hey, no rush, but wondering if you've had a chance to take a look?

The only way I was able to reproduce the issue of manual override getting incorrectly turned on was to switch the associated motion sensor from active to inactive repeatedly very quickly. Does your sensor show lots of motion state changes at the same time that the fan's manual override gets triggered?

I also just merged a change that will help prevent fans from repeatedly turning on and off if the fan trips its associated motion sensor during the retrigger timeout. I don't think that would cause the exact problem you're seeing, but it could be related.

I've not tried to use this app with Homebridge, but my guess is that the problem lies with the two different meanings of "off". Both the Thermostat and Switch capabilities define an off command as part of their interface, but they mean different things. I chose to implement the Switch capability's meaning, so off turns the fan off but doesn't change the current thermostat mode (so the app will continue to the control the fan, possibly after a manual override timeout).

I seem to be missing how to specify a temperature above which the fan would turn on. It looks like this app may be trying to pull it from the active thermostat settings, but if so there are two problems with that for my implementation. 1) the temperature sensor is not associated with a thermostat. 2) I want to use a lower threshold than the air conditioner uses. Is it possible to add a threshold input which could accept at least a hardcoded setpoint threshold or possibly a variable?

This app creates a virtual fan thermostat device. Use the setCoolingSetpoint command on that device to specify the temperature at which the fan should turn on.

Yeah, actually that would make a lot of sense. The motion sensor in the room in question is one of those traditional NO/NC wired sensors that are in old alarm systems. I integrated them into my HE setup via Konnected (not sure if you're familiar with that). But they don't have a timeout period like zwave and zigbee motion sensors. They work very fast, but staccato-like, exactly like you're saying: active-inactive (subsecond), repeat, repeat, repeat.

Let me try the new code and see what happens. I'll come back and report. Thanks!
Edit: Brilliant, it works now. No more false manual overrides! Thank you so much!

Hey, was woundering if there was a way to have the auto mode work so the fan starts off as high and as it reaches the desired setpoint it reduces in speed based on the set levels and as the temp goes up reverses that order. Thank you for the amazing app definitely love it.

Do you mean some sort of speed step timer? I.e. If the temperature drops suddenly from 78 to 72 start at high, wait a bit, switch to medium, wait a bit then drop to low?

Right now it will just jump to whatever speed it should be at based on the current temperature, so it would go straight from high to low in that situation, assuming the temperature changed instantly.

I guess I'm not really sure how that situation would arise though. If your A/C kicked on and cooled the room it would do so gradually, and your fans should gradually slow. Maybe your temperature sensors don't report often enough?

Kind of like a set number of degrees above the setpoint that it would reduce from High to say Medium and then another number of degrees before it would reduce to Low then Off. The use would be for something like when your running window fans and the temperature outside fluctuates frequently so the fans would supplement them by increasing or decreasing based on the actual need to help cool to that set point the closer you get the less need for the assistance but turning them off completely halts the assistance assistance all together requiring them to turn back on then back off more frequently to help circulate the air as the temp fluctuates. Hopefully that makes some sense it did in my head lol.

I'm still not sure I quite follow. What you want sounds like exactly how this app works. Do you want the temperature step to be different between each setting?

For example, right now you can set the set point to, say, 75F, with a step of 3 degrees. At 75F the fan will switch from off to low, at 78F it will switch from low to medium, etc.

Do you want a lower set point, with different steps between each setting? For example, a set point of 70F, switch to medium at 77F, high at 80F? So a step of 7 degrees between low and medium and a step of 3 degrees between medium and high?

If not, can you give a concrete example of what temperatures you would like to set your fan to which speeds?

Your second example sounds perfect to what I mean being able to define the low temp at which it would turn off then at what points it would increase in speed or decrease based on what the temperature sensor is registering. Your first example would also work lowering by a predefined amount till the low temp is reached. So actually both are spot on. :smiley:

The first example is exactly how this app currently works. Make sure you've selected your fan as a fan controller instead of a switch and there will be a "Temperature Step" field. The app will set your fan to low (or the lowest selected "Participating Speed") when the temperature gets above your initial set point and then increase it by one step every "Temperature Step" degrees above the set point.

Is that under the app or device it's self or is it something done in Rule Machine because I tried finding it in rule machine when I didn't see it in the device settings and it doesn't give that option there under the control a fan setting

Actually I just found it in the App so just to confirm by setting say 3 degree step point with a cooling setpoint of say 65 then at 68 it would turn the fan to low then 71 to medium then 74 to high and off when and if it returned to 65