Read the statement by Michael Teeuw here.
Problems building opengpio when installing the MMM-GPIO-Notifications module
-
Hi all,
I want to have the
MMM-GPIO-Notificationmodule 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 installfails 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 theMMM-GPIO-Notificationpackage.jsonopengpiodependency from~1.0.13to~2.0.1
npm installnow 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
forceInfoFileUsageoption.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: 17config.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-NotificationsoropengpioI can perhaps switch on?Thanks in advance for any other info or suggestions.
~Queasy…
-
@Queasy generally you would open an issue on the module GitHub page to engage the module author
-
@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
