question

newuser-4fbfca3b-810f-4d40-9acd-3b5fba995c38 avatar image
newuser-4fbfca3b-810f-4d40-9acd-3b5fba995c38 asked ·

How to connect and control an Amazon Smart Plug from a Custom Skill?

Hello! I just began my journey on Alexa Skills development. Im trying to create a custom skill to turn on and off a smart plug based on information coming from an external API , I found examples about gathering and exporting information to an API from Alexa, but I couldn not find information about how to connect to the smart plug.

My specific question is, how does the discovery function works? , how should I describe the endpoints to connect to my Smart Plug? Do the Amazon Smart Plugs have specific IDs or how does Alexa knows that is communicating with a Specific Smart Plug, does this happen on the discovery function?

Thanks in advance!

smart homealexa skill kitcustom interfaces
10 |2000 characters needed characters left characters exceeded

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

1 Answer

Andy Whitworth avatar image
Andy Whitworth answered ·

Custom skills (as in Alexa Custom Skills) don't have access to device discovery/control.

Sounds like you want the Smart Home Skill API

Docs:

https://developer.amazon.com/en-US/docs/alexa/smarthome/understand-the-smart-home-skill-api.html

1 comment
10 |2000 characters needed characters left characters exceeded

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

To add to AndyW's comment here, you can only control smart home devices in an Alexa skill if you have access to the device cloud that can control those devices correctly. If you are talking about controlling commercial smart plugs that you have purchased, you won't be able to control these in your skill unless you are the device manufacturer and own the infrastructure behind controlling those devices.

0 Likes 0 ·