Alright, so “devils three way” – sounds wild, right? Let me tell you, it kinda was. It all started because I wanted to mess around with my old Raspberry Pi. It was just sitting there, gathering dust, and I figured, “Why not make it do something interesting?”

The Setup
First things first, I had to dig the poor thing out. Found it tucked away in a drawer, along with a bunch of random cables and adapters. I blew off the dust, plugged in the power, and… nothing. Dead. Turns out the old SD card I had in it was totally fried. Classic.
So, off to the store I went. Grabbed a new microSD card – 32GB, because why not go big? – and then came the fun part: figuring out what the heck to actually do with this thing.
The Idea
I’d been reading about people setting up these crazy home automation systems, and I thought, “I could probably do something like that… but simpler.” I didn’t want to control my whole house, just… something. That’s when it hit me: my desk lamp, a fan, and my speakers.
That’s the “three way,” if you didn’t catch that, control these three things from my phone. It sounds fancy, but you can get them working one by one and then combine them.
Getting It Done
Step 1: The Software. I decided to go with Raspbian, the standard OS for Raspberry Pi. Downloaded the image, flashed it onto the new SD card, and popped it into the Pi. Booted it up, and boom – we were in business. I’m not gonna lie, the initial setup was a bit of a pain. Lots of Googling, lots of trial and error, lots of cursing at the tiny keyboard.

Step 2: The Connections. This is where things got a little… sketchy. I’m no electrician, so I was pretty nervous about messing with the actual wiring. I ended up using these little relay modules – they’re basically switches that the Pi can control. I wired them up to the lamp, the fan, and a power strip for the speakers, following some instructions I found online. (Seriously, be careful with this part. Electricity is no joke.)
-
Connect the lamp: snip, strip, wire to relay, pray I didn’t blow anything up.
-
Connect the fan: same deal, but with a different relay channel.
-
Speakers: used the power strip, so it was just a matter of plugging it into the relay-controlled outlet.
Step 3: The Code. Okay, I am not a coder. But I can copy and paste with the best of them. I found some Python scripts online that let you control the Pi’s GPIO pins (those little pins that connect to the relays). With a bit of tweaking, I got it working! I could turn the lamp on and off with a command on the Pi. Progress!

Step 4: Making It Remote. This was the real trick. I wanted to control everything from my phone. I ended up using a web server on my computer – super basic, just enough to send commands to the Pi. Then, I wrote a simple webpage with buttons for “Lamp On,” “Lamp Off,” “Fan On,” etc. Each button would send a request to the Pi, which would then flip the right relay.
The Result
It… actually worked! It wasn’t pretty, it wasn’t perfect, but I could sit on my couch and turn my lamp, fan, and speakers on and off with my phone. Was it practical? Not really. Was it cool? Absolutely. I felt like some kind of low-budget Tony Stark.
The whole process was a mess of tangled wires, confusing code, and moments where I thought I’d bricked the whole thing. But hey, that’s half the fun, right? I learned a ton, and I ended up with a slightly ridiculous, totally over-engineered way to control my desk. Would I recommend it? If you’re looking for a weekend project and aren’t afraid to get your hands dirty, then yeah, go for it. Just don’t blame me if you short-circuit your house.