I had seen and sort of dismissed the whole smart home concept long ago because it’s all so expensive, but a few weeks ago, I had an idea. I would try to make my ceiling fan remotely controllable with HomeKit. (HomeKit because I primarily use Apple devices) If I was successful, I would give smart home stuff a shot. Spoiler: I was successful. Soon, I intend write about my adventures making other smart home stuff on the cheap like smart plugs.
First, I wanted to get the hardware working without the fuss of working with Apple’s HomeKit protocol. With a multi-meter and testing using some wire I had on hand, I worked out which parts of the button pads I needed to pull low in order to emulate a button press.
Then, I soldered wires to each of the portions of the button pads that source current. (The current sinks are the ones that are connected to ground while the sources are the other ones.)
One thing I haven’t mentioned up to this point is that the remote runs on 12V while the Pi runs on 5V, so if I used the Pi to power the remote PCB, it would not have enough power to send a strong enough signal. I did find that it did sort of work, but wasn’t anything close to reliable, so I cobbled together a small battery holder for the button PCB, and put it’s original battery in it for power. However, in order for the pi to successfully communicate with the remote PCB, they have to share a ground potential. Basically, I had to connect their grounds together. Then I discovered that once connected to the Raspberry Pi, the remote would think that all of the buttons are being perpetually pressed even if the Pi was trying to source current (outputting a 1 on the GPIO pin). So, I soldered some 68k ohm resistors between the Pi and the remote, and…….. Success! I could send button presses to the remote by outputting 0s to the GPIO pin!
I intend to move away from using a Raspberry Pi as an entire operating system is not necessary and quite inefficient to interact with HomeKit. Eventually, I think I’ll transition to using an ESP-8266 as they are super cheap and efficient.