[RELEASE] Using Twilio to Send SMS

twilio
sms

#49

i will replace SW-1 with a switch i created to be activated when ST is armed and in alarm state. that is why i put the “and”


#50

Using this piston the logs show me opening a door…turning on sw1 but when both should have written when i turn on sw1…


#51

Your Trigger pistion is calling a master piston called ‘Master Alarms to SMS’:

image

But your master piston is called ‘Master Alarms to SMS xxxdd’
image

In addition to the above, turn off event subscription to sw1, that’s not the desired trigger, motion or contact should be the only lines showing the orange lightning bolts.


#52

switch 4 will be a on if my ST system is in alarm… also how do i turn off event subsciption


#53

tried red and green snapshot and both had all my codes, so i duplicated master sms piston… xxxd the values and changed the name so i could save it…then i took snapshot


#54

red and green snapshot both have all my infor


#55

turn off subscription by clicking on the trigger (sw1 switch is on), then the cog symbol in the pop-up, then you will see the subscription options. Change to ‘Never’.


#56

btw… I find that after saving a piston, it is sometimes necessary to toggle switches on/off/on so webCoRE can learn the current state.

Can you see the master piston being triggered by the trigger piston?


#57

i’ll test again
motion sensor now showing in log when i activate it… my mistake…still no text thoughsub%20off


#58


toggled switch…no longer shows in log…still no alarm


#59

Are those logs set to ‘full’?


#60

minimal…here is the most of the full log showing motion active


#61

So that all looks good.

If you look at the logs of the master piston, does anything happen at the same time?

Send it to me on PM if it shows anything confidential in the logs


#62

master%20log%20only%20error this is the only thing that shows may be error the rest look good…i can try to pm you…


#63

Thanks Robin for all the help…everything is working fine now


#64

Big update… this no longer requires Google and we can reply to an SMS with a command!!!

Example Piston:

SMS Screenshot:

Instructions:

  • If not already done, setup a Twilio account as detailed in post 1
  • Change ‘To’ to your mobile number, (+1 format for US)
  • Change ‘From’ to you purchased Twilio Number (do not use an alphanumeric sender ID if you are planning to use the reply feature)
  • Change ‘AccoutSID’ - Get this from Twilio Dashboard
  • Change ‘Auth’ as follows:
    • Format - ‘{AccountSID}:{AuthToken}’
    • Needs to be converted to Base64 using https://www.base64encode.org/, then add the word ‘basic’ at the start of the encoded string. i.e. ‘basic xxxxxxxxxxxxxxxxxxxxxxxxxxx==’
  • POST request anonymized in the piston snapshot above should be https://api.twilio.com/2010-04-01/Accounts/{AccountSID}/Messages.json
  • In Twilio, go to your phone number (https://www.twilio.com/console/phone-numbers/incoming) and change the ‘Message comes in Webhook’ to your pistons external URL.

#65

Does one require a twillio number for each piston?


#66

Nope… same number can be used across all pistons.


#67

I had it working with google pages,that quit, now i am trying the newer method…I can’t get this to work… here is the error i get
Error executing external web request: groovyx.net.http.HttpResponseException: Not Found


#68

Have got it worked with SmartThings webCoRE, Twilio and Pipedream integration for calls. So if SmartThings motion sensor detects motion or window/door sensors opens while security in Armed Mode on SmarthThings Home Monitor, it makes a call with a voice message to mobile via Twilio API.

You can set the Twilio SMS option on Pipedream if you like to receive text instead of call.