A project to open our flat's communal door using our phones, by connecting a Particle Photon IoT device to the existing intercom.
1. Working it Out
After a quick search we found the manufacturer and model of our intercom. It was an Entrotec ED4 handset, for which we found several system specifications and installation manuals.
Combining the manual with a good dig around with a multimeter we were able to work out what each line going into the handset was for, and how we could unlock the door.
The handset has to be called in order to unlock the door, but following that it's just a case of grounding the speaker, microphone, and door release lines. Without pretending to pick up the handset the central system does not respond to a signal on the door release line.
We also wanted to know when the handset has been called, so that we can send a push notification to the Android application. The BZ line usually sits at V0, but when the handset is being called the central system sends a 2.5V square wave to the handset, which is used for the dial tone, we listen out for this in the firmware.
- Notify a service when the handset has been called
- Unlock the door after a handset has been called
- "Prime" the system, so the firmware waits for the handset to be called before immediately unlocking the door (with a short time-out), removing the need to have your phone out at the door
3. Breaking things
Twice we blew the 200mA fuse in the central system downstairs, not quite sure how one of the times. The other I believe was when we tried to add in a voltage divider to read the DS line (door status), so we could log when the door was ever opened.
Putting the project in a tin also meant we had to get an antenna, surprisingly easy to sort out.Services
We used a few AWS services to enable push notifications to the Android application we're developing.
Lambda is used to convert a webhook POST request sent from the Particle platform into an SNS event.
The SNS topic has been configured to work with Google Cloud Messaging. We send a high-priority data message to all subscribed devices which is then handled by the application.Android Application
The Android application has has a few functions:
- Receiving a notification and unlocking the door
- Priming the door to open upon the handset being called
- Displaying call history from Firebase store
- Android wear app
The app was build using a few useful open source libraries such as: OkHttp3 Retrofit2, Dagger 2, RxAndroid, AutoValue, & DataBinding.
Future work includes improving the user interface & the widget.Hardware (Printed PCB)
After creating a working prototype we worked on producing a printed PCB version using solid state relays to reduce the side of the hardware enough to fit inside the handset.