Hardware Hacking with Codex

I just moved in to a new apartment, and while getting up to let in a delivery driver for the 5th time that day, I decided I needed to make my intercom smart.

So I did what I do with any problem I encounter in life now, I turned to Codex.

Codex conversation introducing the apartment intercom, with photos of the handset and circuit board

Within 30 seconds, it'd had found the instructions for the unit, and mapped out an architecture we should pursue.

Codex response showing the recommended intercom architecture and a block diagram

I was excited, and a little daunted by the challenge, hacking software is my expertise not hardware. Things like this are normally just reserved for me to enjoy via YouTube, alas I pursued.

Next up, ordering the parts, I had no idea what I'd actually need to make this a reality – so I just asked and Codex delivered.

Codex-generated Amazon shopping list for the intercom project
I did later ask it to refine the shopping list and restricted it to listings that'd arrive same-day, so not quite one shotted, but close enough.

Now the hardware was actually here, it was time to actually push Codex, we all know it can use Computer Use to make a shopping list...

I was feeling very out of my comfort zone at this point... but I pursued, comforted by it creating schematics or annotating photos for anything I was unsure about.

Prompt asking Codex to identify and annotate the CN3 connector
Annotated intercom circuit board identifying the CN3 connector and other components

Our first step was creating a basic lock/unlock mechanism, there's already a button for this on the unit – so it can't be that complex. Something I'd probably have been able to manage before computers could think.

Prompt asking whether bridging ground and VR1 restarts the Raspberry Pi
There were a few heart in mouth moments
Codex conversation confirming that the relay now unlocks the intercom

Before long, I (we) had unlocking working over SSH, it was a bit scrappy, but it was a working demonstration. Now I had a bit of confidence, and we could approach the harder challenge of extracting video out of the unit, something I had no idea on how we'd tackle.

Raspberry Pi, relay board, wires, and multimeter arranged on a cardboard box
Yes, I was soldering on a cardboard box while standing up. Safety first.
Codex conversation confirming remote unlock works end to end

Next up was actually getting this video signal, and processing its output. While awaiting the delivery, we (it) wrote the software side to the issue.

Codex reporting that video passthrough software is ready for the capture card
I said "hell yeah" to it once, and it repeated it every time we achieved something. Weird quirk.

The capture card we required then arrived, I was instructed to splice the cables on it's video wire. I obliged.

It made me an annotation on what to wire, and where to.

Annotated photo showing where the yellow and black wires connect to an RCA cable

I plugged everything back in, full of hope, thinking it couldn't be this easy... I was right. We just had a solid black image. I complained in a way that I won't attach. It asked me to take some new measurements from the other wires in that area of the motherboard.

Codex software diagnosis showing the capture card receives no analogue signal
Codex requesting voltage measurements and the measured values in reply
Codex wiring instructions followed by confirmation that the white wire is soldered

I did as I was told, and told it to try again. Success.

Codex conversation showing the first visible PAL video frame from the door camera

At this point, things were getting a bit messy, but they were working. The only challenge left was getting the camera and lock added to Apple Home, so I didn't have to tell my girlfriend she had to SSH into a Raspberry Pi to open the door.

The assembled Raspberry Pi, capture card, relay, and wiring spread across a table

One prompt later, it had set up home assistant and connected it to my Apple Home. Five days later it's worked without a hitch, and I was able to answer the door while writing this article without getting up from my desk.

Codex confirming the Front Door camera and lock now appear in Apple Home
Apple Home notification showing someone rang the smart doorbell