ni-c / heimcontrol.js

Home-Automation with node.js and Raspberry PI
MIT License
1.41k stars 297 forks source link

events.js:72 Error Cannot open /dev/ #50

Closed p33k closed 10 years ago

p33k commented 10 years ago

Thanks for your awesome heimcontrol work! I followed the getting started manual step by step (http://ni-c.github.io/heimcontrol.js/get-started.html) and can't wait to have it running. But unfortunately on the last step I get errors (see the log below). Reboot and so on doesn't help. I'm not sure what the first message tells me. Where should I set that options? How do I fix the /dev/ error?

pi@raspberrypi ~/heimcontrol.js $ node heimcontrol.js
========================================================================================
=  Please ensure that you set the default write concern for the database by setting    =
=   one of the options                                                                 =
=                                                                                      =
=     w: (value of > -1 or the string 'majority'), where < 1 means                     =
=        no write acknowledgement                                                       =
=     journal: true/false, wait for flush to journal before acknowledgement             =
=     fsync: true/false, wait for flush to file system before acknowledgement           =
=                                                                                      =
=  For backward compatibility safe is still supported and                              =
=   allows values of [true | false | {j:true} | {w:n, wtimeout:n} | {fsync:true}]      =
=   the default value is false which means the driver receives does not                =
=   return the information of the success/error of the insert/update/remove            =
=                                                                                      =
=   ex: new Db(new Server('localhost', 27017), {safe:false})                           =
=                                                                                      =
=   http://www.mongodb.org/display/DOCS/getLastError+Command                           =
=                                                                                      =
=  The default of no acknowledgement will change in the very near future                =
=                                                                                      =
=  This message will disappear when the default safe is set on the driver Db           =
========================================================================================
WARNING: Change secret string in config/development.json
   info  - socket.io started
connect.multipart() will be removed in connect 3.0
visit https://github.com/senchalabs/connect/wiki/Connect-3.0 for alternatives
connect.limit() will be removed in connect 3.0
heimcontrol.js listening on port 8080

events.js:72
        throw er; // Unhandled 'error' event
              ^
Error: Cannot open /dev/
bastianonken commented 10 years ago

Had the same error. I plugged in the arduino, that solved it for me.

p33k commented 10 years ago

thanks! although I first wanted to play around without arduino and before installing "npm install duino", doing that and then plugging in an arduino before "node heimcontrol.js" fixed the /dev/ issue. (But I have no idea why)

The other message regarding mongodb still exists, what should I do there? is this important?

ni-c commented 10 years ago

No, you can ignore the mongodb warning.