# Doorbell-to-SMS

**URL:** <https://community.particle.io/t/doorbell-to-sms/3349>\
**Category:** Project Share\
**Created:** [March 10, 2014, 8:19pm UTC](https://community.particle.io/t/doorbell-to-sms/3349 "2014-03-10T20:19:29Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![wgbartley](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/wgbartley/32/1910_2.png) [@wgbartley](https://community.particle.io/u/wgbartley)\
**Post date:** [March 10, 2014, 8:19pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/1 "2014-03-10T20:19:30Z")

</div>

Last week, my boss asked me if there was an easy way to make a doorbell that sends a text message when it is pressed. Of course! All you need is a :spark: and a button (and a web server and SMS-messaging service). After about 2 hours of work (mostly debugging why Apache didn’t like my HTTP requests), I had a fully-functioning prototype!

[Source code is here](https://gist.github.com/wgbartley/9473249). Setup and instructions are in the comments at the top.

![](https://sea2.discourse-cdn.com/flex026/uploads/particle/866/ed5aff7c0b4a806c.JPG)

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 10, 2014, 8:20pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/2 "2014-03-10T20:20:56Z")

</div>

I’m interested to see how you got the SMS function up and running.

Thanks for Sharing 😄

---

<div class="post-metadata">

**Author:** ![wgbartley](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/wgbartley/32/1910_2.png) [@wgbartley](https://community.particle.io/u/wgbartley)\
**Post date:** [March 10, 2014, 8:25pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/3 "2014-03-10T20:25:02Z")

</div>

> [@RWB](#):
>
> I'm interested to see how you got the SMS function up and running.

\< plug \> I used the API for [smartCommunicator](http://www.smartcommunicator.net/) to send the SMS messages. I'm the lead developer on the project and wrote the API that I consumed with the :spark:+PHP script. \</ plug \>

However, I know there are several other SMS providers that you could use. [Twilio](http://www.twilio.com) is the first that comes to mind.

---

<div class="post-metadata">

**Author:** ![Raldus](https://avatars.discourse-cdn.com/v4/letter/r/9d8465/32.png) [@Raldus](https://community.particle.io/u/Raldus)\
**Post date:** [March 10, 2014, 9:03pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/4 "2014-03-10T21:03:17Z")

</div>

If you don’t need SMS, there are some smartphone notification apps that can be used. However, doing it securely (e.g., SSL) requires an intermediary such as a PC, mac, or linux box (the spark doesn’t do SSL).

---

<div class="post-metadata">

**Author:** ![hansamann](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/hansamann/32/20715_2.png) [@hansamann](https://community.particle.io/u/hansamann)\
**Post date:** [March 10, 2014, 9:09pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/5 "2014-03-10T21:09:12Z")

</div>

For calling, conference calls, voice transcription, SMS (in/out), Twilio is an API you should also check out.

Once events/publish/callbacks are supported by spark, it should be trivial to wire up your own API hit by the spark cloud to twilio for example. With that you could not only trigger an SMS, you could call someone and ask if the door should be opened - a simple voice system is very easy to do with the twilio ML.

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 13, 2014, 3:49am UTC](https://community.particle.io/t/doorbell-to-sms/3349/6 "2014-03-13T03:49:41Z")

</div>

@wgbartley @hansamann Twilio looks pretty fully featured and capable of helping the Spark Core do many other really cool things. The SMS pricing is really cheap also so no fuss there form me.

So for now you guys are saying that it will be really easy for a beginner to get spark cloud and Twilio working together once the Events/Publish/Callbacks are up and working with the Spark Cloud? Or can this still be easily done today?

@Dave When do you expect the Events/Publish/Callbacks feature to be released?

I just want to easily be able to setup SMS text messages based on events triggered by sensors or software on the Spark Core which is connected to the internet. I see others doing this now but nothing that looks easy for a beginner like me to implement, or maybe just not clear enough instructions for me to follow to make the harder to use ways work.

The easier we make this to use the more people will end up using the Spark Core to do it.

---

<div class="post-metadata">

**Author:** ![wgbartley](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/wgbartley/32/1910_2.png) [@wgbartley](https://community.particle.io/u/wgbartley)\
**Post date:** [March 13, 2014, 3:59am UTC](https://community.particle.io/t/doorbell-to-sms/3349/7 "2014-03-13T03:59:26Z")

</div>

I think the webhooks are designed for that sort of thing with Twilio and similar services. The events/publish feature [is now available](http://blog.spark.io/2014/03/11/spark-publish/) using [Spark.publish()](http://docs.spark.io/#/firmware/data-and-control-spark-publish). You could also use e-mail to send yourself text messages by using an e-mail address like [5556671234@vzw.com](mailto:5556671234@vzw.com) (or whatever your cellular provider uses). For now, it wouldn’t be super easy to integrate directly with Twilio, or even e-mail, without a script in the middle (in my case, a PHP script hosted on a web server). When the webhooks are available, I’ll see what I can come up with as far as integrating with Twilio at the very least!

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [March 13, 2014, 4:00am UTC](https://community.particle.io/t/doorbell-to-sms/3349/8 "2014-03-13T04:00:21Z")

</div>

Hi @RWB,

My hope hope was to release it this sprint (which ends at the end of March), or sooner. A lot of my time is tied up in prep for this next round of manufacturing, so I can’t say for sure yet, sorry! We have this feature working in testing / staging, so hopefully sooner rather than later. 🙂

Thanks,  
David

---

<div class="post-metadata">

**Author:** ![RWB](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/rwb/32/22599_2.png) [@RWB](https://community.particle.io/u/RWB)\
**Post date:** [March 13, 2014, 4:18am UTC](https://community.particle.io/t/doorbell-to-sms/3349/9 "2014-03-13T04:18:08Z")

</div>

@wgbartley Yea your right, I have Verizon so I could send email to get a text on my phone. Looking forward to what you come up with.

@Dave Sounds like there will be quite a few new great features included in the next update.

---

<div class="post-metadata">

**Author:** ![avidan](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/avidan/32/84_2.png) [@avidan](https://community.particle.io/u/avidan)\
**Post date:** [March 13, 2014, 5:55am UTC](https://community.particle.io/t/doorbell-to-sms/3349/10 "2014-03-13T05:55:07Z")

</div>

i have used twilio with the spark core (halloween costume and my door lock)…but i just used twilio for inbound SMS, which was super easy, since you can hit a webservice when you receive an SMS via your twilio number. im interested in seeing a legit library!

---

<div class="post-metadata">

**Author:** ![kareem613](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kareem613/32/1931_2.png) [@kareem613](https://community.particle.io/u/kareem613)\
**Post date:** [March 14, 2014, 12:06am UTC](https://community.particle.io/t/doorbell-to-sms/3349/11 "2014-03-14T00:06:21Z")

</div>

I’ve got this on my to-do list for my spark tools web service. [http://sccb.azurewebsites.net](http://sccb.azurewebsites.net)

I was thinking of firing alerts based on data reaching thresholds. Ex. Text me when temp drops below x.

Once the publish callbacks are released it should be pretty straight forward to alerts based on those as well.

---

<div class="post-metadata">

**Author:** ![Narom](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/narom/32/20918_2.png) [@Narom](https://community.particle.io/u/Narom)\
**Post date:** [March 16, 2014, 6:10pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/12 "2014-03-16T18:10:30Z")

</div>

Twilio are excellent. I get free usage with my ninja block, the service hasn’t failed me once. No delay either

---

<div class="post-metadata">

**Author:** ![w9ll](https://avatars.discourse-cdn.com/v4/letter/w/eb9ed0/32.png) [@w9ll](https://community.particle.io/u/w9ll)\
**Post date:** [April 28, 2014, 9:24pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/13 "2014-04-28T21:24:35Z")

</div>

Perhaps you could use pushover or zapier, combined with IFFFT.

To increase functionality you could set up a tiny camera that would take a picture of whoever rang the bell. Really only useful if you added an ‘away’ mode… IFFFT has geographic trigger capabilities.

Exciting project! Gets me thinking about what other arcane home devices are in need of an update…smoke detectors?

---

<div class="post-metadata">

**Author:** ![LeoGetz](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@LeoGetz](https://community.particle.io/u/LeoGetz)\
**Post date:** [August 9, 2014, 12:17pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/14 "2014-08-09T12:17:04Z")

</div>

great stuff! Got the PIR working with Spark.publish but how to go next? I.e. how can I alert via EMAIL or SMS without the need to write php or add a middle layer etc.

@kareem613 - I really like your cloud implementation [http://sccb.azurewebsites.net/](http://sccb.azurewebsites.net/) and already registered a couple of devices there for graphs and schedules, fully configured in only a few minutes, amazing! One question though; any plans to implement alerts based on incoming events? current alerts are based on 5 minutes schedules, which is not suitable for my project (my car would be long gone 😉

thx,

Leo

---

<div class="post-metadata">

**Author:** ![damccull](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/damccull/32/20705_2.png) [@damccull](https://community.particle.io/u/damccull)\
**Post date:** [August 9, 2014, 11:11pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/15 "2014-08-09T23:11:42Z")

</div>

I got mine sending SMS by having the spark publish an event, and setting up an Azure WebJob on Microsoft’s azure platform. The job is a simple console program that listens for the event and then uses Amazon’s SNS api to send a text.

---

<div class="post-metadata">

**Author:** ![kareem613](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/kareem613/32/1931_2.png) [@kareem613](https://community.particle.io/u/kareem613)\
**Post date:** [August 16, 2014, 2:54am UTC](https://community.particle.io/t/doorbell-to-sms/3349/16 "2014-08-16T02:54:08Z")

</div>

Totally in the plan! Think that’s the next main priority.  
Publish to events and triggering functions from alerts.  
That adds up to publishing from one device can trigger activity on another.

---

<div class="post-metadata">

**Author:** ![LeoGetz](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@LeoGetz](https://community.particle.io/u/LeoGetz)\
**Post date:** [August 16, 2014, 8:04am UTC](https://community.particle.io/t/doorbell-to-sms/3349/17 "2014-08-16T08:04:00Z")

</div>

> [@damccull](#):
>
> Azure WebJob

Thanks, I will take a look. for now I have solved it by creating a tcp server and connect to [api.pushingbox.com](http://api.pushingbox.com)

( GET /pushingbox?devid=)

and created a scenario in **pushingbox** that connects to **HOIIO** (which allows to dial up and send texts through GET calls) and simultaneously connects to **FAAST** (an IOS app for notifications) It works flawlessly!

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [August 19, 2014, 5:58pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/18 "2014-08-19T17:58:40Z")

</div>

Just a heads up that we will be releasing webhooks / callback support, just need to get some time to finish / release it. 🙂 Which will simplify this greatly.

Thanks!  
David

---

<div class="post-metadata">

**Author:** ![LeoGetz](https://avatars.discourse-cdn.com/v4/letter/l/ba9def/32.png) [@LeoGetz](https://community.particle.io/u/LeoGetz)\
**Post date:** [August 20, 2014, 1:28pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/19 "2014-08-20T13:28:23Z")

</div>

Thanks Dave, sounds promising! any rough ETA to share? (or beta available?) Will it enable alerts when cores switching offline? something I am struggling with at the moment.

---

<div class="post-metadata">

**Author:** ![Dave](https://sea2.discourse-cdn.com/flex026/user_avatar/community.particle.io/dave/32/181_2.png) [@Dave](https://community.particle.io/u/Dave)\
**Post date:** [August 20, 2014, 7:26pm UTC](https://community.particle.io/t/doorbell-to-sms/3349/20 "2014-08-20T19:26:35Z")

</div>

Hi @LeoGetz,

I’m running a beta, and am happy to add people to it in the meantime. Just email me at [david@spark.io](mailto:david@spark.io) from the email account you registered with, and I’ll get ya going. I’m hoping to finish this feature in the next few weeks, but we’ve been focusing on getting through hiring first. 🙂

Thanks,  
David

[Next page](https://community.particle.io/t/doorbell-to-sms/3349.md?page=2)
