Abusing Raspberry Pi GPIO pins as a radio transmitter to control my ceiling fan
Vložit
- čas přidán 1. 06. 2024
- In Part 1, we covered capturing and decoding the remote control's signal using
a USB TV tuner: • Hacking My Ceiling Fan...
In Part 2, we take use a Raspberry Pi's GPIO pin as an antenna to transmit our
own signals to the ceiling fan.
rpitx: github.com/F5OEO/rpitx
The ceiling fan / light combo I have is Minka Aire brand. I think most of the
different ones on the market work pretty similarly.
----
Parts:
rpitx lists the Raspberry Pi 4 as having "beta" support. (I used a Raspberry Pi 3B.)
Sparkfun: www.sparkfun.com/products/14643
Adafruit: www.adafruit.com/product/3055
Amazon: amzn.to/3crvFFI
I found my low-pass filter on eBay (overseas shipping). Digikey has low-pass
filters that would also work, but not as cheap.
eBay low-pass filter: ebay.us/4cSPe5
eBay SMA antenna: ebay.us/GcL9qa
eBay SMA connector: ebay.us/PGPmGM
Note that these all have SMA connectors, not RP-SMA (which look very similar).
Also note that eBay listings come and go, so double-check that you get
compatible parts. The antenna does not need to be exact - the one I got is
listed for 315 MHz and works just fine.
-----
Background music:
Aerosol Of My Love by Kevin MacLeod
Link: incompetech.filmmusic.io/song...
License: filmmusic.io/standard-license
-----
Some links may be affiliate links. - Věda a technologie
This was incredibly interesting. Definitely subscribed.
Appreciate the compliment - it’s real motivation for me to make more videos!
This was amazing! This may be what I need to finally have a way to remotely control my ceiling fan.
I bought an old house from the 70s back in 2007, and its where I still currently live. In my master bedroom is the only ceiling fan in my house that did not come with its remote control. This ceiling fan is a knock off brand ceiling fan, but I have ordered dozens of different ceiling fan remotes for ceiling fans that looked like mine through google searches, and every single one of these remotes did not work with my ceiling fan. The ceiling in my room is also really high, so even though I am 6 Feet tall, I still have to get up on the top of my step ladder in order to pull the chains to change the fan speed, and the chain for light is broken, so I just installed a different light in my room.
I kind of gave up after the 12th time I ordered a remote and it failed to work. I already have a bunch of Broadlink devices in my house that I use to capture remote signals, so I can control RF and IR Devices over WiFi using this device, but I have never been able to figure out how to capture the signals my Ceiling fan needs to transmit the correct RF commands to it to change the fan speed or turn on or off the light or fan in it.
Do you know of a way to capture the codes needed without having the remote to the ceiling fan by chance?
Either way, Awesome Video man! I hope this brings in the subscriber base you deserve, I am subscribed now, and I actually found this through a Toms Hardware article that referenced your video, so hopefully that will direct more traffic your way!
I don’t know a great way to figure out the wireless commands without the remote. There’s a chance you can find the “FCC ID” inside the fan that you can then look up on the FCC’s database. You may be able to figure out manufacturer and frequency this way.
"Holy sh**, it worked!" I died XD
That feeling is the best!!!!
Dude, thanks for this awesome video. I wish there would be more content like this.
Working on more vids! They take a long time to make though.
So much useful and interesting info packed into 5 minutes. Thank you!
Awesome. I had tried to broadcast fm radio with a pi 0, but this is an even better usecase and the software seems to have improved since then as well!
Awesome - thanks for the great explanation and detail! Subscribed! Looking forward to your next projects :)
Amazing explanations, love these kinds of videos
Fantastic series of videos. I somehow managed to make this work for my Home Depot "Britton" fan controllers... made my Sunday! Thank you!!!
Great to hear it worked for you! I’m also glad that my explanation was understandable enough!
Amazing! Exactly what I was looking for.
Very cool video, straight to the point with a lot of information in a short time ! Liked & subbed
Thanks! Always tough to decide what info to include or leave out.
I just stopped to watch your video as getting into the Raspy world, and I was amazed. Can I ask if possible to provide the Flask code? Anyway, either way keep up with the work I am hooked now, lol
Awesome! More raspberry pi please!
Awesome video, just discovered your channel through the Valorant video, you definitely deserve more views and subscribers!
By the way, could you consider making the HA integration open-source? I have a Bluetooth controller light that also has a RF remote and I think that RF control would be more consistent that Bluetooth
Really inspiring, thank you for this one. :)
I would love to learn more about the "web app" you quickly made to test the setup.
All the best
There’s not a whole lot to it - the web app simply runs sendook when you push a button. It uses Flask as the framework so I didn’t have to write much code.
Fantastic tutorial! This was exactly what I was looking for. I was able to follow your instructions to control an old Radio Shack wireless remote switch using my Raspberry Pi. Believe it or not, without any kind of antenna plugged into the pin, it actually works within a range of up to 2 meters! I'm planning on using this technique to control the fan speed on my humidifier, but first I had to order the optional remote for it so I can eavesdrop on the signals it sends. Thanks for the video!
I’m so happy you got it to work on your own appliances! It’s amazing how wireless stuff used to be such a mystery to me but with some cheap electronics it’s so easy to figure out and control!
@@riveducha Absolutely! Thanks to your video I feel like I truly understand how those wireless remotes work, and they are surprisingly simple. Still, it was very exciting when my switch turned on for the first time from a command that I sent using the Pi. I have an air conditioner which operates using an IR remote control, so learning to controlling things with an infrared LED is on my list of things to learn next summer.
Just watched previous video and this one. Very neat and impressive!
Wow! Fantastic! Have you been able to integrate it into Home Assistant as you mentioned on 4:25 ?
3:50 no truer words have been spoken 😂😂
Now, this is epic
If anyone is having trouble getting this to work with their fan, pay attention to the pause interval and move the repeat number up to at least 3. These issues tripped me up.
I also noticed that repeating the message only once or twice didn't always work. The manufacturer remote just repeats the message for as long as you hold down the button.
Many thx...very helpful. I wonder if you made the follow up video you referred to with the home assistant?
I searched your channel but could not find it
HONESTLY... that is a simple Idea and I am shocked I have not thought about it
Do you kow if it is capable of transmitting text? I mean like as packet radio
good job man
too bad I just noticed your channel
cheers from palestine
incredible project, i came from reddit 😎
This is exactly what I need to control my motorized projector... I'm in IT but can't totally write program language, but I can kind of understand and can definitely copy and paste 😅... I hope to also have it tied into Google Assistant
I really want to use the GPIO pins as a wireless transmitter and reciever to network 2 pi's and create an ssh link over the connection. I know its possible but haven't seen it done anywhere.
where can i find a video on how to connect the matierials (for example that small antenna with the wires, etc...) . i really need help with learning such skills
Great work!
I want to adapt this to control X10 devices. I guess receiving signals would be asking too much.
Thanks
The RPi cannot receive arbitrary signals like this, but you can look into the CC1101 transceiver which a lot of hobbyists use.
Sorry for stating, that any effort to filter out "harmonics" must fail when made this way. The wires for connecting Pi and Filter will radiate probably as much still unfiltered signal than attached antenna will radiate filtered signal - if not more than the antenna.
Yes, that was an oversight that I also mentioned in the errata webpage. Luckily the harmonics are pretty weak!
earned a new subscriber please make a video on using universal radio hacker
What kind of range do you get with the filter + antenna ? Also whats the dbi on the one your using ?
Genius stuff
Do you know how to connect or attach the raspberry pi GPIO pins to the DWM1000 uwb IC?
Nice! I'm trying this with my Pi 3b, but I have some trouble getting the "antenna" to stick to the GPIO pin.
How did you manage to get that attached without it falling off?
Easiest is probably to get a female-to-female pin connector wire. You don’t need the other end to be connected to anything, of course.
@@riveducha Thanks. A piece of plastic stripped from an electric cable did the job too :)
How do you power up your antenna? I need a range more than 30 ft…
would it be possible to be done for esp32?
Hello, love the videos and I subscribed do you know the code for your web server
Hey, I haven’t posted the code and honestly it’s not great code or interesting code. Sorry! If you can hack together a web page with buttons in PHP, Python, whatever, then it should be pretty straightforward to recreate.
We loved this project so much that we featured it in this weeks episode of The Electromaker Show! czcams.com/video/TDF12MVMOfM/video.html
Does the added antenna improve the range of the signal or not?
Adding an antenna increased the range by a huge amount compared to having no antenna. I don't think there's much difference between having a simple wire and a nice-looking antenna but didn't measure.
Hi everyone,
I would like to be able to receive the signal from a controller with an HCS301 (MICROCHIP KeeLoq) in the transmitter and with a PICxxx or an ATMELxxx in the receiver.
There is a library for ARDUINO about receiving the signal from an HCS301 and another to emit the signal from an HCS301, but I can't find it... I'm still looking.
Greetings to all.
The signal I recorded isn't a nice OOK signal. Any way I can send a frequence modulated signal on a carrier signal with rpitx too?
(Is there a better support channel for these questions?)
Rpitx can do basically anything, but you may need to roll up your sleeves and write some code. There is a group here: groups.io/g/rpitx
Genius
what are you doing as a profession? and how did you learn all this?
I'm unemployed, but that might change if I'm lucky! Most of the stuff I learned is just from Googling.
My raspberry pi 4 crashes when I run the script, it's able to send out a signal and I'm able to turn on some radio controlled lights in backyard, but I have to restart my pi everytime I want to run it. Do you know a fix for this? Love your vids I wish you posted more.
It looks like sendook requires sudo to be run.. were you able to get it to work normally, or did you give www-data sudo rights?
What range of freq could transmit ?
According to the rpitx readme: "It can handle frequencies from 5 KHz up to 1500 MHz."
@@riveducha very interesting
I cloned rpitx off github, but it doesn't have the sendook util... Did I grab the wrong one?
It needs to be compiled first (source code is in src/ook). I think the install.sh script that comes with rpitx should install all the dependencies and compile everything for you.
@@riveducha Yeah.. forgot to take my anti-stoopid pills earlier. Noticed the install script a few mins after I asked, and forgot to run back here and delete my post before anyone read it and thought I was a moron, hahahaha...
Does this rpitx works in pi4
There's a compatibility list on the project page: github.com/F5OEO/rpitx
Support for Pi4 is listed as "beta".
Please sens address.
So hold on a second, did you just shut off a ceiling fan and regular light, none of which are "Smart" using a Raspberry Pi sending radio frequencies?
The ceiling fan has a built-in light (it’s a combo unit) and it comes with a remote control. It’s not “smart” meaning it doesn’t speak any standard protocols like Zigbee, Bluetooth, etc.