@sdetweil thanks very much Sam - I will try that
Read the statement by Michael Teeuw here.
Latest posts made by matyldatait
-
RE: struggle with MMM-Remote-Control and MMM-Buttons
-
RE: struggle with MMM-Remote-Control and MMM-Buttons
@sdetweil yes it is - I also tried both numbering schemes to be sure
-
RE: struggle with MMM-Remote-Control and MMM-Buttons
So, figured I could try reinstalling MMM-Buttons. I get this output on attempting to install. Gibberish tome :(
matylda@raspberrypi:~/MagicMirror $ cd MMM-Buttons/
matylda@raspberrypi:~/MagicMirror/MMM-Buttons $ npm install
npm WARN deprecated har-validator@5.1.5: this library is no longer supported
npm WARN deprecated uuid@3.4.0: Please upgrade to version 7 or higher. Older versions may use Math.random() in certain circumstances, which is known to be problematic. See https://v8.dev/blog/math-random for details.
npm WARN deprecated request@2.88.2: request has been deprecated, see https://github.com/request/request/issues/3142
npm WARN deprecated electron-rebuild@1.11.0: Please use @electron/rebuild moving forward. There is no API change, just a package name changeMagic-Mirror-Module-Buttons@1.0.0 postinstall
node_modules/.bin/electron-rebuild -e …/…/node_modules/electronAn unhandled error occurred inside electron-rebuild
Unable to find electron’s version number, either install it or specify an explicit versionError: Unable to find electron’s version number, either install it or specify an explicit version
at /home/matylda/MagicMirror/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:87:19
at Generator.next ()
at fulfilled (/home/matylda/MagicMirror/MMM-Buttons/node_modules/electron-rebuild/lib/src/cli.js:6:58)
npm ERR! code 255
npm ERR! path /home/matylda/MagicMirror/MMM-Buttons
npm ERR! command failed
npm ERR! command sh -c – node_modules/.bin/electron-rebuild -e …/…/node_modules/electronnpm ERR! A complete log of this run can be found in:
npm ERR! /home/matylda/.npm/_logs/2023-02-16T04_32_03_500Z-debug-0.log -
RE: struggle with MMM-Remote-Control and MMM-Buttons
@sdetweil having established that the button is working as connected on pin18,I simplified the button module usage in my config to this:
module: 'MMM-Buttons', //use GPIO numbers config: { buttons: [ { pin: 18, name: "test", shortPress: {message: "button pressed"} }, ] },
Still nothing. No message in my terminal or on mirror screen.
-
RE: struggle with MMM-Remote-Control and MMM-Buttons
@sdetweil good idea as a first step debugging. This scrip suggested doing it with button connected between a GPIO pin and ground:
http://razzpisampler.oreilly.com/ch07.html
…and yes - that works
-
struggle with MMM-Remote-Control and MMM-Buttons
Hi there.
Beginner here. I’m finding it a very steep learning curve. I just want a pushbutton (GPIO) to hide/show a module. I thought it would be simple.
Trawling the forums led me to believe that I can use MMM-Buttons and MMM-Remote-Control. I dont need remote-control through a web interface,but it seemed like the module would still be useful for handling notifications.
Sorry if this is a bit idiotic - like I said - steep learning curve
So far I have installed both modules and have this is my config.js:
{ module: 'MMM-Remote-Control', // uncomment the following line to show the URL of the remote control on the mirror position: 'bottom_left', // you can hide this module afterwards from the remote control itself config: { customCommand: {}, // Optional, See "Using Custom Commands" below showModuleApiMenu: true, // Optional, Enable the Module Controls menu secureEndpoints: true, // Optional, See API/README.md // uncomment any of the lines below if you're gonna use it //customMenu: "custom_menu.example.json", // Optional, See "Custom Menu Items" below // apiKey: "", // Optional, See API/README.md for details // classes: {} // Optional, See "Custom Classes" below } }, { module: 'MMM-Buttons', //using GPIO numbers config: { buttons: [ { pin: 25, name: "compliments_visibility", longPress: { notification: "REMOTE_ACTION", payload: {action: "HIDE", module: "compliments"} }, shortPress: { notification: "REMOTE_ACTION", payload: {action: "SHOW", module: "compliments"} } }, { pin: 7, name: "monitor_control", longPress: { notification: "REMOTE_ACTION", payload: {action: "MONITOROFF"} }, shortPress: { notification: "REMOTE_ACTION", payload: {action: "MONITORON"} } }, { pin: 24, name: "power", longPress: { title: "Power off", message: "Keep pressed for 3 seconds to shut down", imageFA: "power-off", notification: "REMOTE_ACTION", payload: {action: "SHUTDOWN"} }, shortPress: undefined } ] } },