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.

    Problem Adding Buttons & required Remote-Control Modules

    Scheduled Pinned Locked Moved Solved Troubleshooting
    26 Posts 4 Posters 2.7k Views 4 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.
    • A Offline
      awwbaker
      last edited by

      Thank you so much for the info…I am a running a RPI-5.

      1 Reply Last reply Reply Quote 0
      • S Do not disturb
        sdetweil @awwbaker
        last edited by

        @awwbaker said in Problem Adding Buttons & required Remote-Control Modules:

        [2024-09-16 15:04:01.418] [LOG] Initialize button monitor_control on PIN 25
        [2024-09-16 15:04:01.419] [LOG] MMM-Buttons: RPi model Raspberry Pi 5 Model B Rev 1.0
        [2024-09-16 15:04:01.419] [LOG] MMM-Buttons: RPi5 detected
        [2024-09-16 15:04:01.433] [LOG] Initialize button power on PIN 24
        [2024-09-16 15:04:01.434] [LOG] MMM-Buttons: RPi model Raspberry Pi 5 Model B Rev 1.0
        [2024-09-16 15:04:01.434] [LOG] MMM-Buttons: RPi5 detected

        did you test to make sure the buttons work outside MM?

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        M 1 Reply Last reply Reply Quote 0
        • M Offline
          MarcLandis Module Developer @sdetweil
          last edited by

          @awwbaker

          it seems that the MMM-Jast module is throwing the error:

          [2024-09-16 15:04:00.408] [ERROR] ReferenceError: Log is not defined
          at Object. (/home/awwbaker/MagicMirror/modules/MMM-Jast/MMM-Jast.js:14:6243)
          
          S 1 Reply Last reply Reply Quote 0
          • S Do not disturb
            sdetweil @MarcLandis
            last edited by

            @MarcLandis its because MagicMirror-remote-control is doing a require() on the module js

            Sam

            How to add modules

            learning how to use browser developers window for css changes

            A 2 Replies Last reply Reply Quote 0
            • A Offline
              awwbaker @sdetweil
              last edited by

              Mr @sdetweil
              I tested my button press using:

              import RPi.GPIO as GPIO
              import time

              GPIO.setmode(GPIO.BCM)
              GPIO.setup(6, GPIO.IN, pull_up_down=GPIO.PUD_UP)

              while True:
              input_state = GPIO.input(6)
              if input_state == False:
              print(‘Button Pressed’)
              time.sleep(0.2)

              That worked fine. I found the module MMM-ModuleToggleButton which seemed a bit simpler and directly what wanted to do. The demo script used GPIO 6 so used default. Do i need to use a pull_down resister? Thank Thank you again! VR Anthony

              PS: Sam I looked for a link to buy you a cup of coffee, not found, but if you have one, please forward?

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

                Mr @sdetweil, I also noted the below error ? Thank you!

                [2024-09-20 16:36:07.413] [LOG] Sockets connected & modules started …
                [2024-09-20 16:36:10.523] [LOG] Launching application.
                [2024-09-20 16:36:15.920] [INFO] System information:

                SYSTEM: manufacturer: ; model: ; raspberry: undefined; virtual: false

                OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.47+rpt-rpi-v8

                VERSIONS: electron: 31.1.0; used node: 20.14.0; installed node: 22.9.0; npm: 10.8.3; pm2: 5.4.1

                OTHER: timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined

                [2024-09-20 16:36:20.989] [ERROR] Whoops! There was an uncaught exception…
                [2024-09-20 16:36:21.019] [ERROR] Error: EINVAL: invalid argument, write
                at Object.writeFileSync (node:fs:2346:20)
                at exportGpio (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_modules/onoff/onoff.js:18:8)
                at new Gpio (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_modules/onoff/onoff.js:172:36)
                at Class.socketNotificationReceived (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_helper.js:20:22)
                at Socket. (/home/awwbaker/MagicMirror/js/node_helper.js:98:11)
                at Socket.emit (node:events:519:28)
                at Socket.emitUntyped (/home/awwbaker/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
                at /home/awwbaker/MagicMirror/node_modules/socket.io/dist/socket.js:704:39
                at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
                errno: -22,
                code: ‘EINVAL’,
                syscall: ‘write’
                }
                [2024-09-20 16:36:21.022] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                [2024-09-20 16:36:21.027] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues
                [2024-09-20 16:36:21.066] [LOG] Create new calendarfetcher for url: http://p134-caldav.icloud.com/published/2/ODY3MDc3ODQxODY3MDc3OIsPCPqyTd7gfFTuhUgnU3E8veSROaMD9lC0bXMqbeTrcdUcRFgL2q0GROkcc6XtdbepSRYxUGbDtoDb3se2UkE - Interval: 604800000
                [2024-09-20 16:36:21.372] [LOG] Create new calendarfetcher for url: http://p134-caldav.icloud.com/published/2/ODY3MDc3ODQxODY3MDc3OIsPCPqyTd7gfFTuhUgnU3HnE0ZEnCaHErJrwvkzJ3o- -

                S 1 Reply Last reply Reply Quote 0
                • S Do not disturb
                  sdetweil @awwbaker
                  last edited by

                  @awwbaker ps: i don’t accept coffee etc. i do this because i truly enjoy it.
                  i love the challenge, the great people here, and the fascinatingly huge amount of differences among all your designs.

                  Sam

                  How to add modules

                  learning how to use browser developers window for css changes

                  1 Reply Last reply Reply Quote 1
                  • S Do not disturb
                    sdetweil @awwbaker
                    last edited by

                    @awwbaker on the write

                    see second post here

                    https://forums.raspberrypi.com/viewtopic.php?t=367431

                    Sam

                    How to add modules

                    learning how to use browser developers window for css changes

                    A 1 Reply Last reply Reply Quote 0
                    • A Offline
                      awwbaker @sdetweil
                      last edited by

                      Dear Mr @sdetweil
                      I think you are teaching me to fish…Did you see the error message below? Beyond the below, I booted the RPI 3B+, ran the “pinctrl set 6 op dl” command. Started MM and as previously the expected modules were hidden on start up. Pressing pushbutton did not have any affect on the display. I ran the button.py script and the button was sensed as previous. As your time permits I could use another push. Your efforts are VERY appreciated. VR Anthony Baker

                      2024-09-21 13:33:31.232] [LOG] Connecting socket for: MMM-MktIndex
                      [2024-09-21 13:33:31.234] [LOG] Sockets connected & modules started …
                      [1856:0921/133334.081312:ERROR:object_proxy.cc(576)] Failed to call method: org.freedesktop.DBus.StartServiceByName: object_path= /org/freedesktop/DBus: org.freedesktop.DBus.Error.NoReply: Did not receive a reply. Possible causes include: the remote application did not send a reply, the message bus security policy blocked the reply, the reply timeout expired, or the network connection was broken.
                      [2024-09-21 13:33:35.622] [LOG] Launching application.
                      [2024-09-21 13:33:55.076] [INFO] System information:

                      SYSTEM: manufacturer: ; model: ; raspberry: undefined; virtual: false

                      OS: platform: linux; distro: Debian GNU/Linux; release: 12; arch: arm64; kernel: 6.6.47+rpt-rpi-v8

                      VERSIONS: electron: 31.1.0; used node: 20.14.0; installed node: 22.9.0; npm: 10.8.3; pm2:

                      OTHER: timeZone: America/New_York; ELECTRON_ENABLE_GPU: undefined

                      [2024-09-21 13:33:58.321] [ERROR] Whoops! There was an uncaught exception…
                      [2024-09-21 13:33:58.343] [ERROR] Error: EINVAL: invalid argument, write
                      at Object.writeFileSync (node:fs:2346:20)
                      at exportGpio (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_modules/onoff/onoff.js:18:8)
                      at new Gpio (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_modules/onoff/onoff.js:172:36)
                      at Class.socketNotificationReceived (/home/awwbaker/MagicMirror/modules/MMM-ModuleToggleButton/node_helper.js:20:22)
                      at Socket. (/home/awwbaker/MagicMirror/js/node_helper.js:98:11)
                      at Socket.emit (node:events:519:28)
                      at Socket.emitUntyped (/home/awwbaker/MagicMirror/node_modules/socket.io/dist/typed-events.js:69:22)
                      at /home/awwbaker/MagicMirror/node_modules/socket.io/dist/socket.js:704:39
                      at process.processTicksAndRejections (node:internal/process/task_queues:77:11) {
                      errno: -22,
                      code: ‘EINVAL’,
                      syscall: ‘write’
                      }
                      [2024-09-21 13:33:58.345] [ERROR] MagicMirror² will not quit, but it might be a good idea to check why this happened. Maybe no internet connection?
                      [2024-09-21 13:33:58.347] [ERROR] If you think this really is an issue, please open an issue on GitHub: https://github.com/MagicMirrorOrg/MagicMirror/issues
                      [1976:0921/133401.533219:ERROR:gl_utils.cc(424)] [.WebGL-0x34004b5b00]GL Driver Message (OpenGL, Performance, GL_CLOSE_PATH_NV, High): GPU stall due to ReadPixels
                      [2024-09-21 13:34:01.636] [LOG] Create new calendarfetcher for url: http://p134-caldav.icloud.com/published/2/ODY3MDc3ODQxODY3MDc3OIsPCPqyTd7gfFTuhUgnU3E8veSROaMD9lC0bXMqbeTrcdUcRFgL2q0GROkcc6XtdbepSRYxUGbDtoDb3se2UkE - Interval: 604800000

                      S 1 Reply Last reply Reply Quote 0
                      • S Do not disturb
                        sdetweil @awwbaker
                        last edited by sdetweil

                        @awwbaker i am on my phone, i can’t edit, and it wants to quote whole thing .

                        the os has changed the rules

                        i posted a response the other day to a topic that had some workarounds without coding changes

                        Sam

                        How to add modules

                        learning how to use browser developers window for css changes

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