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 |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.

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

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.

hayden avatar image
hayden answered ·

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?

I don't really see any good alternatives to this. Is there a reason we can't implement them the same way as Generic Controllers and not have to create the Lambda?

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.