After days of searching I decided to ask here for some help. I want to publish an Alexa Skill which can controll some electric motors.
Current state:
- 1 User
- 1 Alexa
- 1 Local Network
- 1 Raspberry Pi
If the user invokes the skill which sends a json-request to a Lambda function. This functions sends a http-request (with a DDNS I "know" the IP address of the router which forwards the reqest to the Raspberry Pi) to the Raspberry Pi (on which a local webserver is running). This local webserver sends now instructions over the serial interface to the electric motors.
My Problem:
If I add a 2nd or 3rd or 1000th local network (see image), i cant differ anymore between these networks in the Lambda function.
How do I know which User belongs to which Raspberry Pi?
I'm about to implement openHAB, AWS IoT or Pubnub, so I dont have to worry about the communication between a specific Raspberry Pi and the Lambda Function. How ever after this implementaion the Lambda function still doesn't know which Raspberry Pi the User means?!
Ah and the User can only control his own Raspberry Pi which is in the same local network.