Just some updates on what I've been up to!
I've been bored at home lately, so now my door unlocks itself based on Bluetooth proximity.
There are 4 separate services, all tied together by MQTT.
Service 1 : Simply polls for my phone using bluetooth, and publishes a simple "YES" or "NO" on a channel in MQTT. It's the only thing with credentials to that topic.
Service 2 : Simple MQTT to Arduino service. Listens specifically for a state to transition to "LOCK" or "UNLOCK", also listens for servo values for manual adjustment. Sending "LOCK"/"UNLOCK" sets the servo to a predefined position. The service communicates to the Arduino over serial. (Yes, I could just get an enet shield to do this... but no ethernet near the door.)
Service 3 : Rule manager. Listens to the phone state, as well as a few other things (time of day, day of week, prior decisions) to determine when to send "LOCK" or "UNLOCK". He's the only thing with credentials to send on that topic.
Service 4 : GCM Notifier -> Simply lets me know when a state change happens. Listens on the same topic as the second service, but issues a GCM message to my phone to let me know.