catgiggle / OctoPrint-GpioControl

GNU Affero General Public License v3.0
24 stars 14 forks source link

Buttons are not working with orangepi #43

Open Antxon35 opened 2 years ago

Antxon35 commented 2 years ago

I use Octoprint with an Orange Pi Win plus (instead of a raspberry Pi). So instead of RPi.GPIO library I Changed to OPi.GPIO. Pinout should be the same as raspberry pi.

Plugin installs and you can configure it. However buttons are disabled and don't work. Internal error 500 is shown on the webbrowser console.

Should I change anything else? what could cause this?

According the log:

2022-02-06 13:38:47,995 - octoprint.plugin - ERROR - Error while calling plugin gpiocontrol OSError: [Errno 16] Device or resource busy

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/OPi/GPIO.py", line 472, in setup sysfs.export(pin) File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/OPi/sysfs.py", line 38, in export fp.write(str(pin)) OSError: [Errno 16] Device or resource busy

During handling of the above exception, another exception occurred:

OSError: [Errno 22] Invalid argument

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/octoprint/plugin/init.py", line 271, in call_plugin result = getattr(plugin, method)(*args, *kwargs) File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/octoprint/util/init.py", line 1737, in wrapper return f(args, **kwargs) File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/octoprint_gpiocontrol/init.py", line 109, in on_after_startup GPIO.setup(pin, GPIO.OUT) File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/OPi/GPIO.py", line 477, in setup sysfs.unexport(pin) File "/home/user/OctoPrint/venv/lib/python3.8/site-packages/OPi/sysfs.py", line 45, in unexport fp.write(str(pin)) OSError: [Errno 22] Invalid argument