Update July 20, 2017:
Thanks to tremendous support from this community, this alarm system integration project has evolved into a DIY kit project that we’re calling Konnected Security. Please see the latest Release Announcement here
The open-source source repo has also moved to konnected-io/konnected-security on Github
Original Post below:
The house I live in was built in the early 90s and came with a built-in home security system. I’m not interested in using the outdated alarm system panel, but I wanted to connect the contact sensors in my doors and the motion sensor in my house to SmartThings. I learned about the NodeMCU ESP8266, a small, cheap, programmable development board that has WiFi built in. I set out to connect my door and motion sensors to the NodeMCU and program it to update SmartThings every time a change is detected.
This was my first time using any sort of development board, and I have zero electrical engineering experience. I am, however, a software developer by profession, and lua programming looked familiar to me, so I was hopeful I could make it work. I’m also new to SmartThings, but have spent enough time here on these forums that I figured I could make things work. A few evenings of work later, and it works great!
I bought a NodeMCU board from Amazon for less than $10 and started playing with it: https://www.amazon.com/gp/product/B010O1G1ES
I basically opened up the alarm system panel in my house and identified the pairs of wires that went to each door and motion sensor, and redirected those to the NodeMCU board. Each sensor is connected to a GPIO pin on the board, and the software I wrote sets up a listener that makes an HTTP POST to the SmartThings API every time a change is detected on the sensor.
I’ve also written a SmartApp and two device handlers (one for a contact sensor and one for motion sensor) for SmartThings.
I’ve had it working for a few days now and it works just about perfectly! The response time is very quick (less than a second) to update the state of the sensor in the SmartThings app.
The code for the NodeMCU and Smarthings is here: https://github.com/heythisisnate/nodemcu-smartthings-sensors
If there’s interest, I’ll spend some time writing more documentation or how-to guide. Getting code running and debugging on the NodeMCU was tricky at first for a noob like me.
Some pictures: