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
-
My fans are controlled by one switch on the wall to supply power on/off to the entire fixture.
-
A pull switch on the light fixture to turn the fan light on/off.
-
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
-
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).
-
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).
-
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?