0

Yesterday I configured my Raspberry Pi to connect with AWS IoT web services. Now my pi can publish and listen messages. On Pi I connected light sensor which will update shadow after every 30 sec.

Now I want to write a client (Mobile app or Web app) who will also listen to same shadow and notify me. For same reason I am trying to connect my ubuntu machine with AWS IoT using node js. Now when I run sample examples mentioned on this link I only see screen with message connected. When I update shadow from AWS console I should receive a message on node side. Am I right with my understanding or I am doing any mistake. If this is not a right approach then what is right approach?

Code am trying to execute is here

and command which I am using to execute is

nodejs examples/echo-example.js --host-name=AYYCW0HM971XS.iot.us-west-2.amazonaws.com --certificate-dir=/home/sangam/iot/certs --thing-name=thirdthing --debug
SangamAngre
  • 809
  • 8
  • 25
  • Please post the JavaScript code you are using. – Aaron Franco Apr 21 '16 at 12:07
  • am trying to execute sample program provided by AWS on https://github.com/aws/aws-iot-device-sdk-js/blob/master/examples/echo-example.js and using below command to execute it nodejs examples/echo-example.js --host-name=AYYCW0HM971XS.iot.us-west-2.amazonaws.com --certificate-dir=/home/sangam/iot/certs --thing-name=thirdthing --debug – SangamAngre Apr 21 '16 at 12:16
  • now when I enter command with debug mode I get last message as attempting new mqtt connection... not going beyond that – SangamAngre Apr 21 '16 at 12:47

0 Answers0