Community Tip - Did you know you can set a signature that will be added to all your posts? Set it here! X
i face connecitivity problem (raspberry pi to thingworx platfrom ).i attached my screen shot also. Any one help
Running Example #3: minimal agent w/ property
/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/node_modules/thingworx-api/api.js:60
throw new Error(util.format('Error initalizing thingworx API - returned erro
^
Error: Error initalizing thingworx API - returned error code 1004
at setApiInitializationOptions (/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/node_modules/thingworx-api/api.js:60:9)
at Api.setConfigOptions (/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/node_modules/thingworx-api/api.js:187:26)
at new Api (/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/node_modules/thingworx-api/api.js:107:7)
at new getApi (/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/node_modules/thingworx-api/api.js:259:18)
at Object.<anonymous> (/home/pi/thingworx-nodejs-agent/thingworx-agent-examples/examples/three/index.js:24:11)
at Module._compile (module.js:460:26)
at Object.Module._extensions..js (module.js:478:10)
at Module.load (module.js:355:32)
at Function.Module._load (module.js:310:12)
at Function.Module.runMain (module.js:501:10)
Solved! Go to Solution.
Dinesh, error code 1004 could also mean invalid host address. Can you recheck/ verify that your host ip address is correct?
Dinesh, error code 1004 could also mean invalid host address. Can you recheck/ verify that your host ip address is correct?
ya i find it and resolve it. thank you
dinesh s Please attach/double check your config.json file to see if details provided there are correct.
Furthermore , Did you make the required changes to index.js in thingworx-nodejs-agent/thingworx-agent-examples/examples/three/ folder.
Make sure the the "exampleThing” variable is set to the name of the Remote Thing that you created earlier (i.e. “HomeLight0”).
Dinesh ,where is your Thingworx platform running ? on local laptop (on which IP changes very frequently ) or on server where IP is fixed , the catch is , when you put the ip of machine on which thingworx is running in config.json , and you change your network( from office to home or vice -versa ) , IP changes and you have to counter that changes in config.json file .