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.

    MMM-Universal-PIR - ‘GPIOcommand exited with error!'

    Scheduled Pinned Locked Moved Solved Troubleshooting
    7 Posts 2 Posters 65 Views 2 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.
    • S Offline
      smegbadger
      last edited by smegbadger

      The Docker log shows
      [2026-02-10 11:30:10.955] [ERROR] [MMM-Universal-Pir] stderr: gpiomon: invalid option -- 'r' gpiomon: try gpiomon --help

      but gpiomon -r -b gpiochip0 23 works in a terminal when pasted from the config.js file, very strange

      It’s just stopped working!

      Steve

      1 Reply Last reply Reply Quote 0
      • S Offline
        smegbadger
        last edited by

        magicm@magicmirror:/opt/mm/mounts/config $ gpiomon --help
        Usage: gpiomon [OPTIONS] <chip name/number> <offset 1> <offset 2> ...
        
        Wait for events on GPIO lines and print them to standard output
        
        Options:
          -h, --help:           display this message and exit
          -v, --version:        display the version and exit
          -l, --active-low:     set the line active state to low
          -B, --bias=[as-is|disable|pull-down|pull-up] (defaults to 'as-is'):
                        set the line bias
          -n, --num-events=NUM: exit after processing NUM events
          -s, --silent:         don't print event info
          -r, --rising-edge:    only process rising edge events
          -f, --falling-edge:   only process falling edge events
          -b, --line-buffered:  set standard output as line buffered
          -F, --format=FMT      specify custom output format
        
        Biases:
          as-is:        leave bias unchanged
          disable:      disable bias
          pull-up:      enable pull-up
          pull-down:    enable pull-down
        
        Format specifiers:
          %o:  GPIO line offset
          %e:  event type (0 - falling edge, 1 rising edge)
          %s:  seconds part of the event timestamp
          %n:  nanoseconds part of the event timestamp
        magicm@magicmirror:/opt/mm/mounts/config $ gpiomon -v
        gpiomon (libgpiod) v1.6.3
        Copyright (C) 2017-2018 Bartosz Golaszewski
        License: LGPLv2.1
        This is free software: you are free to change and redistribute it.
        There is NO WARRANTY, to the extent permitted by law.
        

        -r is listed in the library help for v1.6.3

        karsten13K 1 Reply Last reply Reply Quote 0
        • karsten13K Offline
          karsten13 @smegbadger
          last edited by

          @smegbadger

          I had no idea about that, but now that you’re using Docker:

          The gpiomon command is called inside the container (doesn’t work) and you call it for testing on the host (does work).

          So I assume you have the newer version of gpiomon running in the container. So update the command in config.js to the new syntax described in the module README and try again (the new command will fail on the host but should work from inside the container).

          1 Reply Last reply Reply Quote 0
          • S Offline
            smegbadger
            last edited by

            @karsten13 perfect, thank you. The Docker container has gpiomon at v2.2.1. It never occurred to me the container would update things unannounced!

            Many thanks for your help

            Steve

            karsten13K 1 Reply Last reply Reply Quote 0
            • S smegbadger has marked this topic as solved
            • karsten13K Offline
              karsten13 @smegbadger
              last edited by

              @smegbadger said in MMM-Universal-PIR - ‘GPIOcommand exited with error!':

              It never occurred to me the container would update things unannounced!

              the container does not update things on your host, but the container itself is running debian and (if you are using karsten13/magicmirror:latest) the debian version of the container image switched from bookworm to trixie …

              1 Reply Last reply Reply Quote 0
              • 1 / 1
              • 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