title: Amazon Echo to Raspberry Pi
body: <p>How can we direct a Amazon Echo intent to a private/internal https endpoint? Like a raspberry pi running nodeJS.</p>
  
  <ol>
  <li>Using an "Echo Proxy" still requires to have the service accessible from internet (More on Echo Proxy: <a href="https://www.reddit.com/r/amazonecho/comments/3blkax/alexa_api_proxy_java/" rel="noreferrer">https://www.reddit.com/r/amazonecho/comments/3blkax/alexa_api_proxy_java/</a> )</li>
  <li>Using "HUE Bridge Emulator" will help you fork the Alexa request to a private(internal only) https server. However, this setup limits usage of Alexa intents to "Turn on" or "Turn off" (and set dim level etc). (More on HUE Bridge Emulator: <a href="https://github.com/armzilla/amazon-echo-ha-bridge" rel="noreferrer">https://github.com/armzilla/amazon-echo-ha-bridge</a> )</li>
  </ol>
  
  <p>I would love to hear feedback on how can we work around this problem.</p>
  
  <p>EDIT: I now have a stable, working setup of my Pi controlled by Amazon Echo. And this is how it is configured:</p>
  
  <ol>
  <li>Setup AWS Lambda to handle incoming intents from Echo</li>
  <li>On Lambda, map a "ACTION KEYWORD" for each intent/slot</li>
  <li>On a matching intent/slot, post the ACTION KEYWORD to PubNub channel</li>
  <li>Setup my Pi to SUBSCRIBE to PubNub channel for new messages</li>
  <li>If Pi receives a matching ACTION KEYWORD on the channel, it triggers a function/script</li>
  <li>This function/script in turn has the complete execution logic (example: Open garage door)</li>
  </ol>
  
  <p>I'd love to hear feedback on this method and leaving the question open for others to post simpler/better way to achieve this</p>