Welcome to Our Community

Some features disabled for guests. Register Today.

OpenBuilds Control and RPi

Discussion in 'Control Software' started by John Davies, Jun 18, 2019.

Tags:
  1. Ace Skwal

    Ace Skwal New
    Builder

    Joined:
    Mar 31, 2020
    Messages:
    10
    Likes Received:
    4
    The new wiki is far easier to follow and install than previous versions. I recently flashed a new SD card with Raspbian, the standard Pi software and it installed easily and runs smoother than it did on the iRasbianOS I was using previously.

    @Peter Van Der Walt thank you for sorting it out for us! I understand complete tech support for this might be a nightmare but keeping the Pi community running is really great! Keep up the good work!

    That new controller looks pretty slick!
     
    Peter Van Der Walt likes this.
  2. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    Ok so I had it running once upon a time but on a new insall ( using teh recommended version of RaspiOS, this is my output in a terminal window. If I use the desktop icon, I get nothing....


    ~/OpenBuilds-CONTROL $ node index.js
    Error: The module '/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 80. This version of Node.js requires
    NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/pi/OpenBuilds-CONTROL/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    Error: listen EADDRINUSE: address already in use :::3001
    at Server.setupListenHandle [as _listen2] (net.js:1316:16)
    at listenInCluster (net.js:1364:12)
    at Server.listen (net.js:1450:7)
    at Object.<anonymous> (/home/pi/OpenBuilds-CONTROL/index.js:87:59)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:60:12)
    at internal/main/run_main_module.js:17:47 {
    code: 'EADDRINUSE',
    errno: 'EADDRINUSE',
    syscall: 'listen',
    address: '::',
    port: 3001
    }
    Error: listen EADDRINUSE: address already in use 0.0.0.0:3000
    at Server.setupListenHandle [as _listen2] (net.js:1316:16)
    at listenInCluster (net.js:1364:12)
    at doListen (net.js:1501:7)
    at processTicksAndRejections (internal/process/task_queues.js:85:21) {
    code: 'EADDRINUSE',
    errno: 'EADDRINUSE',
    syscall: 'listen',
    address: '0.0.0.0',
    port: 3000
    }
     
  3. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
    looks like you have something else running on port 3000
     
  4. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Run npm rebuild as suggested in the error?
     
    #34 Peter Van Der Walt, Feb 22, 2021
    Last edited: Feb 23, 2021
    sharmstr likes this.
  5. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    Shouldn't have -it was a fresh install of RaspiOS. i will go back to teh July img and see if it makes a difference. This was the 08202020 img that was referenced in the wiki somewhere I believe. It did auto update on start up... It looks as though the Node.JS versions might be the issue but not 100 % on that.
     
  6. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    Tried that - didn't work. I will rev back to an earlier image. I did have it working on another PI previously. This is a pi400 that I am trying it on.
     
  7. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
  8. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    no. New Flash of 088202020 img. I was basing my comment on this error - Error: The module '/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 80. This version of Node.js requires
    NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`)
     
  9. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    Trying again with fresh img no update on install
     
  10. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Node tries to download the nearest precompiled binary, if it doesnt work, it has to recompile it for you.
    Thus why we run "npm rebuild" during the install

    OpenBuilds/OpenBuilds-CONTROL

    Catching the log of the "try" may have had answers why it didn't work - read the errors :)

    As mentioned on the Wiki, we don't really provide tech support for Pi installs, and this is mainly why, linux/node/etc is hard on the Pi, because it sometimes changes without notice, thus why we have the note that its best left to users who want to attempt it knowing they will need the skills to debug it when the install goes wrong as well.
    While we don't (can't) offer much of our time towards supporting it, we do try... but at least then help us speed it along by providing a little more details than "Tried that, didn't work" (;
     
    #40 Peter Van Der Walt, Feb 23, 2021
    Last edited: Feb 23, 2021
  11. JayMcD

    JayMcD New
    Builder

    Joined:
    Nov 5, 2017
    Messages:
    54
    Likes Received:
    6
    All good. Not expecting OB to support - though there might be community input. I will eventually figure out by process of elimination and the error log. Thanks though. Jay
     
    Peter Van Der Walt and sharmstr like this.
  12. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Well this is definitely a problem. Had not used my router in a couple months so when I started it up I did my usual Raspbian updates to make sure everything is current. After that the connect option went dark and got the "waiting on USB" in the window. Decided to do a clean install of everything. Fresh image of Raspbian on the Pi4 and then only ran the Openbuilds script. Same issue as before. Looking at the startup I got the exact same error on NPM version mismatch both times. Posted it below and bolded. Running a rebuild does nothing. This is clearly killing the serial interface and hence the USB.

    pi@Openbuilds:~ $ bash -c "cd /home/pi/OpenBuilds-CONTROL; git fetch --all; git reset --hard origin/master; MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y node index.js"
    Fetching origin
    ^[[28~HEAD is now at d461051 v1.0.290
    Error: The module '/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 80. This version of Node.js requires
    NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).

    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/pi/OpenBuilds-CONTROL/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    TypeError: Cannot read property 'address' of undefined
    at Server.<anonymous> (/home/pi/OpenBuilds-CONTROL/index.js:88:41)
    at Object.onceWrapper (events.js:420:28)
    at Server.emit (events.js:326:22)
    at emitListeningNT (net.js:1350:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
    TypeError: Cannot read property 'address' of undefined
    at Server.<anonymous> (/home/pi/OpenBuilds-CONTROL/index.js:92:41)
    at Object.onceWrapper (events.js:420:28)
    at Server.emit (events.js:326:22)
    at emitListeningNT (net.js:1350:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
     
  13. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Try run electron-rebuild?


    Thanks for the logs, as mentioned above, logs help immensely

    Did the raspbian updates change the Nodejs version?
     
    #43 Peter Van Der Walt, Mar 4, 2021
    Last edited: Mar 4, 2021
  14. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Output from that, still same version error as above.....

    pi@Openbuilds:~ $ npm install electron-rebuild
    ^[[28~[..................] \ idealTree:electron-rebuild: sill placeDep ROOT elec[ ...........] npm WARN deprecated [email protected]: this library is no longer supported
    npm WARN deprecated [email protected]: request has been deprecated, see Request’s Past, Present and Future · Issue #3142 · request/request
    npm WARN deprecated [email protected]: Please upgrade to @mapbox/node-pre-gyp: the non-scoped node-pre-gyp package is deprecated and only the @mapbox scoped package will recieve updates in the future
    [ ] / reify:node-gyp: http fetch GET 200 https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.t
    ^[[28~[ ] / reify:node-gyp: http fetch GET 200 https://registry.npmjs.org/node-gyp/-/node-gyp-7.1.2.tgz 6183m
    added 214 packages, and audited 215 packages in 2m

    19 packages are looking for funding
    run `npm fund` for details

    found 0 vulnerabilities
     
  15. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Did the raspbian updates change the Nodejs version?
     
  16. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Getting out of my depth quickly here but I'm thinking that is a possibility. Let me know if there are any specific commands you want me to run and I can help troubleshoot.
     
  17. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    I'll have to setup a Pi4 at some point and work the problem it seems. No promises this week, meetings all afternoon, and not in the office tomorrow.
     
  18. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Thanks. I'm going to pull and older copy of Raspbian and run the install bits without the OS updates and see what that does.
     
  19. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Wiki should mention the exact image used at the time the guide was written
     
  20. sharmstr

    sharmstr OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 23, 2018
    Messages:
    2,059
    Likes Received:
    1,448
  21. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Well looks like it isn't related to the version of Raspbian or the RaspiOS updates. Must be something with the NPM install being a newer version. Downloaded 2020-08-20-raspios-buster-armhf.img and ran the script components that were specific to Openbuilds. Exact same error with no other updates....

    reset --hard origin/master; MESA_EXTENSION_OVERRIDE=-GL_MESA_framebuffer_flip_y node index.js"
    Fetching origin
    HEAD is now at d461051 v1.0.290
    Error: The module '/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/build/Release/bindings.node'
    was compiled against a different Node.js version using
    NODE_MODULE_VERSION 80. This version of Node.js requires
    NODE_MODULE_VERSION 72. Please try re-compiling or re-installing
    the module (for instance, using `npm rebuild` or `npm install`).
    at Object.Module._extensions..node (internal/modules/cjs/loader.js:1057:18)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    at Function.Module._load (internal/modules/cjs/loader.js:708:14)
    at Module.require (internal/modules/cjs/loader.js:887:19)
    at require (internal/modules/cjs/helpers.js:74:18)
    at bindings (/home/pi/OpenBuilds-CONTROL/node_modules/bindings/bindings.js:112:48)
    at Object.<anonymous> (/home/pi/OpenBuilds-CONTROL/node_modules/serialport/node_modules/@serialport/bindings/lib/linux.js:2:36)
    at Module._compile (internal/modules/cjs/loader.js:999:30)
    at Object.Module._extensions..js (internal/modules/cjs/loader.js:1027:10)
    at Module.load (internal/modules/cjs/loader.js:863:32)
    TypeError: Cannot read property 'address' of undefined
    at Server.<anonymous> (/home/pi/OpenBuilds-CONTROL/index.js:88:41)
    at Object.onceWrapper (events.js:420:28)
    at Server.emit (events.js:326:22)
    at emitListeningNT (net.js:1350:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
    TypeError: Cannot read property 'address' of undefined
    at Server.<anonymous> (/home/pi/OpenBuilds-CONTROL/index.js:92:41)
    at Object.onceWrapper (events.js:420:28)
    at Server.emit (events.js:326:22)
    at emitListeningNT (net.js:1350:10)
    at processTicksAndRejections (internal/process/task_queues.js:83:21)
     
  22. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Still downloading latest image - my internet is terrible :(
    upload_2021-3-4_21-49-51.png
     

    Attached Files:

    sharmstr likes this.
  23. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    I did just try this on a clean install of Twister OS. Exact same error.
     
    sharmstr likes this.
  24. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    I found the cause already, hoping to have updated fix out before the end of the day
     
    sharmstr and Rick 2.0 like this.
  25. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Alright, you can try rerunning the install script :)
    You are the first beta user though - so let me know if it doesn't work, but then I'll check on monday.

    Changed it to run under Electron directly, not as a backend+chromium. Should be even better now
     
    sharmstr likes this.
  26. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Sounds good, I'll load up a fresh image and give it a go. Something else I've been meaning to ask is if you could put TightVNC and XRDP in as optional or maybe a separate script. I've noticed that it kills the built in VNC server after it goes through those installs.
     
  27. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Every windows machine has RDP built in. Just makes support easier
    Don't know if it still does but RealVNC really tried to cram a subscription and the cloud down my throat - so I've been killing that off on new installs straight away for a while now. xrdp/tightvnc just a little more open
     
  28. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    Looks like that fixed it. Thanks for the help Peter!
     
    sharmstr and Peter Van Der Walt like this.
  29. Michael_S

    Michael_S New
    Builder

    Joined:
    Mar 4, 2021
    Messages:
    13
    Likes Received:
    3
    One more question on this subject. Is there way to run this automatically when the Pi starts up?
     
  30. Peter Van Der Walt

    Peter Van Der Walt OpenBuilds Team
    Staff Member Moderator Builder Resident Builder

    Joined:
    Mar 1, 2017
    Messages:
    15,050
    Likes Received:
    4,313
    Edit the desktop shortcut to get the commands, then run it twice (first run opens the systray hidden instance) from however you make an application start after login to gui on a pi. I am leave today, but can check closer on Monday, just remind me next week
     

Share This Page

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice