3-Speed Ceiling Fan Configuration?

I’m in the conceptual phase of retrofitting our home’s ceiling fans. I’ll try to describe what I’m thinking. From the start, this seems pretty complex so I’m hoping that this will spark a ready made solution or perhaps some alternative ideas.

Current Configuration

  1. My fans are controlled by one switch on the wall to supply power on/off to the entire fixture.

  2. A pull switch on the light fixture to turn the fan light on/off.

  3. A three position pull switch which selects the fan speed. This switch is wired to the speed control capacitor module. There is also a switch on the fan which controls the rotational direction.

Physical Wiring Concept

  1. Install a Sonoff basic at the wall switch. I need to ensure that power comes to the wall. If not, I need to have a neutral line installed to the wall outlet. The AC hot is wired straight (through) to the fixture rather that being switched by the wall switch. The AC is wired to the input (neutral & hot) to power the Sonoff. The is no load wired to this Sonoff. The light switch is wired to the Sonoff DC GND and GPIO (“DC input” from here on) (cost $5).

  2. At the fixture, a Sonoff basic is wired to control the light. The light’s pull switch is wired to the Sonoff DC input (cost $5).

  3. At the fixture, a Sonoff 4CH Pro (4 channel smart switch) is configured in interlocking mode (only one output on at any one time) (cost $25). Three of the outputs are wired to the fan’s capacitor block. The Sonoff 4CH will mimic the fan’s 4-position pull switch except that rather than having to cycle through the speed selection, the Sonoff switch can be turned off or select one of the three speeds directly. A new 2-position pull switch is wired to the Sonoff DC input (cost $2.50).

Total cost per room ~$40. If neutral installation required… add cost of an electrician’s work. Probably still not horribly high cost. All in all, the added value of the automation is easily worth it.

Automation Concept

  • The wall switch is only used to signal a “toggle” request to the Sonoff which sends a message to the MQTT broker accordingly. openHAB sees the message and takes the appropriate action on the fixture. If either the light or the fan are on, send a command to both fixture Sonoff switches to turn off. If neither are on, send a command to the light fixture Sonoff to turn the light on, and send a command to the Sonoff 4CH to set the fan according to the last persisted state (lo/med/hi/off).
  • There is no need to expose the wall switch to the openHAB sitemap. Remote control of the light or the fan take action on the Sonoff switches installed at the fixture. The fixture always has AC power available therefore those switches are the actual controllers.
  • The pull switches on the fixture are used in the same manner as the wall switch. Their function is to trigger a state change event that will generate an MQTT message to have it’s associated Sonoff switch take the appropriate action. In the case of the light, toggle on/off. In the case of the fan, cycle one step in the speed “map” (lo/med/hi/off).

There are a whole myriad of automation possibilities:

  • Turn on/off all fans
  • Turn on all fans when switching from Away to Home to circulate air along with HVAC
  • Set timer to turn off the fan at a certain time (e.g., 2AM-3AM after the room has cooled off)
  • Turn on/off the fan if the room has reached a certain temperature
  • Set a timer to run the fan for a certain amount of time
  • Turn fan on (default to medium)
  • Turn fan on to low/med/hi
  • Turn fan up/down
  • Turn light on
  • Turn fixture on/off - both Light and Fan

Has something like this already been done? If so, direct me there please.
Am I complicating things way too much? Is this kind of automation configuration possible?

There are modules readily available at the $40-$50 range you can put up in your fan to control both the speed and lights remotely. There are also zwave light switches that will replace the wall switch for the fan (you’d need a separate switch for the light) to control the fan speeds.

These too would need a neutral wire but personally, I think they would be a lot less work in the long run. Assuming you are already using zwave you are looking at < $80 if you choose the wall switch route (which is what I’d recommend). If not you need to add another $40-$50 for a controller. You have to decide if your time is worth less than added cost of using a proven approach that is designed for this use.

If you want to stick with the Sonoffs (NOTE: Personally I would not install a Sonoff anywhere it wasn’t out in the open, there were some QC problems in the past and a number of them burned up. Not a good thing if you have one in the dome of your ceiling fan mount or behind a wall)…

I think this should work. I’m assuming you would use Tasmota or one of the other alternative firmware.

How are you controlling this one? Wired to the switch in the same way as 1.? Is there room in the box for two Sonoffs?

This one gives me a little bit more concern because you will be both controlling the mains power and somehow hooking up the Sonoff to the physical switch. In theory, it seems like it should work but my spidey sense is going off.

Why not use one of the Sonoff wall switches or control panels at the box and forego the wiring?

I don’t know enough about how ceiling fans are wired to say one way or the other, but are you sure there is room in the box, ceiling mount dome for the Sonoff 4CH?

Once you have the MQTT messages being generated and responded to the automation part is pretty straight-forward.

Are the Sonoff Basics wired to momentary switches or toggles? If they are toggles then if you control the fans through any other means (e.g OH) then the physical state of the wall switches will not match the actual state of the fan/lights. From a usability perspective you may care, you may not. I know from experience though that thinking hard about these sorts of usability details are well worthwhile. Minor counterintuitive behaviors can make or break the usability of a system (the much-referenced and somewhat sexist “WAF”).

Actually implementing the automation possibilities you list, assuming you have all the necessary sensors in place, is relatively simple.

1 Like

@rlkoshak - Rich,

Yes, I am a believer that operational reliability and time and effort expended definitely warrant considering making the necessary financial investment in an off the shelf solution.

With a Z-wave solution, would I have the same level of configurability and flexibility with automation as what I described?

I’ve read that Z-wave and 2.4GHz Wi-Fi interfere. I have lots of Wi-Fi devices (besides some Sonoffs) on that frequency. Any issues?

Would a wall switch with the existing house wiring be able to control the light and the fan separately and provide the fan speed control as well? If so, I’m assuming that remote control via openHAB would have the same control capability as the physical switch; yes?

[quote=“rlkoshak, post:2, topic:44150”]
If not you need to add another $40-$50 for a controller.

What is the function of the controller?

Yes, I’ve read about Sonoff having had some QC issues. It seems they’ve addressed that and have obtained certifications on their products. More recent information seems to give them a good report card.

I believe this will address your Spidey sense and also the state “mismatch” concern. Trust me, I’m very much sensitive to WAF. This is why I have yet to cut the cable TV cord, for example :wink:

Yes, the two Sonoff switches would need to go in a junction box in the ceiling

I need the 4Ch switch at the fan in order to access the speed control wiring. Also, it is at the fan where I can control the light and the fan individually. The wall wiring is a single control for both since all it does is provide or disconnect power from the fixture.

Regards.

Mike

1 Like

I don’t have these specific devices so can’t say for certain, but from what I read there is nothing you mentioned that can’t be done.

I’ve not experienced any. I too have a number of Sonoffs, esp8266s, and RPis as well as azwave network with 10 devices.

Two switches like in your original plans. GE (among others) makes a multispeed fan controller switch and just about everyone makes zwave light switches.

Alternatively, you can use a zwave fan controller that sits and wires to the fan itself which can control light and fan speed. Then you can use a sonoff wall switch or a zwave wall switch that doesn’t actually control the power to the fan, just generates signals to oh to control the fan/light.

Not really. What i was referring to is that the light switch will physically be “on” but the fan will be off. Like I said, it might not matter to you, but my mother in law would find that maddening. Down == OFF. Toggling on state change is what I assumed would be implemented.

Provides the bridge between the zwave network and OH. Manages the zwave mesh network. I’m sure it does a bunch of other stuff too. You cannot talk to azwave device without a controller.

Thanks for the information. Perhaps the Z-Wave fan controller is exactly what I’m looking for!

Your mother-in-law must hate 3-way light switches - “It’s up, so the light must be on. But, no, the light is off. So the switch must be down. No. Head exploding. Wait, now later, it’s down and the light is still on. This must be a Bizarro universe!” I’m just ribbing you. :wink:

I know, I know. ‘On’ and ‘Off’ are imprinted right on the lever and the state wouldn’t match that. But, really, do we really read those? We’re programmed to think up is on, down is off. Except for multi-way wiring. Then we’re OK with the mismatch. Don’t we just flip the switch?

The ultimate solution is to get rid of the lever altogether. Jonathan Oxer (the SuperHouse video guy) actually uses momentary contact buttons in his house as switches. His entire setup is quite incredible. If I were building a house I’d wire it exactly like he has. But I’m DIY’ing and retrofitting (i.e., kludging!). Anyway. With a button, rather than looking for a state transition closed/open or open/closed event, the Sonoff sketch is configured to look at open/closed/open as the event. In the physical world, the action is to press the button. There is no visual mismatch.

Or use rocker switches. :slight_smile: There there is no physical switch state. Tap the top for ON and bottom for OFF but the switch itself doesn’t actually move. It is basically two momentary switches. I don’t remember where I got them (probably Home Depot) but they work well. They look like rocker switches.

There are lots of options for these as well that work with your existing wiring (assuming you have neutral). The Sonoff wall plates work this way for sure.

I found this PWM module which only $3.50, that can control the speed of fan using ESP8266 via Openhab. But I’m not sure about the coding and circuit wiring, but pretty sure that this can serve the purpose. If anyone knows how to use this module please let me know. AC Light Dimmer Module for PWM control, 1 Channel, 3.3V/5V logic, AC 50/60hz, 220V/110V
http://s.aliexpress.com/zueQjqm6?fromSns=Copy to clipboard

These PWM modules are only usable for lightning applications (resistive load). It won’t work to control a motor (= fan) with these modules, because motors have an inductive load.

Most of the ceiling fans have a three speed control switch (OFF, Low, Medium, High) which connects different coils or capacitors to control speed.

Example for wiring:
http://almiragar.win/three-speed-ceiling-fan-switch/three-speed-ceiling-fan-switch-three-speed-ceiling-fan-switch-wiring-diagram-for-a-3-way-ceiling-4-wire-3-speed-ceiling-fan-switch/