Read the statement by Michael Teeuw here.
Buttons only work if I access via python first
-
I’ve had this problem for a while and I’m not sure how to fix it.
I’m using MMM-Buttons to switch between scenes from MMM-Scenes and it’s working. However, it only works if I first use a little python test program I have to test the buttons. Why? I don’t even have to actually press a button, just run the python and then exit. After that, the buttons work.I thought I posted this before but can’t find it. I apologize if this is a duplicate.
Python:
import RPi.GPIO as GPIO import time GPIO.setmode(GPIO.BCM) GPIO.setup(25, GPIO.IN, pull_up_down=GPIO.PUD_UP) GPIO.setup(24, GPIO.IN, pull_up_down=GPIO.PUD_UP) while True: input_state25 = GPIO.input(25) input_state24 = GPIO.input(24) if input_state25 == False: print('Button Pressed 25') time.sleep(0.2) if input_state24 == False: print('Button Pressed 24') time.sleep(0.2) -
@gonzonia
A few modules have similar names; which one are you using exactly? -
@MMRIZE Sorry for the delay I missed your response.
I’m using https://github.com/Jopyth/MMM-Buttons but happy to switch if there’s something better.
I’m using it to switch scenes in MMM-Scenes by sending “SCENES_NEXT” or “SCENES_PREV”
-
@gonzonia
Is your issue solved? -
Oh, I’m realized I’m not actually using https://github.com/sdetweil/MMM-Buttons to fix the install issues
-
@MMRIZE No. I still need to run my little test script to get the buttons to work. It’s not a huge deal, I just wonder why that’s the case.
-
@gonzonia
Sorry, I read the module but found nothing suspicious in that. The module and its dependencies look normal. ATM, I cannot guess the issue. -
Hello! It looks like you're interested in this conversation, but you don't have an account yet.
Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.
With your input, this post could be even better 💗
Register Login