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.

    Problems building opengpio when installing the MMM-GPIO-Notifications module

    Scheduled Pinned Locked Moved Unsolved Troubleshooting
    3 Posts 3 Posters 20 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.
    • Q Offline
      Queasy
      last edited by

      Hi all,

      I want to have the MMM-GPIO-Notification module send notifications when a Pi GPIO pin goes high.

      I have GPIO pin 17 (Pi connector pin 11) with a 10k pull down, resistor and see it go from 0v to 3.255v when the switch is closed.

      I followed the setup instructions here https://github.com/Tom-Hirschberger/MMM-GPIO-Notifications (not docker), but npm install fails with the same errors that are discussed here:
      https://github.com/ExpeditionExploration/opengpio/issues/37 .

      The issue was fixed in opengpio v2.0.1. As an experiment I changed the MMM-GPIO-Notification package.json opengpio dependency from ~1.0.13 to ~2.0.1
      npm install now runs without error (it also built with opengpio v2.0.0 which surprised me)

      When I close the switch, I don’t see any indication in the server logs or MMM-ViewNotifications that any notifications were sent, but I’m not sure if it’s because I have the Pi/MM set up incorrectly, or because it’s not the right version opengpio :(

      I tried both with and without the forceInfoFileUsage option.

      Server startup::

      [LOG]   Loading config ... 
      [LOG]   config template file not exists, no envsubst 
      [INFO]  Checking config file MagicMirror/config/config.js ... 
      [INFO]  Your configuration file doesn't contain syntax errors :) 
      [INFO]  Checking modules structure configuration ... 
      [INFO]  Your modules structure configuration doesn't contain errors :) 
      [LOG]   Loading module helpers ... 
      [LOG]   No helper found for module: alert. 
      [LOG]   No helper found for module: clock. 
      [LOG]   Initializing new module helper ... 
      [LOG]   Module helper loaded: calendar 
      [LOG]   No helper found for module: weather. 
      [LOG]   No helper found for module: MMM-ViewNotifications. 
      [LOG]   Initializing new module helper ... 
      [LOG]   Initializing new module helper ... 
      [LOG]   Module helper loaded: MMM-GPIO-Notifications 
      [LOG]   All module helpers loaded. 
      [LOG]   Starting server on port 8080 ...  
      [LOG]   Server started ... 
      [LOG]   Connecting socket for: calendar 
      [LOG]   Starting node helper for: calendar 
      [LOG]   Connecting socket for: MMM-GPIO-Notifications 
      [LOG]   Sockets connected & modules started ... 
      [LOG]   Launching application. 
      [INFO]  
      ####  System Information  ####
      SYSTEM:   manufacturer: Raspberry Pi Foundation; model: Raspberry Pi 3 Model B Rev 1.2; virtual: false; MM: 2.33.0
      OS:       platform: linux; distro: Debian GNU/Linux; release: 13; arch: arm64; kernel: 6.12.47+rpt-rpi-v8
      VERSIONS: electron: 38.1.2; used node: 22.19.0; installed node: 25.1.0; npm: 11.6.2; pm2: 6.0.13
      ENV:      XDG_SESSION_TYPE: wayland; MM_CONFIG_FILE: undefined
                  WAYLAND_DISPLAY:  wayland-0; DISPLAY: :0; ELECTRON_ENABLE_GPU: undefined
      RAM:      total: 906.04 MB; free: 405.40 MB; used: 500.64 MB
      OTHERS:   uptime: 225 minutes; 
      [LOG]   MMM-GPIO-Notifications: Using naming schema Default 
      [LOG]   Force use of GPIO info file is configured. Using the information of gpioinfo.json instead of a specific device!
      [LOG]   MMM-GPIO-Notifications: Trying to registering pin: 17 
      [LOG]   MMM-GPIO-Notifications: Using chip (0) and line (17) info of GPIO17 
      [LOG]   MMM-GPIO-Notifications: Watched pin: 17 has low state delay of 1000! 
      [LOG]   MMM-GPIO-Notifications: Watched pin: 17 has high state delay of 1000! 
      [LOG]   MMM-GPIO-Notifications: Successfully registered pin: 17
      

      config.js:

      {
      	module: 'MMM-ViewNotifications',
      	position: "top_right",
      	header: 'Notifications',
      	config: {
      		timeout: 20,
      		format: '{time}: "{module}" sent "{notification}" with {payloadData}',
      		includeModules: ["MMM-GPIO-Notifications"]
      	}
      },	
      {
      	module: 'MMM-GPIO-Notifications',
      	config: {
      		'17': {
      			delay: 1000,
      			notifications_high: [
      				{
      					notification: 'TEST_NOTIFICATION',
      					payload: {}
      				},
      			]
      		}
      	}
      },
      

      Is there any kind of extra logging for MMM-GPIO-Notifications or opengpio I can perhaps switch on?

      Thanks in advance for any other info or suggestions.

      ~Queasy…

      S wishmaster270W 2 Replies Last reply Reply Quote 0
      • S Offline
        sdetweil @Queasy
        last edited by

        @Queasy generally you would open an issue on the module GitHub page to engage the module author

        Sam

        How to add modules

        learning how to use browser developers window for css changes

        1 Reply Last reply Reply Quote 0
        • wishmaster270W Offline
          wishmaster270 Module Developer @Queasy
          last edited by wishmaster270

          @Queasy Hi,

          I will try to take a closer look at the problem in the next days.
          I do not have a setup with Debian 13 at the moment and it will take me some time.
          Did not test 2.x of open gpio yet. Maybe the api changed.

          Make sure you set up the pull-up/pull-down resistor like described in this description

          https://www.raspberrypi.com/documentation/computers/config_txt.html#gpio-control

          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