MagicMirror Forum
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • 3rd-Party-Modules
    • Donate
    • Discord
    • Register
    • Login
    A New Chapter for MagicMirror: The Community Takes the Lead
    Read the statement by Michael Teeuw here.

    Need "correct" version of node-libgpiod ....

    Scheduled Pinned Locked Moved Solved Troubleshooting
    22 Posts 3 Posters 701 Views 3 Watching
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • R Offline
      rkorell @sdetweil
      last edited by

      @sdetweil
      Dear Sam, OK, thanks for this.
      Not fully understood…

      How can I

      1. figure out, how my mirror is started? (looooong ago I‘ve used your install script and (if I remember correctly) I‘ve answered „yes“ to „do you want automatically start your mirror at system startup“ - or something similar. - Never took care about, what is done - it worked (and still works)…)
      2. double check the above „VERSIONS“ - message - is this message in logfile?
      3. can I get „keeping the node versions synched“?

      Thanks for further advise!
      Warmest regards,
      Ralf

      S 1 Reply Last reply Reply Quote 0
      • S Offline
        sdetweil @rkorell
        last edited by sdetweil

        @rkorell 1. my pm2 setup uses the file

        ~/MagicMirror/installers/mm.sh
        

        you can see that by using the

        pm2 info xxxx
        

        command, where xxx is the name or number of the app row in

        pm2 status 
        

        output, from my desktop , note you CAN setup the SAME NAMED app multiple times,
        so the pm2 start app_name
        might be ambiguous
        so pm2 start 8 would target the app on line 8

        ┌────┬─────────────────────┬─────────────┬─────────┬─────────┬──────────┬────────┬──────┬───────────┬──────────┬──────────┬──────────┬──────────┐
        │ id │ name                │ namespace   │ version │ mode    │ pid      │ uptime │ ↺    │ status    │ cpu      │ mem      │ user     │ watching │
        ├────┼─────────────────────┼─────────────┼─────────┼─────────┼──────────┼────────┼──────┼───────────┼──────────┼──────────┼──────────┼──────────┤
        │ 8  │ MagicMirror         │ default     │ 2.32.0… │ fork    │ N/A      │ 0      │ 245… │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 7  │ MagicMirror 8       │ default     │ 2.31.0… │ fork    │ N/A      │ 0      │ 8    │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 6  │ MagicMirror1        │ default     │ 2.31.0… │ fork    │ N/A      │ 0      │ 13   │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 0  │ Smart Mirror        │ default     │ 0.0.30  │ fork    │ N/A      │ 0      │ 31   │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 2  │ checkarec           │ default     │ N/A     │ fork    │ 2870     │ 19D    │ 0    │ online    │ 0%       │ 3.4mb    │ sam      │ disabled │
        │ 5  │ smart-mirror        │ default     │ 0.0.31  │ fork    │ N/A      │ 0      │ 8    │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 4  │ smart-mirror ttt    │ default     │ 0.0.30  │ fork    │ N/A      │ 0      │ 10   │ stopped   │ 0%       │ 0b       │ sam      │ disabled │
        │ 3  │ start_alexa_bk      │ default     │ N/A     │ fork    │ 2871     │ 19D    │ 0    │ online    │ 0%       │ 2.4mb    │ sam      │ disabled │
        │ 1  │ startspot           │ default     │ N/A     │ fork    │ 6315     │ 19D    │ 439  │ online    │ 0%       │ 2.5mb    │ sam      │ disabled │
        │ 9  │ testups             │ default     │ N/A     │ fork    │ 2885     │ 19D    │ 0    │ online    │ 0%       │ 3.2mb    │ sam    
        

        using pm2, you can view the log with

        pm2 logs yyy --lines=xxxx
        

        yyy is the name or number of the app from status above), if not supplied,
        output from all managed apps is displayed, 1 after the others

        xxxx is the count of most recent lines to display (default 15)

        you can also see the files(.out and .err, by app) in the

        ~/.pm2/logs
        

        folder

        MM puts out a messages at runtime (this from my desktop system)

        [2025-08-09 09:47:38.743] [INFO]  System information:
        ### SYSTEM:   manufacturer: System manufacturer; model: System Product Name; virtual: false
        ### OS:       platform: linux; distro: Ubuntu; release: 22.04.5 LTS; arch: x64; kernel: 5.15.0-144-generic
        ### VERSIONS: electron: 36.6.0; used node: 22.15.0; installed node: 22.15.0; npm: 10.9.2; pm2: 6.0.8
        ### OTHER:    timeZone: America/Chicago; ELECTRON_ENABLE_GPU: undefined 
        

        notice the versions line

        keep the node versions synced… yes manually (I use the nodejs version of nvm, called n )
        if installed this will show the versions installed

        n list
        

        and

        n
        

        will show the list AND the current one, but you have to type q to exit the list
        (because n updates the /usr/local/bin folder, you have to use sudo to actually install or change the active version)

        or
        if you use my install/upgrade script they will make sure the correct standalone version is installed

        my scripts install and use n if needed to change versions

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        R 1 Reply Last reply Reply Quote 0
        • R Offline
          rkorell @sdetweil
          last edited by rkorell

          @sdetweil Dear Sam,
          thanks again for this long explanation!

          My versions (if I interpret correctly) doesn’t mismatch :-(

          0|MagicMir | ### SYSTEM:   manufacturer: ; model: ; virtual: false
          0|MagicMir | ### OS:       platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.12.20+rpt-rpi-2712
          0|MagicMir | ### VERSIONS: electron: 32.2.7; used node: 20.18.1; installed node: 20.18.1; npm: 10.8.2; pm2: 5.4.3
          0|MagicMir | ### OTHER:    timeZone: Europe/Berlin; ELECTRON_ENABLE_GPU: undefined 
          

          So I’m not sure at all, what to do.

          pi@MagicMirrorPi5:~ $ n list
          node/20.18.1
          
          

          Does show up exact this version, as well.
          Where are my problems from ???
          Thanks a LOT for any idea!

          Ralf

          S 1 Reply Last reply Reply Quote 0
          • S Offline
            sdetweil @rkorell
            last edited by sdetweil

            @rkorell

            so, if, in the module folder you do

            npm rebuild
            

            it will fix the version to the standalone node engine

            if you do

            electron-rebuild
            

            it should fix the version to the electron embedded node engine

            if the engine is the same, only one of those is required

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            R 2 Replies Last reply Reply Quote 0
            • R Offline
              rkorell @sdetweil
              last edited by

              @sdetweil OK; thanks.
              I will stop to handle these mismatches.
              Will try to get the MM-Module runnable .
              Console/terminal runs with node may not be necessary …
              Thanks anyway for your kind support!
              Ralf

              1 Reply Last reply Reply Quote 1
              • R Offline
                rkorell @sdetweil
                last edited by

                @sdetweil Dear Sam,
                just FYI: I’ve just identified that my main problem is NOT the version mismatch but a major change in node-libgpiod’s handling of GPIO-ressources.
                This was the main reason for mal-function of PIR sensor detection. “Version” was a side effect, not root-cause.
                I’m nearly done with this and it seems that it will work as intended…

                Thanks again for your support!

                Regards,
                Ralf

                S 1 Reply Last reply Reply Quote 0
                • S Offline
                  sdetweil @rkorell
                  last edited by

                  @rkorell awesome. yes gpio changes are a pain!!

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  R 2 Replies Last reply Reply Quote 0
                  • R Offline
                    rkorell @sdetweil
                    last edited by

                    @sdetweil yes, indeed …

                    S 1 Reply Last reply Reply Quote 0
                    • S Offline
                      schlomm @rkorell
                      last edited by

                      @rkorell Do have any any resources for your current development? I’m also stucking at a similar problem handling GPIO for buttons using a Raspberry Pi 5.
                      Do you have a Github Repository?

                      R 1 Reply Last reply Reply Quote 0
                      • R Offline
                        rkorell @schlomm
                        last edited by rkorell

                        @schlomm I’m absolute beginner …
                        Had HEAVILY used AI to get this done and have recycled a LOT.

                        GPIO part is from old (discontinued) module MMM-Pir from Bugsounet.
                        This is reflected in pirLib.js - sliightly modified for my purposes.

                        I do have a repository - pushed literally minutes ago …
                        Feel free to have a look.

                        Buttons should work with some modification. Essentiall for my purposes I simply query state of a single GPIO pin - to which a PIR sensor is connected. Code must be enhanced to handle more than one pin - if you are talking about “butons” - which signals plural…

                        As mentioned such modification should be doable with AI as well.

                        [ EDIT : My system is a raspi5 / bookworm as well - this is main reason for some difficulties. Some procedures simply doesn’t work anymore with new libraries and I had to change implementation…]

                        Good luck!
                        Warm regards,
                        Ralf

                        1 Reply Last reply Reply Quote 0
                        • 1
                        • 2
                        • 3
                        • 2 / 3
                        • First post
                          Last post
                        Enjoying MagicMirror? Please consider a donation!
                        MagicMirror created by Michael Teeuw.
                        Forum managed by Sam, technical setup by Karsten.
                        This forum is using NodeBB as its core | Contributors
                        Contact | Privacy Policy