aws / aws-iot-device-sdk-js

SDK for connecting to AWS IoT from a device using JavaScript/Node.js
Apache License 2.0
964 stars 385 forks source link

connecting devices through a node js gateway #1

Closed hwestbrook closed 8 years ago

hwestbrook commented 9 years ago

Hi Guys,

I have a setup where I have a bunch of devices behind a gateway running node js. Currently the node application receives messages and then ferries those to the cloud and receives messages from the cloud and then sends those to the devices.

Is there anway to use this SDK to enable a gateway device to pass messages between aws iot and my devices behind the node gateway?

gkwicker commented 9 years ago

This should be possible. One approach would be for the gateway to register separate Thing Shadows for each device behind the gateway. When messages arrive via either status or delta events, the 'thingName' parameter can be used to distinguish which device it is destined for.

The 'temperature-control.js' example illustrates the use of multiple Thing Shadows in an application.

gkwicker commented 8 years ago

Hi Heath,

We haven't heard back from you on this issue and hope that we were able to answer your question. We're going to close this issue for now. If you'd like to ask further questions on this topic, please feel free to re-open it.

hwestbrook commented 8 years ago

Hey Gary,

Sorry not to get back to you. Yes, I think this will solve my issue.

Thanks!