Code Monkey home page Code Monkey logo

Comments (11)

pzdaniel avatar pzdaniel commented on June 17, 2024

Hey benblustey,

I had the same problem!
duino is looking for your arduino board by using the "terminal command"
ls /dev | grep ACM
If you type this in your terminal and nothing happens, you can fix the error by doing the following steps (you have to be in the heimcontrol.js directory):

  1. edit the file: board.js
    nano node_modules/duino/lib/board.js
  2. change the part around 75 where 'ls /dev | grep ACM' or similar is written to:
    'ls /dev | grep -e usb -e USB -e ACM'
  3. save and start heimcontrol...that's it! :-)

from heimcontrol.js.

benblustey avatar benblustey commented on June 17, 2024

Hey pzdaniel!

Thank you for the response.

Entered 'ls /dev | grep ACM' and nothing was returned.
Changed the line from 'ls /dev | grep ACM' (it was 75) to 'ls /dev | grep -e usb -e USB -e ACM'
Saved and started (also rebooted pi) heimcontrol.js and the same error appeared :/

Have any other ideas what it might be? Would removing any instance from the db of a webcam be possible? Is that even the issue?

Thanks again for your input. I've been working on my own Node app for my chicken coop, but I saw Heimcontrol as an very scalable solution for my house!

from heimcontrol.js.

ni-c avatar ni-c commented on June 17, 2024

Hi benblustey!

What is the output if you type ls /dev | grep -e usb -e USB -e ACM in the terminal?

from heimcontrol.js.

benblustey avatar benblustey commented on June 17, 2024

Hey ni-c, thanks for your response.

I receive no response, so I am assuming that I am missing some installs?

from heimcontrol.js.

ni-c avatar ni-c commented on June 17, 2024

Seems that heimcontrol.js does not find any USB-Devices connected to your Pi, if you haven't attached an Arduino or a webcam via USB you can ignore these errors.

You can try to drop the collection of the webcam plugin from the db and restart heimcontrol.js:

mongo heimcontroljs --eval "db.Webcam.drop();"

If that doesnt work you can try to change the name of the used database in config/development.js line 6 or simply drop your old database:

mongo heimcontroljs --eval "db.dropDatabase();"

heimcontrol.js will create a new database on startup.

from heimcontrol.js.

benblustey avatar benblustey commented on June 17, 2024

Thanks ni-c,

I tried three approaches; dropped the database, clean version of heimcontroljs, and changed the name of the database, with no different outcome.

I wasn't able to use:

mongo heimcontroljs --eval "db.dropDatabase();"

returned

MongoDB shell version: 2.1.1
connecting to: heimcontroljs
[object bson_object]

So I entered the mongo bash switched to the heimcontrol db and was able to drop the db.

> show dbs
heimcontrol     (empty)

I start up heimcontrol sudo node heimcontrol.js

info  - socket.io started
heimcontrol.js listening on port 8080
events.js:2817: Uncaught Error: Cannot open /dev/
events.js:2817: Uncaught Error: Cannot open /dev/

I tried adding 'pi' as a user on the /dev/ directory, but after reboot it always changes back to

drwxr-xr-x  12 root root  3100 Oct  8 11:26 dev

Thanks again for your help on this, hopefully my early stage status isn't driving you mad.

from heimcontrol.js.

JorisM avatar JorisM commented on June 17, 2024

I ran into the same problem. After some exploring, I figured out that I had to grep for AMA instead of AMC on my raspberry pi.

from heimcontrol.js.

benblustey avatar benblustey commented on June 17, 2024

Thank you, Joris, this is what I needed and got me up and running. When entering ls /dev | grep -e usb -e USB -e ACM I am returned ttyAMA0. This time modifying line 75 of board.js w/ ls /dev | grep AMA node exits out with the below error.

info  - socket.io started
heimcontrol.js listening on port 8080
events.js:2817: Uncaught Error: Cannot open /dev/ttyAMA0
events.js:2817: Uncaught Error: Cannot open /dev/ttyAMA0

events.js:72
    throw er; // Unhandled 'error' event
        ^
Error: Serialport not open.
    at SerialPortFactory.SerialPort.write (/home/pi/heimcontrol.js/node_modules/duino/node_modules/serialport/serialport.js:246:17)
at Board.sendClearingBytes (/home/pi/heimcontrol.js/node_modules/duino/lib/board.js:112:15)
at null._onTimeout (/home/pi/heimcontrol.js/node_modules/duino/lib/board.js:37:14)
at Timer.listOnTimeout [as ontimeout] (timers.js:110:15)
npm ERR! weird error 8
npm ERR! not ok code 0

I followed the advice from an article on the raspberrypi.org forum to open serial ports.

  1. Make sure your userid (default is pi) is a member of the dialout group: sudo usermod -a -G dialout pi
  2. Stop the getty running on the GPIO serial console by remove references to /dev/ttyAMA0 from /boot/cmdline.txt
  3. Disable the getty on that serial port in /etc/inittab

After a quick reboot, I was up and running.

I tried all the above solutions on a fresh rasbian/mongo/node installs and was stuck at the same /dev directory issue. After following Joris' advice and the article, the issue was resolved.

from heimcontrol.js.

benblustey avatar benblustey commented on June 17, 2024

Got it all working now with a temp, led, and photocell! I am working on decoding some Woods RF outlets, IR leds waiting, and have my RGB led strip coming this Saturday. Can't wait to have it all together and build a slick case. Thank you @JorisM and @ni-c for the assistance, the hardware is a new realm for me.

The final modification that I needed to make to board.js was ls /dev | grep ACM to ls /dev | grep -e usb -e USB -e ACM.

from heimcontrol.js.

mikehumphrey avatar mikehumphrey commented on June 17, 2024

I was having the same 'Uncaught Error: Cannot open /dev/' and I believe this was due to the fact that 1) I had several USB devices plugged into a USB hub and then into my BBB so the /usb/ directory contained some hidden devices, but not my Arduino because 2) As a total NUB I had not uploaded the duino.ino files to my attached Arduino. Once I uploaded the files it worked great.

from heimcontrol.js.

tjanson avatar tjanson commented on June 17, 2024

My Arduino Uno showed up as /dev/ttyAMA0 on my new Raspi B+. I’ll add this to the duino code later. Never mind, ttyAMA0 is UART or something.

from heimcontrol.js.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.