Skip to content
This repository was archived by the owner on Mar 3, 2026. It is now read-only.
This repository was archived by the owner on Mar 3, 2026. It is now read-only.

GPIO inputs not working with latest Octoprint #510

@StoneAgeSkillz

Description

@StoneAgeSkillz

I'm running latest Octoprint on Rpi4. Fresh instalation of Octoprint, once with, once without backup restoration. Ame issue every time, GPIO inpust dont work:

Log from instalation without backup, one button and output setup:

2025-10-30 11:48:56,191 - octoprint.plugins.enclosure - INFO - Setting GPIO mode to BCM
2025-10-30 11:48:56,192 - octoprint.plugins.enclosure - INFO - Setting GPIO pin 4 as OUTPUT with initial value: 1
2025-10-30 11:48:56,192 - octoprint.plugins.enclosure - INFO - Adding GPIO event detect on pin 22 with edge: 32
2025-10-30 11:48:56,193 - octoprint.plugins.enclosure - WARNING - An exception of type RuntimeError occurred on log_error. Arguments:
('Failed to add edge detection',)
Traceback (most recent call last):
File "/opt/octopi/oprint/lib/python3.11/site-packages/octoprint_enclosure/init.py", line 1725, in configure_gpio
GPIO.add_event_detect(gpio_pin, edge, callback=self.handle_gpio_control, bouncetime=200)
RuntimeError: Failed to add edge detection

Log output from restored backup:

2025-10-30 10:58:26,602 - octoprint.plugins.enclosure - WARNING - An exception of type RuntimeError occurred on log_error. Arguments:
('Failed to add edge detection',)
Traceback (most recent call last):
File "/opt/octopi/oprint/lib/python3.11/site-packages/octoprint_enclosure/init.py", line 1725, in configure_gpio
GPIO.add_event_detect(gpio_pin, edge, callback=self.handle_gpio_control, bouncetime=200)
RuntimeError: Failed to add edge detection
2025-10-30 10:58:26,605 - octoprint.plugins.announcements - DEBUG - Loaded channel _octopi from cache at /home/martin/.octoprint/data/announcements/_octopi.cache
2025-10-30 10:58:26,615 - octoprint.plugins.enclosure - WARNING - An exception of type RuntimeError occurred on log_error. Arguments:
('You must setup() the GPIO channel first',)
Traceback (most recent call last):
File "/opt/octopi/oprint/lib/python3.11/site-packages/octoprint_enclosure/init.py", line 1818, in handle_initial_gpio_control
if (rpi_input['edge'] == 'fall') ^ GPIO.input(gpio_pin):
^^^^^^^^^^^^^^^^^^^^
RuntimeError: You must setup() the GPIO channel first

I think its the new Python, i2c OLED and Filament Scale stopped working too.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions