Internet-Enabled Doorbell
August 14, 2009
Seen on Cory McWilliams’s blog. <3!!!
I wanted to play with electronics and home automation. This is what I came up with.
The following sequence of events is not just a dramatization. It happened yesterday.
- The UPS delivery guy delivers a package and pushes my doorbell button.
- The button rings my doorbell and switches a relay.
- The relay drives a pin high on the GBA port on the Nintendo DS.
- A homebrew app runs on the DS which reads from EEPROM every frame, effectively polling the relay state.
- The DS connects to my wireless access point, sends an HTTP request to my server, and then goes offline again.
- The HTTP request executes a CGI script which connects to a chat server I’ve been working on, sends a message, and then disconnects.
- The chat server stores the message and sends it to any connected clients.
- One of the clients, which was the result of an AJAX request, returns the new message to a web browser.
- Cory, in his web browser, is notified that a package has arrived.