cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - If community subscription notifications are filling up your inbox you can set up a daily digest and get all your notifications in a single email. X

getting error after running "sudo ./luaScriptResource"

AkshayKumar
10-Marble

getting error after running "sudo ./luaScriptResource"

Hi all,

I followed the step by step instructions from "Raspberrypi quick start Guide",

i am getting stuck with the part "Run LSR",

up to STEP 4 its working properly,, but at STEP 5   i.e   "sudo ./luaScriptResource" ,, i am getting error like this

"

[INFO ] 2017-09-09 13:05:42,146 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-09 13:05:42,154 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-09 13:05:42,155 PiThing: EMS is available: true, online: false",

please suggest me, where i went wrong,

Thank you

11 REPLIES 11

Actual message is

pi@raspberrypi:~/microserver $ sudo ./luaScriptResource

[INFO ] 2017-09-11 05:14:20,47 ./luaScriptResource: Using config file: /home/pi/microserver/etc/config.lua

[FORCE] 2017-09-11 05:14:20,47 ./luaScriptResource: Starting up ....

[INFO ] 2017-09-11 05:14:20,55 ./luaScriptResource: New path is /home/pi/microserver/etc/thingworx/clibs:/home/pi/microserver/etc/custom/clibs:/home/pi/microserver/etc/community/clibs:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin

[FORCE] 2017-09-11 05:14:20,101 httpServer: starting http server port=8001

[INFO ] 2017-09-11 05:14:20,131 thingworx.shape: Creating a new shape.

[INFO ] 2017-09-11 05:14:20,131 PiThing: -- Configuration -------------------------------

[INFO ] 2017-09-11 05:14:20,132 PiThing: scanRate: 1000

[INFO ] 2017-09-11 05:14:20,132 PiThing: scanRateResolution: 500

[INFO ] 2017-09-11 05:14:20,132 PiThing: taskRate: 30000

[INFO ] 2017-09-11 05:14:20,132 PiThing: keepAliveRate: 60000

[INFO ] 2017-09-11 05:14:20,132 PiThing: requestTimeout: 15000

[INFO ] 2017-09-11 05:14:20,132 PiThing: registerRate: 43200000

[INFO ] 2017-09-11 05:14:20,132 PiThing: register: true

[INFO ] 2017-09-11 05:14:20,132 PiThing: getPropertySubscriptionOnReconnect: false

[INFO ] 2017-09-11 05:14:20,132 PiThing: maxConcurrentPropertyUpdates: 100

[INFO ] 2017-09-11 05:14:20,133 PiThing: defaultPushType: VALUE

[INFO ] 2017-09-11 05:14:20,133 PiThing: useShapes: true

[INFO ] 2017-09-11 05:14:20,133 PiThing: identifier: Not Specififed

[INFO ] 2017-09-11 05:14:20,133 PiThing: ------------------------------------------------

[INFO ] 2017-09-11 05:14:20,135 thingworx.template: Adding shape 'shapes.metadata' to template 'thingworx.template'

[INFO ] 2017-09-11 05:14:20,135 thingworx.template: Adding shape 'shapes.propsubscribe' to template 'thingworx.template'

[INFO ] 2017-09-11 05:14:20,136 thingworx.template: Creating new templates.PiTemplate named 'PiThing'

[INFO ] 2017-09-11 05:14:20,136 PiThing: -- Initializing properties ---------------------

[INFO ] 2017-09-11 05:14:20,137 PiThing: Initialized property upToDate [baseType: BOOLEAN, pushType: NEVER, handler: nil, value: true]

[INFO ] 2017-09-11 05:14:20,137 PiThing: Initialized property cpu_volt [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[INFO ] 2017-09-11 05:14:20,138 PiThing: Initialized property cpu_temperature [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[INFO ] 2017-09-11 05:14:20,138 PiThing: Initialized property cpu_freq [baseType: NUMBER, pushType: ALWAYS, handler: nil, value: 0]

[INFO ] 2017-09-11 05:14:20,138 PiThing: ------------------------------------------------

[INFO ] 2017-09-11 05:14:22,110 PiThing: -- Starting script --------------------------

[INFO ] 2017-09-11 05:14:22,110 PiThing: Registering core callback handler

[INFO ] 2017-09-11 05:14:22,110 PiThing: Starting main loop

[INFO ] 2017-09-11 05:14:22,110 PiThing: Calling lifecycle start listeners.

[INFO ] 2017-09-11 05:14:22,110 shapes.propsubscribe: Initialized

[INFO ] 2017-09-11 05:14:22,111 thingworx.handler: Creating a new handler.

[WARN ] 2017-09-11 05:14:22,119 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:22,119 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:22,124 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:22,125 PiThing: MicroServer is now available.

[INFO ] 2017-09-11 05:14:22,125 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:28,173 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:28,174 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:28,179 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:28,180 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:34,195 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:34,195 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:34,200 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:34,201 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:40,218 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:40,219 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:40,225 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:40,226 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:46,240 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:46,241 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:46,245 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:46,246 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:52,264 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:52,265 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:52,270 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:52,271 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:14:58,305 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:58,306 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:14:58,310 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:14:58,311 PiThing: EMS is available: true, online: false

[WARN ] 2017-09-11 05:15:04,326 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:15:04,327 PiThing: Error occured while accessing EMS. Checking isConnected.

[WARN ] 2017-09-11 05:15:04,333 HttpClient::processReq: Authentication requested but no credentials supplied

[INFO ] 2017-09-11 05:15:04,334 PiThing: EMS is available: true, online: false

Navku
13-Aquamarine
(To:AkshayKumar)

HI

If your issue is resolved please help me with it I am getting same error

check script in Config file and lua file

Navku
13-Aquamarine
(To:AkshayKumar)

Hi akshaya,

Thank you for your reply the config file and lua file I have written same as given in https://developer.thingworx.com/resources/guides/thingworx-raspberry-pi-quickstart/configure-lua-script-resource-lsr  did changes only for http_server and ws_server which working correctly

should I create thing,thing template,thing shape in composer and then run sudo ./luaScriptResource

Did u bind remote thing "PiThing" in Thingworx composer??,

to do this, open Thingworx Composer >>Monitoring >> RemoteThing

Then you should see a Thing named "PiThing" bind it, then run Luascript in Raspberry pi, you may get it!!

That will be located in "Unbound" tab

Navku
13-Aquamarine
(To:AkshayKumar)

Yes the pithing is available in the unbound 

Navku
13-Aquamarine
(To:AkshayKumar)

Hi akshaya ,

Thank you for reply

can you help me with the next steps like should I run luaScriptResource or should I create a thing

You should create a thing named "PiThing"  and select ThingTemplate as remote thing, just follow next steps ,you will come to know

i suggest you to use REST API or Cloud mqtt to send data to your Thingworx composer instead EMS,

once you get perfect in that,then you can try up with EMS,there is video tutorials available ,you can check

Navku
13-Aquamarine
(To:AkshayKumar)

Try running wsems and luaScriptResource simultaneously then it will connect to thingworx I tried it worked

Top Tags