octoblu / meshblu

Meshblu is a cross-protocol IoT machine-to-machine messaging system.
https://meshblu.readme.io/
MIT License
816 stars 182 forks source link

Device not registered', code: 500 #49

Closed gadgethome closed 10 years ago

gadgethome commented 10 years ago

Hi, Trying to run on a Raspberry Pi. The following seems to start OK

~/skynet $ node server.js info - socket.io started Skynet connected to MQTT broker No MQTT server found.

SSSSS kk tt SS kk kk yy yy nn nnn eee tt SSSSS kkkkk yy yy nnn nn ee e tttt SS kk kk yyyyyy nn nn eeeee tt SSSSS kk kk yy nn nn eeeee tttt yyyyy

Skynet development environment loaded... coap listening at coap://raspberrypi:5683 restify listening at http://0.0.0.0:3000

Then run curl -X GET http://raspberrypi:3000/status and response is

{ skynet: 'online' }

Then try to register curl -X POST -d "type=drone&color=black" http://raspberrypi:3000/devices and response is

register { type: 'drone', color: 'black', ipAddress: '127.0.0.1' } register { error: { message: 'Device not registered', code: 500 } }

If I run

curl -X POST -d "type=drone&color=black" http://skynet.im/devices

it does come back with a uuid and token. Just cant seem to get it to work on my Pi.

Thanks

octoblu commented 10 years ago

curl -X POST -d "type=drone&color=black" http://0.0.0.0:3000/devices

If that doesn't work, have you confirmed that Mongo is installed and running or that you are pointing to a hosted Mongo instance like MongoHQ.com?

bassdread commented 10 years ago

Mongo isn't really available for the Pi currently. It can be compiled http://elsmorian.com/post/24395639198/building-mongodb-on-raspberry-pi to run.

gadgethome commented 10 years ago

Thanks for replies. I have mongo installed and running. I will try curl -X POST -d "type=drone&color=black" http://0.0.0.0:3000/devices and see if that works.

gadgethome commented 10 years ago

Managed to get it working now. Seems when I used

mongodb://localhost:27017/skynet

skynet had not been created in Mongo DB

Thanks