04-22-2024, 07:38 PM
(This post was last modified: 04-22-2024, 07:56 PM by m4th31st.
Edit Reason: smily :)
)
I found a solution. The "problem" is that GPIO pins are always configured as pull-up in the software. This is also clearly stated in point 3 on the GPIO control configuration page
So I changed line 59 in /var/www/daemon/gpio_buttons.py from
to
Now that I have the solution, I think I remember having the same problem a couple of years ago, but I just forgot how to fix it. Anyway, it would be nicer to be able to do this on the config page, because I have the change the source code after every update, which I just forget to do, apparently...

So I changed line 59 in /var/www/daemon/gpio_buttons.py from
Code:
GPIO.setup(sw_1_pin, GPIO.IN, pull_up_down=GPIO.PUD_UP)
Code:
GPIO.setup(sw_1_pin, GPIO.IN, pull_up_down=GPIO.PUD_DOWN)
Now that I have the solution, I think I remember having the same problem a couple of years ago, but I just forgot how to fix it. Anyway, it would be nicer to be able to do this on the config page, because I have the change the source code after every update, which I just forget to do, apparently...