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 384 forks source link

Is it not supposed to have "things" appear at the AWS IoT Console's thing registry list page when I open connections with `awsIot.device()` #104

Closed celalo closed 7 years ago

celalo commented 7 years ago

Seems like I managed to get going using the aws-iot-device-sdk-js module. I open up connections using awsIot.device with different client IDs, in fact over 20k of them and successfully publish loads of messages to AWS IoT backend. I can obviously confirm that messages are reaching to the endpoint smoothly, I test using AWS IoT Console's test page.

However the things do not appear at the "Things" section of the AWS IoT Console. Is it supposed to act like that?

groteworld commented 7 years ago

A device is not necessarily a thing in this case. using awsIot.device instead of awsIot.shadowThing allows you to use the MQTT system without having to register to the thing registery. The device SDK is equivalent to the Test MQTT client in the AWS IoT Console. It can take most any clientId and allow you to send messages.

liuszeng commented 7 years ago

Hi @celalo ,

Thank you very much for your interest in AWS IoT!

As mentioned by @groteworld , AWS IoT Node.js SDK provides two different clients, one for plain MQTT connection (awsIot.device) and the other one for device shadow functionality (awsIot.thingShadow). awsIot.device allows you to perform plain MQTT operations using AWS IoT as a MQTT server. awsIot.thingShadow provides APIs for you to operate on the device shadow in AWS IoT. Note that you can always create a new shadow with a shadow update operation using SDK or other MQTT client. AWS IoT Console only shows shadows in your inventory that are explicitly created via Console work flow.

Thanks, Liusu

celalo commented 7 years ago

Thank you very much. Now I understand how it works better.