Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

Posted on
Wed May 09, 2018 4:56 pm
FlyingDiver offline
Posts: 2611
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

Now has a new action for initiating a Twilio Studio Flow via the REST API. Requires a Flow SID (from your Twilio Portal) and a destination phone number.

All the heavy lifting for using this is done in Twilio Studio. I'll be writing up an example that does the following:

1. Makes a voice call to a given phone number. Plays a message via TTS.

2. Waits for a DTMF tone (number input).

3. Makes an HTTPS request back to Indigo via my HTTPd plugin. The number entered on the phone is included in the HTTPS request, which is saved to a variable.

Indigo can trigger on changes to that variable to do whatever you want.

For security purposes, a random authentication code (16 digit alphanumeric) is generated by the plugin and sent as part of the request to Twilio. It's also stored in a state for the Twilio device.

The example Flow includes that auth code with the http request back to Indigo. The triggered Indigo script should compare the auth code in the httpd_ variable against the last_auth state in the device to verify that the request is legitimate. I have not yet implemented this in my testing.

You will need the current pre-release Twilio plugin: https://github.com/FlyingDiver/Indigo-Twilio/releases
And the pre-release HTTPd plugin: https://github.com/FlyingDiver/Indigo-HTTPd/releases

The HTTPd plugin was updated because Twilio does not send the Basic Authentication header unless it gets a 401 reply from an initial request without the header.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Wed May 09, 2018 5:10 pm
Colorado4Wheeler offline
User avatar
Posts: 2747
Joined: Jul 20, 2009
Location: Colorado

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

That's super cool, I may have to install this plugin just to play with this!

My Modest Contributions to Indigo:

HomeKit Bridge | Device Extensions | Security Manager | LCD Creator | Room-O-Matic | Smart Dimmer | Scene Toggle | Powermiser | Homebridge Buddy

Check Them Out Here

Posted on
Wed May 09, 2018 7:31 pm
FlyingDiver offline
Posts: 2611
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

First cut at the instructions for setting this all up are at https://github.com/FlyingDiver/Indigo-T ... o-Flow-API

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Posted on
Mon Jun 04, 2018 8:19 am
whmoorejr offline
User avatar
Posts: 223
Joined: Jan 15, 2013
Location: Houston, TX

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

I'm already having a lot of fun with this. Many thanks for piecing this together.

Posted on
Mon Jun 04, 2018 8:30 am
FlyingDiver offline
Posts: 2611
Joined: Jun 07, 2014
Location: Southwest Florida, USA

Re: Release 7.2.0, Beta 1 - Support for Twilio Studio Flows

I've marked the updated HTTPd plugin as released. That was a pretty minor change.

I'm going to look at the Twilio plugin again this week and see if anything else needs to be added.

joe (aka FlyingDiver)
my plugins: http://forums.indigodomo.com/viewforum.php?f=177

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 0 guests