MagicMirror Forum

    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unsolved
    • Solved
    • MagicMirror² Repository
    • Documentation
    • Donate
    • Discord

    UNSOLVED MMM-buttons help/advice to turn multiple modules on/off

    Troubleshooting
    1
    1
    321
    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.
    • J
      johp778 last edited by

      Hi All

      I want to add the ability to press a button to hide all modules except google photos and vice versa, (working as a digital photo frame instead of a mirror) and I was trying to use the MMM-buttons module to send commands for MMM-Remote-Control (which is working from my browser), however it seems to keep throwing up the error with the usual create a config msg when I have even 1 button enabled.

      First question is reference my button setup, I currently have 1 button setup in pull_down (as in below pic), it’s setup on pin 24, as in the MMM-buttons example, however I’m now having second thoughts on if this is the right setup?

      0_1573248589754_8b57bf95-1be7-4d77-bba4-3781fb7bff29-image.png

      It’s been a while since I did anything with my Pi, so the previous testing of buttons, switches, leds etc I’ve mostly forgotten and I couldn’t find a python script to test the button in pull_down, however I’m pretty sure it’s the config that’s wrong at this stage.

      I have tried editing the buttons config several times & lost track of what I have and haven’t done, so I went back to the original config code and commented out the 2nd button, but no matter what I try it doesn’t work, so here’s the code

      code{
                                      module: 'MMM-Buttons',
                                      config: {
                                      buttons: [
                                      {
                                              pin: 24,
                                              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",_text
                                                    //payload: {action: "SHUTDOWN"}
                                      //},
                                              //shortPress: undefined
                                      //}
                                      ]                                                                                                                                                               
                              }
                              },
      

      Any help/advice appreciated

      P.s I was originally wanting to use voice commands to my echo to do it, but the only one I found to do what I want was MMM-AlexaOnOff & it appears that’s got issues due to a change around wemo protocol, but if anyone has an option to make this work instead of a button, I’m open to considering that idea.

      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 Paul-Vincent Roll and Rodrigo Ramírez Norambuena.
      This forum is using NodeBB as its core | Contributors
      Contact | Privacy Policy