Alexa Smart Home

Fundamentals

Alexa can control your devices through a Smart Home Skill. Alexa's Smart Home Skills allow device manufacturers to support a pre-defined set of voice commands via Alexa, and can be used by speakers, cameras, thermostats, light bulbs, and many other types of smart device.

Audiogum can help you deploy branded Alexa Smart Home Skills for any device that integrates Audiogum Remote Control.

Audiogum provides the following key parts of the Alexa Smart Home skill:

  • User authentication and authorization. This allows a user to log in and activate Smart Home capabilities.
  • Device management and discovery. This allows users to find their connected, compatible devices.
  • Remote control. This allows devices to maintain a permanent, open communication channel and receive commands issued by the user.
  • The skill 'adapter'. This is heart of the skill, it receives requests from Amazon's Alexa and sends the necessary remote command to the right device(s).

When a user activates your Smart Home Skill, they can use commands like, "Alexa, volume up in the living room" and your device volume will change. When the user says this kind of voice command, the following happens:

  1. Alexa understands the command, and makes a request to the Audiogum skill adapter
  2. The skill adapter locates the relevant device, ensures the user is authorized to control it, and passes a command to the Audiogum Remote Control system
  3. The Audiogum Remote Control system sends the command to the device, via the current, active remote control connection

Configure Your Skill

You can create a Smart Home Skill using Amazon's Skill Developer Console. Once signed in, click 'Add a New Skill' and set the following:

  • Skill Type: Smart Home Skill API
  • Name: Your brand name
  • Endpoint (Default): arn:aws:lambda:eu-west-1:487197290700:function:alexa-smart-home-eu-west-1
  • Authorization URL: https://api.audiogum.com/v1/authorize
  • Client Id: Your Audiogum Client ID
  • Domain List:
    • api.audiogum.com
    • gstatic.com
  • Scope: thirdparty-alexa
  • Authorization Grant Type: Auth Code Grant
  • Access Token URI: https://api.audiogum.com/v1/tokens
  • Client Secret: Your Audiogum Client secret
  • Privacy Policy URL: URL for your Privacy Policy

You'll also need a small icon (108x108 pixels, PNG) and large icon (512x512 pixels, PNG).

Register Your Device

If your device is already integrated with Audiogum Remote Control, you'll be familiar with how your device should securely create a remote control token (remotecontroltoken). You should ensure that your companion app can retrieve the current Audiogum remote control token from every device on the local network.

When your companion app finds a device on the local network that can be remotely controlled, the app should store the remote control token for the currently logged in user. This will allow the user to discover and control the device using Alexa. To store the remote control token, use PUT /v1/user/devices/{deviceid}:

PUT /v1/user/devices/c27a39fae3 HTTP/1.1
Host: api.audiogum.com
Authorization: Bearer {access_token}
Content-Type: application/json

{
  "deviceid":"c27a39fae3",
  "remotecontroltoken": "v1::dSxwOotdwTT3nCQ5MPx4mg==::FOHfjq1g5BE0byibonVtDYNTE38..."
}

Activate Your Skill

  1. From the Amazon Alexa app, open 'Skills' then 'Your Skills'.
  2. Search for your brand's skill by name, and enable the skill.
  3. Log-in. You should be presented with the Audiogum account login screen, branded accordingly.
  4. Finally, let the Alexa App discover new devices. You should see your all devices for which this user has a stored remotecontroltoken.

Use Your Skill

Try controlling your device, for example:

Alexa, volume up on Living Room

Alexa, skip forward on Living Room

Alexa, play on Living Room

Alexa, mute on Living Room

Alexa, unmute on Living Room

where 'Living Room' is the name of your device.

If Alexa has trouble finding the device, you may have a device name that Alexa cannot easily understand. Try a simple device name (e.g. Living Room, Kitchen, Green Speaker, etc). You can modify the device name (set an alias) in the Alexa app.