Using IFTTT to call Alexa to call Maker to call Axial via API- SOLVED

  • 483 Views
  • Last Post 06 January 2017
evldave posted this 05 January 2017

OK...fun complicated thing here...  While we don't yet have native integration with Alexa (have to use the plugin), I am thinking there may be another way to get this to work.  I am having an issue with IFTTT though.

 

Here's what I have now:

I have an IFTTT Applet that integrates with Alexa and works fine.  I say 'Alexa trigger 8675309' and it automatically sends me an email 'TEST' - so I know that works.

I can make a json API call to my Axial server via Postman to activate a scene.  I am using instructions here:

http://docs.incontrolha.com/home/activate-scene-by-name

I can activate scene 'Living Room 30' via the voice command 'Alexa tell InControl activate scene living room 30' - with no problems using the Alexa-Axial plugin.

 

Here's where I am struggling

I created a IFTTT Maker channel that is supposed to allow PUT commands.  I used the exact same parameters that I use in Postman to active scene 'Living Room 30'

I cannot get the Maker applet to activate!  I think this would be the easiest/fastest way to integrate Alexa easier than 'Activate scene' - just say 'Alexa trigger living room 30' and have it work, but I'm unable to get the Maker channel to trigger the API call.

 

Any ideas on the forums here?  I'm trying to find ideas on reddit, maker forums, etc , but maybe someone here has a magical solution :)

evldave posted this 06 January 2017

OK, took me some time to figure this out, but here is how you can use IFTTT with your Alexa and Axial Control

 

Step 1 - set up an IFTTT account

Step 2 - Add the Alexa Service and the Maker service in IFTTT

Step 3 - Set up a static website address for your ISP's IP address they assign to you.  I used DynDNS.  This will allow the Maker IFTTT Service to know where to make the call to Axial Control (using the API).  If you just use the IP address from 'What's my IP' it will change eventually and break your Applet in IFTTT.  Many routers will 'link' to DynDNS and automagically update your static weblink to reflect whatever your ISP assigns you.

Step 3.5 - Open up port 1178 on your router

Step 4 - Assuming you haven't made any configuration changes to Axial Control on your server, create a new IFTTT Applet.  Start by adding Alexa's 'Say a specific phrase' Trigger.  Whatever trigger you use will follow 'Alexa trigger' in your voice command.

Step 5 - For your THAT portion of IFTTT, your action server should be Maker.  Select 'Make a web request' and you will have 4 fields to fill out.

URL - "http://<<mynewdnsaddress.dyndns.org>>:1178/zwave/activateScene" - where <<mynewdnsaddress.dyndns.ord>> is replaced with whatever you signed up for with Dyndns as your static web address

Method - PUT

Content Type - application/json

Body - "{ "password": "", "sceneName": "<<scenename>>", "activate": 1 }" - where you replace <<scenename>> with the specific name of the scene in Axial Control.  If you have enabled a password in the software under Tools-Options-Server, the put your password in the blank "" after "password" (hopefully that makes sense).

Create your actions and you are done!  At this point you should be able to just say 'Alexa trigger NAME' and it will take a few seconds and your scene will activate.

A few benefits to this:

You don't have to rename any of your scenes in Axial to make them more 'voice friendly'

You can use any manner of voice command to initiate a scene.  My favorate command is 'Alexa trigger 8675309' :)

 

A few drawbacks

You have to have a static IP address from your ISP or use a DNS server

It takes a few seconds longer to actually change the scene than using the plugin

You are moving 'outside' your home network for most of the processing/commands, which does pose some security risks

 

A few more items...

Since you are using the Maker action command, you can use ANY IFTTT trigger to initiate a scene.  This means you can easily use text messaging, emails, time of day, etc.  You can even have the system blink lights throughout the house if you get a phone call, you can authorize friends to unlock the front door via text, just about anything you want!  Any IFTTT trigger works, but there will be a few seconds delay in going through the Maker-IFTTT-Axial process.

 

Have fun!

 

 

Close