newuser-52504b4f-777b-473e-a1cd-a04486128616 avatar image

How to implement Smart Home Skills API ?

I'm able to setup CustomSkills without any problems but I'm not able to understand how to start setting up a Smart Home Skills.

I have gone through github of alexa and found a starter code(Build a Working Smart Home Skill in 15 Minutes) and after loading it into lambda it sets up virtual devices which I'm able to test from Alexa Developer Console. But I have no idea how to configure it for my cases. I want one or two good examples(python if possible but others will also work) , tutorials or any repo which have implemented the Home Skills.

I feel like that this is silly but its just that I'm not able to find a good sources for understanding Home Skills. And the document is very heavy for me.

Thanks in Advance.

alexa skills kitalexa smart homealexa skills
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Gaetano@Amazon avatar image
Gaetano@Amazon answered

Hello and thanks for posting.

At high level, I can simplify the explanation of the Smart Home API as follows.

Mandatory requirements:

1) You must implement account linking and use a lambda function as the skill's endpoint.

Discovery process:

You need to have a public cloud, or a resource from which your lambda function can retrieve the discovery response to send back to Alexa based on the account that have been previously linked.

This discovery response contains the information about the devices, and their capabilities (also called interfaces). A list of all the interfaces you can add to a device can be found here.

The request that your lambda receives at this stage can be found here, and an example of response you should send back can be found here.

Interacting with a device:
When the users say "Alexa turn on <device>" your lambda receives a TurnOn directive, for which you can find an example here.

Your lambda will have a handler for this kind of requests, from which will tell your public cloud to turn on that particular device, and then send a TurnOn response event.

This example only covers a TurnOn directive on a device with the Alexa.PowerController interface. The implementation may vary based on the interfaces that your devices have, but you will find request/response examples for all of them in the documentation.

You can find more information about the Smart Home skill API here:

Hope that helps!


10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Howard Honig avatar image
Howard Honig answered

You people at amazon keep answering the same question with an answer that isn't even asked. Account linking answer doesn't answer the question. Account linking, based on the web page the above "answer", appears to be all about authorization. How does the iot device know the right url to send a discovery request? How does the lambda function know what the url is to respond to the iot device.

Google has something called the local smart home, which bypasses lambda servers. Does alexa have anything like that?

1 comment
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.


The IOT device does not need to send a discovery request.

Since the discovering mechanism starts from a user or from the Alexa App, the lambda function needs to be prepared to accept a Discover JSON.

From that moment, the responsibility of contacting the IOT device and responding with a Discover.Response JSON is handed over to your skill.

At the this stage your device cloud can contact the IOT device in any way you want, as long as the skill's lambda function receives the expected Discover.Response JSON.

Let me know if you need anything else.


0 Likes 0 ·