tbideas / pi-steroid Goto Github PK
View Code? Open in Web Editor NEWA RaspberryPi client for pijs.io
A RaspberryPi client for pijs.io
I'm getting a 400 error from the pi-steroid client and it's not reporting back and updating pijs.io. It seems I was able to add my pi, but since then it hasn't updated logs or been able to successfully connect at all. What would be the cause?
EDIT: at some point the error switched from a 400 to a 502.
It looks like all the connect() callbacks (at the node-ddp level - or at the asteroid-client level) are all stacked up and run at once when the connection is re-established.
pi@raspberrypi ~ $ sudo /etc/init.d/pi-steroid stop
error: Forever cannot find process with index: /usr/local/bin/pi-steroid
When the parent process dies (for example because of the network error below) - the child process created stays alive and keeps hogging resources (a serial port for example).
We need to make sure that:
/usr/local/lib/node_modules/pi-steroid/node_modules/ddp/node_modules/ws/lib/WebSocket.js:175
else throw new Error('not opened');
^
Error: not opened
at WebSocket.send (/usr/local/lib/node_modules/pi-steroid/node_modules/ddp/node_modules/ws/lib/WebSocket.js:175:16)
at DDPClient._send (/usr/local/lib/node_modules/pi-steroid/node_modules/ddp/lib/ddp-client.js:77:15)
at DDPClient.call (/usr/local/lib/node_modules/pi-steroid/node_modules/ddp/lib/ddp-client.js:222:8)
at AsteroidClient._writeConsole (/usr/local/lib/node_modules/pi-steroid/lib/asteroid_client.js:145:19)
at null.<anonymous> (/usr/local/lib/node_modules/pi-steroid/lib/asteroid_client.js:28:10)
at EventEmitter.emit (events.js:98:17)
at Socket.<anonymous> (/usr/local/lib/node_modules/pi-steroid/lib/asteroid_vm.js:75:10)
at Socket.EventEmitter.emit (events.js:95:17)
at Socket.<anonymous> (_stream_readable.js:699:14)
at Socket.EventEmitter.emit (events.js:92:17)
Forever detected script exited with code: 8
Forever seems to start with the system-installed nodejs (if it exists) instead of the one we ship: probably because /usr/bin is before /usr/local/bin in the initd scripts.
Fix: force the path in the startup scripts.
Initial report: https://pijs.uservoice.com/admin/tickets/2
when running the installation script and at the end of the process I
see the following error:piJS.io: Launching pi-steroid
info: Forever processing file: /usr/local/bin/pi-steroid/usr/local/lib/node_modules/forever/lib/forever.js:404
monitor.send(JSON.stringify(options));
^
TypeError: Object # has no method 'send'
at Object.startDaemon
(/usr/local/lib/node_modules/forever/lib/forever.js:404:11)
at /usr/local/lib/node_modules/forever/lib/forever/cli.js:229:13
at /usr/local/lib/node_modules/forever/lib/forever/cli.js:134:5
at Object.oncomplete
(/usr/local/lib/node_modules/forever/lib/forever.js:343:11)
If the program was not updated, there is no need to stop and relaunch the program after a reconnect to the server
For more security and also for users who are behing http proxy who do not re-cognize the Upgrade command.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.