Skip to main content
1-Visitor
March 27, 2017
Solved

AWS IoT Connector with ThingWorx 7.3

  • March 27, 2017
  • 1 reply
  • 4746 views

I am trying to run the AWS IoT Connector demo with ThingWorx 7.3 but am not getting very far.  I'm using the instructions in README.txt but they seem to be incomplete and don't quite align with the directory structure of the zip file containing the README.txt file.

For example, the third step in the second sequence says: "From within the repo directory go to aws-iot-dist-bundle/src/main/dist/demo, run npm install."  When I came this step, npm wasn't yet installed (although I'd installed nodejs already, via apt) and my directory structure doesn't contain aws-iot-dist-bundle/src/main/dist/demo.  I assume I should be in the demo directory that's in the root of the zip file – perhaps this is because I didn't need to clone the repo as it's all part of the zip file.

Also, the first step in the third sequence says: "Generate a new thing on the AWS IoT and Thingworx platform simultaneously..." but as far as I can tell, nowhere does it say how, where or even whether to configure the AWS IoT Connection.  (I wondered whether I need to log on to Composer and do some AWS configuration somewhere but it doesn't say I need to so I assume not.)  When I run the "node generate.js ..." command it looks like it's working but then fails:

Username (Thingworx): Administrator
Password (Thingworx): 
Creating Thing: mydrone
Enabling Thing: mydrone
Restarting Thing: mydrone
Failed to restart mydrone (404)
{"thingName":"mydrone"}
undefined:1
Thing [mydrone] is not running
^

SyntaxError: Unexpected token T
    at Object.parse (native)
    at IncomingMessage. (/home/richard/AWS extensions/TW_Download_AWS IoT Connector/Thingworx-AWS-IoT-Connector-1.1.1.5/demo/edge/generate.js:67:37)
    at emitNone (events.js:72:20)
    at IncomingMessage.emit (events.js:166:7)
    at endReadableNT (_stream_readable.js:905:12)
    at nextTickCallbackWith2Args (node.js:441:9)
    at process._tickCallback (node.js:355:17)

I look in Composer at the Things in my ThingWorx instance and there's no Thing called mydrone.

Am I doing anything obviously daft?

Best answer by Aanjan

Ah sorry about that, I'll check internally on access settings/ levels. I've attached the pdf version of the same document.

*Edit*

This pdf is also available on the Marketplace, so here's the link to that instead.

1 reply

5-Regular Member
March 27, 2017

Richard, that readme file assumes that Extensions like the Connection Server Extension are installed and configured (along with AWSIoTSubsystem etc). Here's a link to our AWS IoT Connector's Installation and Operations guide that goes into detail on how to set everything up.

rwiseman1-VisitorAuthor
1-Visitor
March 28, 2017

Thanks Aanjan.  I guess I don't have the right account though, because I get "PTC.com Account Not Authorized"!  Maybe it's something only people with support contracts get?

Aanjan5-Regular MemberAnswer
5-Regular Member
March 28, 2017

Ah sorry about that, I'll check internally on access settings/ levels. I've attached the pdf version of the same document.

*Edit*

This pdf is also available on the Marketplace, so here's the link to that instead.