• Recent
  • Tags
  • Unsolved
  • Solved
  • MagicMirror² Repository
  • Documentation
  • 3rd-Party-Modules
  • Donate
  • Discord
  • Register
  • Login
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.

MMM-Buttons only working with the first button

Scheduled Pinned Locked Moved Unsolved Troubleshooting
5 Posts 4 Posters 1.2k 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.
  • T Offline
    tomXGames
    last edited by tomXGames Sep 21, 2019, 11:11 AM Sep 21, 2019, 7:35 AM

    Hi!

    I set up MMM-Buttons with one button attached to pin 17. It all worked just fine.
    But now I want to have five buttons, so I attached another four. These don’t work, only the first one…

    I’ve configured the module like this:

    
    			{
    
    			    module: 'MMM-Buttons',
    
    			    config: {
    
    			        buttons: [
    
    			            {
    
    			                pin: 17,
    
    			                name: "Tom",
    
    			                shortPress: {
    
    			                    notification: "CURRENT_PROFILE",
    
    			                    payload: "Tom"
    
    			                },
    
    
    
    			            },
    					{
    
    			                pin: 27,
    
    			                name: "Alice",
    
    			                shortPress: {
    
    			                    notification: "CURRENT_PROFILE",
    
    			                    payload: "Alice"
    
    			                },
    
    
    
    			            },
    					{
    
    			                pin: 22,
    
    			                name: "default",
    
    			                shortPress: {
    
    			                    notification: "CURRENT_PROFILE",
    
    			                    payload: "default"
    
    			                },
    
    
    
    			            },
    					{
    
    			                pin: 18,
    
    			                name: "Jimmy",
    
    			                shortPress: {
    
    			                    notification: "CURRENT_PROFILE",
    
    			                    payload: "Jimmy"
    
    			                },
    
    
    
    			            },
    					{
    
    			                pin: 15,
    
    			                name: "Max",
    
    			                shortPress: {
    
    			                    notification: "CURRENT_PROFILE",
    
    			                    payload: "Max"
    
    			                },
    
    
    
    			            }
    
    
    
    			        ]
    
    			    }
    
    },
    	
    

    Thanks for helping!

    Edit: The button clicks don’t get registered…

    1 Reply Last reply Reply Quote 0
    • L Offline
      La7dan
      last edited by Nov 19, 2019, 12:48 PM

      first check you wiring and make sure you connect the circut perfictly. secondly, try to work button by button see how it goes.

      check your buttons by trying this python script on python idle
      https://raspberrypihq.com/use-a-push-button-with-raspberry-pi-gpio/
      then add your other buttons then check them if they give you the alert after that check back on magic mirror.

      1 Reply Last reply Reply Quote 0
      • B Offline
        broberg Project Sponsor
        last edited by Nov 19, 2019, 1:09 PM

        I’m not sure, but I think you have to define the longpress option for each button

        			{
        			    module: 'MMM-Buttons',
        			    config: {
        			        buttons: [
        			            {
        			                pin: 17,
        			                name: "Tom",
        			                shortPress: {
        			                    notification: "CURRENT_PROFILE",
        			                    payload: "Tom"
        			                },
                                                longPress: undefined
        			            },
        					{
        			                pin: 27,
        			                name: "Alice",
        			                shortPress: {
        			                    notification: "CURRENT_PROFILE",
        			                    payload: "Alice"
        			                },
                                               longPress: undefined
        			            },
        					{
        			                pin: 22,
        			                name: "default",
        			                shortPress: {
        			                    notification: "CURRENT_PROFILE",
        			                    payload: "default"
        			                },
                                               longPress: undefined
        			            },
        					{
        			                pin: 18,
        			                name: "Jimmy",
        			                shortPress: {
        			                    notification: "CURRENT_PROFILE",	
        		                    payload: "Jimmy"
        			                },
                                             longPress: undefined
        			            },
        					{
        			                pin: 15,
        		                        name: "Max",
        			                shortPress: {
        			                    notification: "CURRENT_PROFILE",
          		                           payload: "Max"
        			                },
                                             longPress: undefined
        			            }
        			        ]
        			    }
        },
        
        L 1 Reply Last reply Nov 19, 2019, 1:16 PM Reply Quote 0
        • L Offline
          La7dan @broberg
          last edited by Nov 19, 2019, 1:16 PM

          @broberg thats what I though also

          1 Reply Last reply Reply Quote 0
          • FoziF Offline
            Fozi Project Sponsor
            last edited by Nov 19, 2019, 4:41 PM

            Also make sure you are using a pull-down resistor with each button to avoid a floating status of the GPIO pin. I currently have no link at hand, but if you search the forum or Google you‘ll find a scheme how wire the pull-down.

            HowTo: Replace PIR Sensor with a RCWL-0516 Microwave Sensor

            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