alexa-skills-kitalexa-smart-home-skill

Alexa Discovery Skill - Return Connected Devices


I am working on a Smart Home Alexa Skill and corresponding Lambda function. There are many demos and they all seem to return canned text. Is there a way through Lambda/JS to get a list of connected devices for a users account?

Samples like this:

const USER_DEVICES = [
{
    // This id needs to be unique across all devices discovered for a given manufacturer
    applianceId: 'unique-id-for-non-dimmable-bulb-specific-to-user1',
 },{},{},...]

I would love to implement code that was more like this:

const USER_DEVICES = Some.Alexa.Function.GetConnectedDevices()

Thanks!


Solution

  • Have you checked out the smart home skill API yet? It'll let you interact with connected devices and get data back about them: https://developer.amazon.com/docs/smarthome/understand-the-smart-home-skill-api.html