Abusing Raspberry Pi GPIO pins as a radio transmitter to control my ceiling fan

  Рет қаралды 30,796

River's Educational Channel

River's Educational Channel

Күн бұрын

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.

Пікірлер: 75
@thekaratekid02
@thekaratekid02 3 жыл бұрын
This was incredibly interesting. Definitely subscribed.
@riveducha
@riveducha 3 жыл бұрын
Appreciate the compliment - it’s real motivation for me to make more videos!
@tracelandreth8704
@tracelandreth8704 3 жыл бұрын
"Holy sh**, it worked!" I died XD
@JohnWalz97
@JohnWalz97 3 жыл бұрын
That feeling is the best!!!!
@evocatiproductions
@evocatiproductions 3 жыл бұрын
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!
@riveducha
@riveducha 3 жыл бұрын
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.
@jawidwardak691
@jawidwardak691 3 жыл бұрын
Dude, thanks for this awesome video. I wish there would be more content like this.
@riveducha
@riveducha 3 жыл бұрын
Working on more vids! They take a long time to make though.
@hindenberg25557
@hindenberg25557 2 жыл бұрын
So much useful and interesting info packed into 5 minutes. Thank you!
@rossrobots5160
@rossrobots5160 3 жыл бұрын
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!
@KenanArik
@KenanArik 3 жыл бұрын
Awesome - thanks for the great explanation and detail! Subscribed! Looking forward to your next projects :)
@structure7
@structure7 3 жыл бұрын
Fantastic series of videos. I somehow managed to make this work for my Home Depot "Britton" fan controllers... made my Sunday! Thank you!!!
@riveducha
@riveducha 3 жыл бұрын
Great to hear it worked for you! I’m also glad that my explanation was understandable enough!
@repzo5551
@repzo5551 3 жыл бұрын
Very cool video, straight to the point with a lot of information in a short time ! Liked & subbed
@riveducha
@riveducha 3 жыл бұрын
Thanks! Always tough to decide what info to include or leave out.
@nostrislife
@nostrislife 8 ай бұрын
3:50 no truer words have been spoken 😂😂
@yeetyeet7070
@yeetyeet7070 3 жыл бұрын
Amazing explanations, love these kinds of videos
@kdausu90
@kdausu90 3 жыл бұрын
Amazing! Exactly what I was looking for.
@-someone-.
@-someone-. 2 жыл бұрын
Awesome! More raspberry pi please!
@alexiswiniger173
@alexiswiniger173 3 жыл бұрын
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
@riveducha
@riveducha 3 жыл бұрын
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.
@cjhoyle
@cjhoyle 2 жыл бұрын
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!
@riveducha
@riveducha 2 жыл бұрын
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!
@cjhoyle
@cjhoyle 2 жыл бұрын
@@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.
@jakeb4597
@jakeb4597 3 жыл бұрын
Just watched previous video and this one. Very neat and impressive!
@therealguts268
@therealguts268 3 жыл бұрын
Now, this is epic
@honzaled
@honzaled Жыл бұрын
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
@MrRoma70
@MrRoma70 2 жыл бұрын
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
@MrPacMan36
@MrPacMan36 6 ай бұрын
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
@bitterrotten
@bitterrotten 3 жыл бұрын
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.
@riveducha
@riveducha 3 жыл бұрын
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.
@Electromakerio
@Electromakerio 3 жыл бұрын
We loved this project so much that we featured it in this weeks episode of The Electromaker Show! kzbin.info/www/bejne/inWpYmWDi7KCnK8
@chinchinchin695
@chinchinchin695 3 жыл бұрын
incredible project, i came from reddit 😎
@dennisasamoah2213
@dennisasamoah2213 3 жыл бұрын
Genius stuff
@Thealiw1
@Thealiw1 2 жыл бұрын
Wow! Fantastic! Have you been able to integrate it into Home Assistant as you mentioned on 4:25 ?
@alfatech8604
@alfatech8604 5 ай бұрын
earned a new subscriber please make a video on using universal radio hacker
@skeeviesteve1071
@skeeviesteve1071 3 жыл бұрын
Genius
@AbuSous2000PR
@AbuSous2000PR Жыл бұрын
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
@wolframzirngibl1147
@wolframzirngibl1147 3 жыл бұрын
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.
@riveducha
@riveducha 3 жыл бұрын
Yes, that was an oversight that I also mentioned in the errata webpage. Luckily the harmonics are pretty weak!
@baremetaltechtv
@baremetaltechtv 2 жыл бұрын
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.
@davidpeterson894
@davidpeterson894 3 жыл бұрын
Great work! I want to adapt this to control X10 devices. I guess receiving signals would be asking too much. Thanks
@riveducha
@riveducha 3 жыл бұрын
The RPi cannot receive arbitrary signals like this, but you can look into the CC1101 transceiver which a lot of hobbyists use.
@kushavlogs8433
@kushavlogs8433 2 жыл бұрын
Do you know how to connect or attach the raspberry pi GPIO pins to the DWM1000 uwb IC?
@PixelatedDoesStuff
@PixelatedDoesStuff 4 ай бұрын
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
@forxan
@forxan 2 жыл бұрын
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.
@xspacephotography31
@xspacephotography31 Жыл бұрын
How do you power up your antenna? I need a range more than 30 ft…
@mohammedmohsen723
@mohammedmohsen723 Жыл бұрын
would it be possible to be done for esp32?
@DDBAA24
@DDBAA24 3 ай бұрын
What kind of range do you get with the filter + antenna ? Also whats the dbi on the one your using ?
@PijnackerRonald
@PijnackerRonald Жыл бұрын
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?)
@riveducha
@riveducha Жыл бұрын
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
@thej8944
@thej8944 3 жыл бұрын
Hello, love the videos and I subscribed do you know the code for your web server
@riveducha
@riveducha 3 жыл бұрын
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.
@arjunlagoon2015
@arjunlagoon2015 Жыл бұрын
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.
@user-fo3to8rn2x
@user-fo3to8rn2x 2 жыл бұрын
Does the added antenna improve the range of the signal or not?
@riveducha
@riveducha 2 жыл бұрын
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.
@PijnackerRonald
@PijnackerRonald Жыл бұрын
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?
@riveducha
@riveducha Жыл бұрын
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.
@PijnackerRonald
@PijnackerRonald Жыл бұрын
@@riveducha Thanks. A piece of plastic stripped from an electric cable did the job too :)
@aim__freakz8499
@aim__freakz8499 3 жыл бұрын
what are you doing as a profession? and how did you learn all this?
@riveducha
@riveducha 3 жыл бұрын
I'm unemployed, but that might change if I'm lucky! Most of the stuff I learned is just from Googling.
@VadymZakrevskyy
@VadymZakrevskyy 3 ай бұрын
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?
@i-am-kluge
@i-am-kluge 3 жыл бұрын
I cloned rpitx off github, but it doesn't have the sendook util... Did I grab the wrong one?
@riveducha
@riveducha 3 жыл бұрын
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.
@i-am-kluge
@i-am-kluge 3 жыл бұрын
@@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...
@n.w.aicecube5713
@n.w.aicecube5713 3 жыл бұрын
What range of freq could transmit ?
@riveducha
@riveducha 3 жыл бұрын
According to the rpitx readme: "It can handle frequencies from 5 KHz up to 1500 MHz."
@n.w.aicecube5713
@n.w.aicecube5713 3 жыл бұрын
@@riveducha very interesting
@wladyslawkorczynski7386
@wladyslawkorczynski7386 2 жыл бұрын
Please sens address.
@Bharathk-bi9tg
@Bharathk-bi9tg 2 жыл бұрын
Does this rpitx works in pi4
@riveducha
@riveducha 2 жыл бұрын
There's a compatibility list on the project page: github.com/F5OEO/rpitx Support for Pi4 is listed as "beta".
@apfelstrudlOfOA
@apfelstrudlOfOA 3 жыл бұрын
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?
@riveducha
@riveducha 3 жыл бұрын
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.
Raspberry Pi FM Radio Transmitter | Tutorial
11:07
Seytonic
Рет қаралды 201 М.
Top 10 Uses for a Raspberry Pi (400th EC video!)
11:24
ExplainingComputers
Рет қаралды 238 М.
Best KFC Homemade For My Son #cooking #shorts
00:58
BANKII
Рет қаралды 66 МЛН
Little girl's dream of a giant teddy bear is about to come true #shorts
00:32
Clowns abuse children#Short #Officer Rabbit #angel
00:51
兔子警官
Рет қаралды 79 МЛН
Fast and Furious: New Zealand 🚗
00:29
How Ridiculous
Рет қаралды 41 МЛН
Hacking My Ceiling Fan Radio Signal With a $15 USB TV Tuner (RTL2832U)
7:20
River's Educational Channel
Рет қаралды 15 М.
GPIO for any PC or Laptop: Adafruit FT232H
19:18
ExplainingComputers
Рет қаралды 199 М.
Basic usage of the Raspberry Pi GPIO pins
13:44
Engineer Man
Рет қаралды 96 М.
RADIOBERRY HF SDR TRANSCEIVER PI HAT - IT'S BACK!
8:45
Tech Minds
Рет қаралды 154 М.
Turning the Raspberry Pi Into... an FM Radio Station??
14:01
024 Software Defined Radio with Predefined Raspberry Pi SD Card Images
11:19
The Cheapest Radio Receiver For Beginners / RTLSDR v4
14:24
WiFi hacking with a Raspberry Pi and Parrot OS
16:06
David Bombal
Рет қаралды 93 М.
Portable Raspberry Pi 4 Amateur Radio Station
10:22
Ham Radio Crash Course
Рет қаралды 140 М.
Todos os modelos de smartphone
0:20
Spider Slack
Рет қаралды 63 МЛН
Kumanda İle Bilgisayarı Yönetmek #shorts
0:29
Osman Kabadayı
Рет қаралды 2,2 МЛН
Tag him😳💕 #miniphone #iphone #samsung #smartphone #fy
0:11
Pockify™
Рет қаралды 2 МЛН
iPhone 15 Pro Max vs IPhone Xs Max  troll face speed test
0:33