question

hayden avatar image
hayden asked

Smart Home Skill Tutorial

The tutorial linked here: https://developer.amazon.com/en-US/alexa/devices/connected-devices/development-resources/smart-home-skills/smart-home-skill-tutorial/module-2

It appears that the lambda created is just a simulated version of a powercontroller interface, which simulates a real Lamp. Could I just reproduce this code's behavior onto a physical endpoint instead of the Lambda and use it to control real hardware.

alexa smart homelambdasmart homesmart-home
10 |5000 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

Gaetano@Amazon avatar image
Gaetano@Amazon answered

Hello and thanks for posting!

The Smart Home API requires a lambda function as endpoint.

If you are willing to turn on a physical switch, then that device needs to me somehow connected to the lambda function.

Practically, when the code receives a TurnOn directive, you will need to send the command from the lambda function to the physical device.

It is not possible to create a Smart Home skill without a lambda function.

Regards,
Gaetano

2 comments
10 |5000 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.

So I could just forward the messages back and forth between the Smart Home API and my physical endpoint using the lambda if I want to and parse the JSON on the device?

0 Likes 0 ·
This is correct. Just keep in mind that the resource that the lambda function needs to contact must be publicly available, hence exposed to the Internet.
0 Likes 0 ·