Get the status of a bathroom lock on your wrist so you know when it is toilet time.
This was developed and iterated to solve bathroom queue issues at Pebble HQ and was later evolved into a public example application for presentation at JSConf 2015.
This project is made up of three components: An Arduino firmware, a watchapp, and a NodeJs server.
The Arduino that pushes the status of a lock-attached switch to a NodeJS Pebble Timeline server. This server in turn pushes Timeline Pins to the "toilet-time" Topic. Watches with the watchapp installed subscribe to the "toilet-time" topic and get updates on the lock status.
- Arduino-compatible dev board.
- Arduino-compatible Ethernet Shield
- Switch of some kind
- NodeJS capable web server
- Pebble Time / Pebble Time Steel watches
- Pebble SDK installed
- Pebble Timeline API Key
-
Install server dependencies
cd timeline-server npm install
-
Start Server
API_KEY="YOUR_API_KEY" npm start
-
Adjust Arduino code to point at your server:
cd lock-status sed 's/__HOST__/YOUR-DOMAIN.com/g' -i lock-status.ino
-
Upload firmware to Arduino
arduino --upload lock-status.ino
-
Connect switch to +5v and Analog Input 2 on Arduino
-
Attach switch as such that it makes a circuit when door is locked
-
Build Watchapp
cd watch-client pebble build
-
Install Watchapp
pebble install
-
Enjoy watching your Timeline update when the lock status changes :D
Does hacking on stuff like this sound fun? Come join our team!