User Tools

Site Tools


Sidebar

supported_hardware:alexa

Amazon Alexa Bridge

With the Alexa Bridge you can control any of your XTension units via voice control through any compatible Amazon Alexa or Echo device. Since this works by pretending to be a phillips hue hub, the Alexa can control your units even without a working internet or cloud connection.

The direct Alexa interface limited to turning things on and off and setting a brightness for them. Each plugin instance is limited to sharing 20 units and/or scripts. If you wish to share more than that number of units create another interface instance and set it up with the remaining units.

The original Bridge was written by Dean Davis of Afterten Software. If you haven’t also checked out his WeatherMan app you should do so. We have a tutorial for getting all your local weather data and forecasts into XTension from that app.

As of XTension version 9.4.12 the Hue Bridge Plugin is included with the main XTension distribution so no other installation is needed.

XTension Setup

Create a new List in XTension and drag up to 20 units into it to be shared.

In the Interface list window click the New interface button and select “Alexa Hue Bridge” from the Device popup. In the server settings enter a unique port number that isn’t in use by any other server process on the server. If you create multiple instances to share more than 20 units they must each have a unique port number.

To setup which devices will be available to the Alexa either leave the default selection of Share Everything, which probably isn’t a good idea unless you only have 3 things in your database, or change to the Limit to selected Objects selection. Then click the Sharing Selection button. From that window you can choose the lists of units and scripts that you wish to share.

Once you’ve selected some items to share and saved the interface, or clicked “Apply,” the shared lists will show an icon in their toolbar that lets you know that they are being shared. The toolbar item will bring up a menu that shows all the interfaces that are sharing that list. If you select the item in the list it will open the edit interface dialog for that interface.

Sharing Scripts

If you choose to share scripts then you can run them by telling Alexa “turn on ’name of the script’” and XTension will run the global script. If you create a handler in the global script called “commandOn” then that will be called as well. If you create a handler called “commandOff” then that will be called when you ask Alexa to turn off the named script. If you do not create the commandOff handler then no action is taken if you try to turn off a script. At this moment there is no way to tell a script to dim to a specific level, only turn on and off.

Setting up Alexa

Once the interface is running and you have selected some items to share getting them into Alexa is easy. From your actual Alexa device you can simple ask her to “find new devices” or from the mobile app click the menu icon and then select “smart home” from the resultant menu. The first selection is to “find new devices” which will do a search that takes about 20 seconds and then all the shared devices should appear. Note that the Alexa and XTension need to be on the same network subnet in order for the discovery process to work. If you have multiple wifi routers and they are not setup properly then they might not be able to find each other.

Once the shared units are listed there you can edit them to change their name if you wish to call them by some more easily remembered name. This will not change the name of the Units or Global Scripts in XTension.

Now you can make voice commands to control devices.

  • Alexa, turn on “unit name“
  • Alexa, turn off “unit name”
  • Alexa, brighten “unit name” to 50%
  • Alexa, turn on “name of shared Global Script“

Notes

If you are using an echo plus that has a built in ZigBee hub those devices will not be available to XTension. You can control them via the built in Alexa voice commands of course, but this plugin will not let you control them from XTension. If you wish those ZigBee devices to be controllable both from XTension and Alexa you’ll need a real phillips hue hub, or a Vera or other device to add them to that we support and then share them to Alexa through the bridge.

It is not necessary to disable and re-enable the interface when making changes to what is shared. Simply remove a unit from a shared list and it will disappear from the bridge. You will still have to go into the Alexa app and remove it from your home automation devices tap or Alexa will simply think it’s offline for the moment.

There should be no confusion with making changes to the list of shared objects between XTension and Alexa. If you add or remove a shared object it will not be necessary to remove the entire list of them and re-add them to Alexa. If you’re adding new devices you will need to go back into the home automation setup in Alexa and ask her to discover new devices.

supported_hardware/alexa.txt · Last modified: 2018/10/02 11:02 by James Sentman