krvarma / particle-alexa-smart-home-skill

Particle and Alexa Smart Home Skill
42 stars 22 forks source link

Firmware IP/domain question issue #1

Open laohixdxm opened 8 years ago

laohixdxm commented 8 years ago

Hi Krvarma, Thank you very much for providing this resource. I am struggling a lot with the same thing.

But how can the amazon labmda access your board?

I notice you have a particle server. But am I correct to say this particle server is accessible from public internet with public IP or public domain? Meaning, it is not behind some gateway within local network?

Thank you very much.

justsubhash commented 7 years ago

(I know it's an old question but I figure I would help answer since this repo was very helpful to getting me started.)

The alexa smart skill can only interface with other cloud services that support OAuth.

This example code is for using a particle with the particle cloud service. https://www.particle.io/

You need a photon device, registered with a cloud function, to be able to use this skill.

Yes, the particle server is a service that comes when you buy a photon. It's a service only accessible through the internet. If you want to do something simpler, you should look into doing a custom alexa skill instead of a smart skill.

sunjunlishi commented 7 years ago

my auth2 response: *response << "HTTP/1.1 302 Found\r\n";

char szContent[4096]; sprintf(szContent,"Location: https://pitangui.amazon.com/api/skill/link/M2A98NFFJBY68H?code=SplxlOBeZQQYbYS6WxSbIA&%s\r\n\r\n", strstate);

*response << szContent;

where my is error??