I used a Sonoff Dual and wired my ceiling fan to turn the fan and the light - EACH - on and off with the app and Alexa. Each works independent of the other.
How you may ask? So simple, it should have been done and posted on Youtube already. We need someone that does videos to do this and document it.
I cut a 3 or 6 foot 2 prong extension cord about 12" from the female plug. Then wire the two prong cord/plug into the L and N of the Dual contacts Input. I program the Dual to the WiFi and give it the switches temporary or permanent names.
I have access to my attic and the upside of the ceiling mount I turned off power and installed a one gang box and a single 120v wall outlet with cover. I like the simplicity of being able to remove power by just unplugging it. Connect Output 1 to the Blue wire of the ceiling fan. Connect Output 2 to the Black wire of the ceiling fan. Connect one of the Dual's N to the white wire of the ceiling fan. You only need to connect one of the Dual's N to the ceiling fan. Leave the ground wire on the ceiling fan connected to the ground on the 120v installed wall outlet. Now plug the plug into the outlet and power up the Dual. Turn power back on at the outlet/ceiling fan.
Now the Dual allows me to name and turn on and off each – the fan and the light, or I can use the Dual’s primary name and turn both on or off at the same time.
I used 2 each 2pin JST plug connectors and connected them to the two sets of terminals on
the Dual and ran them with lightweight 22 gauge solid telephone to the wall light switch box can using two more 2pin connectors with miniature momentary switches, so
they can be turned on and off manually.Drilled to small holes in flat plates for the wall outlets and mounted the switches.
This is such a great resource that you are providing and you give it away for free. I love seeing blog that understand the value. Im glad to have found this post as its such an interesting one! I am always on the lookout for quality posts and articles so i suppose im lucky to have found this! I hope you will be adding more in the future... surgical face mask