rio icon indicating copy to clipboard operation
rio copied to clipboard

sendToPi: true does not work

Open freumichCH opened this issue 7 years ago • 2 comments

Hello All

I've installed the RIO Projekt on my RBP3. I was able to run the strandtest.py and singlestrandtest.py After that i tried to run the Server with the "npm run server" command. i got the expected output on the Terminal Window (RIO Logo). After switching the "sendToPi" parameter to true, i became following error:

pi@raspberrypi:~/rio $ npm run server

[email protected] server /home/pi/rio cd ./rio-server && npm start

[email protected] start /home/pi/rio/rio-server node index.js

warn: SlackDataStore is deprecated and will be removed in the next major version. See project documentation for a migration guide. events.js:165 throw er; // Unhandled 'error' event ^

Error: Can't open /dev/mem: Permission denied Traceback (most recent call last): File "firmware/rpi/lowlevel-server.py", line 52, in raise RuntimeError('ws2811_init failed with code {0} ({1})'.format(resp, message)) RuntimeError: ws2811_init failed with code -5 (mmap() failed)

at PythonShell.parseError (/home/pi/rio/rio-server/node_modules/python-shell/index.js:190:17)
at terminateIfNeeded (/home/pi/rio/rio-server/node_modules/python-shell/index.js:98:28)
at ChildProcess.<anonymous> (/home/pi/rio/rio-server/node_modules/python-shell/index.js:88:9)
at ChildProcess.emit (events.js:180:13)
at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12)

Emitted 'error' event at: at terminateIfNeeded (/home/pi/rio/rio-server/node_modules/python-shell/index.js:111:22) at ChildProcess. (/home/pi/rio/rio-server/node_modules/python-shell/index.js:88:9) at ChildProcess.emit (events.js:180:13) at Process.ChildProcess._handle.onexit (internal/child_process.js:209:12) npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] start: node index.js npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] start script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above.

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2018-11-24T18_23_50_219Z-debug.log npm ERR! code ELIFECYCLE npm ERR! errno 1 npm ERR! [email protected] server: cd ./rio-server && npm start npm ERR! Exit status 1 npm ERR! npm ERR! Failed at the [email protected] server script. npm ERR! This is probably not a problem with npm. There is likely additional logging output above. npm WARN Local package.json exists, but node_modules missing, did you mean to install?

npm ERR! A complete log of this run can be found in: npm ERR! /home/pi/.npm/_logs/2018-11-24T18_23_50_289Z-debug.log pi@raspberrypi:~/rio $

Running npm with sudo does solve the issue, but i get no output on my LED's

Do you have any idear what happens wrong?

freumichCH avatar Nov 24 '18 18:11 freumichCH

Yes rio-server must be run as root. Have you disabled sendToConsole in rio-server/config/index.js?

lukefanning avatar Dec 12 '18 11:12 lukefanning

Hi

Thanks for you respond. mh i'm not really sure about it. but i mean i've tried several combination.

I observed this discussion a bit. I will give it at the weekend another try.

Thanks for your work

freumichCH avatar Dec 12 '18 22:12 freumichCH