Twilio.com API Interface Plugin

Okay figured out the problem. I was trying to send calls to an unverified phone number. Under the trial account you can only send to a single verified number. All I did was change the number and BOOM… started working. Great plugin!!

Seeing some traffic here I’d just like to give some input. I’ve been using it since day one and it’s bee working flawlessly. If I want to remind a coworker of something in the morning but don’t trust myself to remember… If I hear a friend talking during the day that he/she wants do do but always forgets in the evening… If I’m up too late on a week night I get an angry phone call. It works without fail.

Glad to hear you are putting the plugin to good use.

I’d be curious as to what the setup/applications people are using this with, what kind of triggers they have created, and what they tell/remind/say to you.

Personally, I have my DSC alarm being auto armed at night (I know the system will do it, but I wanted to play with interfacing my Vera to it), and if it does arm, both my wife and I get text notifications saying the system is armed in Stay mode, and to disarm before opening any doors/trigger points. It also does periodic checks throughout the night, so if one of us does disarm the system, and forgets to re-arm it, the system will take care of it for us. It will only arm in away mode if the system is in a disarmed and ready state.

i just set up your plugin, and it worked out of the box …
so i decided to sign up and buy a US Based Number …
released the trial number, change the plugin to use the new number … and it stop working :frowning:

any idea ?

or does Twilio just take time to change the numbers ?

never mind, its not a plugin issue … the number i bought failed SMS Support …
odd it works with the trial just fine :frowning:

Try a US number

works with any != mine number … VERY anoying …

Twilio seems to have a routing issue with my GSM Provider. i send them a ticket already …
plugin works great (trialing now with another number)

Worked first time for me with a UK +44 number. Thanks ;D

@Solivas
Have you thought about a custom icon for the device?

It’s still plugging away beautifully for me!

@S-F,
Right now, I only have the Twilio icon being used. Maybe later I might come up with something else.

(The .zip file in the first post has the three files that you need to use to get the icon to show up).

I have also submitted the updated files to the apps store, but like it has been mentioned elsewhere here, the plugins are approved by someone in France, and that isn’t going to happen until after the summer vacation has happened there.

[quote=“SOlivas, post:30, topic:175988”]@S-F,
Right now, I only have the Twilio icon being used. Maybe later I might come up with something else.

(The .zip file in the first post has the three files that you need to use to get the icon to show up).

I have also submitted the updated files to the apps store, but like it has been mentioned elsewhere here, the plugins are approved by someone in France, and that isn’t going to happen until after the summer vacation has happened there.[/quote]

Got it. Thanks. I hadn’t looked back through the thread so I missed that. It’s all working just fine now. I really see no need to make any more changes.

Thanks!

a “send test SMS” field would be nice in device options :wink:

I haven’t started playing with javascript yet in the plugins, which would be needed to implement this.

I’ve got some ideas for a few new plugins that I’m working though, which may or may not pan out, so it might be a bit before I try something like this.

In the meantime, you can always use the test luup code section and use this:

luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "SendSMSMessage",{ PhoneNumber= "555-555-1212", Message="Greetings from your Vera Home Automation System"}, plugin_id)

Replacing plugin_id with your plugin’s device number.

I know, it isn’t pretty and you have to play with code, but it does work. :slight_smile:

I use a single scene to send SMS via Twilio for various triggers. Running the scene sends a test SMS.

Main scene Lua

if strSMS == nil then strSMS = "Vera: SMS Test." end local dtT = os.date("*t") strSMS = strSMS .. string.format(" Sent at %02d:%02d on %02d/%02d/%04d",dtT.hour,dtT.min,dtT.day,dtT.month,dtT.year) luup.call_action("urn:twilioapi-org:serviceId:TwilioInterface1", "SendSMSMessage",{ PhoneNumber= "+44xxxxxxxxxx", Message=strSMS}, 115) strSMS = nil

Trigger Lua

strSMS = "Vera: Alarm Tripped!" return true

i’ve done almost the same … but much less advanced (just have the code directly in the trigger lua) :wink:

well i still having trouble with actually recieving the SMS … they are horrible slow … or dont arrive at all.

some routing error to Thailand … but the tech support is working on it … :wink:
the plugin works perfectly.

thx for the logo, looks nice now…

Hello SOlivas

Thank you for this useful plugin. I have registered an account with Twilio, entered the data in the plugin and … works as defined. Great.
I am using this interface to fire off some text messages for specific events by putting your code in the Lua tab of a scene which is run at the end of a ‘monitoring’ sequence.
Since this is ‘hard-coded’ and scenes cannot be easily deactivated I find it helpful (and hopefully you and others too) if your Twilio interface would have on/off or unmute/mute buttons in order to disable the sending of messages while eg. developing and testing some scenarios.
Furthermore I’d like to see a log entry when the Twilio API sends a message - maybe with a flag in case the interface was ‘muted’.

Thank you.
MJ

its build in (just add this to your code)

luup.log("Sending SMS: blah blah ")

[quote=“nullx8, post:38, topic:175988”]its build in (just add this to your code)

luup.log("Sending SMS: blah blah ") [/quote]

Thank you nullx8 for this info. This is good to know for the future.
Though this looks like a logging mechanism built into the Lua engine which requires me to ‘code’ the whole message strings twice and add the phone number to the ‘log string’. While a nice workaround I’d rather have Twilio do the text handling and call this function - especially when we want ‘muted’ messages to be flagged (in case SOlivas finds an interest in my suggestion).

MJ

just put the text in a variable

i just set up a Scene with the complete luup code for everything but without a text
the triggers then have simply set the message to send … so you have only one place to put dynamic texts.

in my case its even more advanced since i use serval ways of sending things (like HomeWave Push Messages to my iPhone, Twilio SMS to my Wife Phone, and some test-exeption where also my iPad gets a push and my phone gets a call too :wink:

Edit: RexBeckett postet something very useful already … doing the same thing) here: http://forum.micasaverde.com/index.php/topic,15499.msg123429.html#msg123429