enableiot / iotkit-samples

Demonstration code for the IoT Kit
Other
43 stars 36 forks source link

Device already exists error #34

Closed microspace closed 8 years ago

microspace commented 8 years ago

Hello I try to submit data to Intel IoT Cloud using this example iotkit-samples/api/javascript/examples/pull-example.js I get this error:

2016-01-29T21:32:56.517Z - debug: Account Guid: undefined
2016-01-29T21:32:57.868Z - error: UncaughtException: Device already exists
2016-01-29T21:32:57.873Z - error: undefined

Please, help me to solve this problem

marcinma commented 8 years ago

Hi, as you can see in message, Device already exists, unfortunately your Device ID is unique in whole system, please make sure you are using unique deviceid (update config in /javascript/configs/app.json so it points to your account)

microspace commented 8 years ago

I changed Device ID in app.json. Now when I run node pull-example.js new device is created. Do I need to activate it? Can I send data to device which was already activated with iotkit-admin activate KJHGjk command?

marcinma commented 8 years ago

Yes, in order to submit data you have to activate device, if you already activated device and device token was properly saved on your machine you should be able to send data.

microspace commented 8 years ago

Problem is that new device is created each time I run node pull-example.js. This is strange and complicated for me. I give up. Sorry to embarrase you