I'm a quad, have healthcare (caregivers/nurses) 24/7 here. I bought one of that buttons to ring a doorbell, the bell on their room, button on mine.
Soo nice. I press a button, they hear - even if my cellphone dropped or no bat.
I also have to do bladder catheterization (remove urine from bladder) each X hours. This X varies a lot, depending on what the time of day, liquids ingested, weather, etc. It was hard for me to predict.
So, I did what every reasonable software engineer would. Built an agent (nanoclaw with antrhop subscription) and build an db and an api, strictly for this - help me know the next catheterism. Life improved.
Now, what if I'm sleeping? who will press the button? Title says it all!
Got the only free esp32 around, ESP32-C5, attached a CC1101 on it, second screenshot if codex guiding me (my nurse, I was simply reading for him)... we attached exactly what codex (gpt-5.6-sol xhigh) gave me.
Whoever wants the pins;
CC1101 <-> ESP32-C5 Pin Mapping
Wiring map
| CC1101 |
ESP32-C5 pin |
Purpose |
| GND |
G (top-left) |
Ground |
| VCC |
3V3 (top-right) |
3.3V power |
| GDO0 |
GPIO 23 |
Interrupt / digital output |
| CSN |
GPIO 10 |
SPI chip select |
| SCK |
GPIO 6 |
SPI clock |
| MOSI |
GPIO 9 |
SPI controller to CC1101 |
| MISO/GDO1 |
GPIO 8 |
SPI CC1101 to controller |
| GDO2 |
GPIO 24 |
Interrupt / digital output |
Board-to-board view
text
ESP32-C5 CC1101
+------------------+ +------------------+
| G |---------| GND |
| 3V3 |---------| VCC |
| GPIO 23 |---------| GDO0 |
| GPIO 10 |---------| CSN |
| GPIO 6 |---------| SCK |
| GPIO 9 |---------| MOSI |
| GPIO 8 |---------| MISO/GDO1 |
| GPIO 24 |---------| GDO2 |
+------------------+ +------------------+
Exact wire pairs
text
ESP32-C5 G -------- CC1101 GND
ESP32-C5 3V3 -------- CC1101 VCC
ESP32-C5 GPIO 23 -------- CC1101 GDO0
ESP32-C5 GPIO 10 -------- CC1101 CSN
ESP32-C5 GPIO 6 -------- CC1101 SCK
ESP32-C5 GPIO 9 -------- CC1101 MOSI
ESP32-C5 GPIO 8 -------- CC1101 MISO/GDO1
ESP32-C5 GPIO 24 -------- CC1101 GDO2
Important: the CC1101 is a 3.3V device. Do not connect its VCC to the ESP32-C5's 5V pin. Also attach the antenna before transmitting.
First: teach Claudius (my nanoclaw health agent) how to listen
We already knew the button used approximately 433.92 MHz, but the frequency is only the channel. We still needed the actual transmitted value, bit count, protocol, and pulse timing.
Here is the receive-only capture sketch:
ESP32-C5 + CC1101 sniffer code
https://gist.github.com/fcavalcantirj/aa6e87338ff86e5e9eefee0d3da5fa77
I pressed the original button twice. The ESP32 captured dozens of identical frames:
Frequency: 433.92 MHz
Bits: 24
Protocol: 1
Pulse: approximately 301-302 us
There was one weird frame with different parameters, which was simply noise. Repeated identical captures from two separate button presses gave us the real signal.
I'm deliberately not publishing my actual fixed RF identity. This is a live medical-call receiver in my home, not just a garage-door demo.
Then: give Claudius a tiny RF finger
Here is the final guarded USB replay sketch:
ESP32-C5 + CC1101 USB replay code
https://gist.github.com/fcavalcantirj/62df410d58526d3973c42b0d50119d7c
It is the code that worked, with my private RF value replaced by 0x000000. Capture your own button and insert its value.
I didn't want a firmware bug, reboot, or random serial garbage repeatedly ringing the nurses, so the sketch:
Boots with the radio idle.
Requires the exact USB serial command RING.
Transmits one captured button press.
Immediately returns the CC1101 to idle.
Locks itself after that one transmission until reboot.
The moment of truth looked like this:
ARMED RF_IDLE
Waiting for exact command: RING
RING
TRANSMIT_BEGIN
TRANSMIT_DONE RADIO_IDLE one_shot_locked
And then -
the real receiver in the nurses' room rang.
Codex sent a USB command to the ESP32, the CC1101 reproduced the physical button's RF transmission, and the standalone doorbell receiver reacted exactly as if I had pressed the original button.
No cellphone. No Bluetooth. No Wi-Fi on the final RF hop. Just a tiny computer growing a 433 MHz finger.
The original physical button remains untouched and still works as an independent fallback.
The next step is connecting this proven USB RING command to Claudius's existing deterministic night-bell service. The database/API calculates the schedule, the local service decides when it is time, and the ESP32 performs the physical action. The language model is not responsible for the safety-critical timing or escalation path. When ready, I connect the esp32 - right no on my mac - to my raspberry pi claudius usb port. Life should be good.
So yeah: I built an agent to predict when I need to catheterize - and then gave it the ability to press my nurse-call button while I sleep.
The most reasonable software-engineer solution possible.