You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Just installed HX711 on Raspberry Pi 4 and successfully tested it using example.py from the hx711py library after editing script to use 20 & 21. Installed your plugin in OctoPrint, but always shows "Loading" in console. If I tear it in plugin config, it goes to 0g, but never shows any measurements.
Looked in octoprint.log and found the below:
2022-01-21 09:25:23,202 - octoprint.plugin - ERROR - Error while calling plugin filament_scale
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/plugin/__init__.py", line 271, in call_plugin
result = getattr(plugin, method)(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint/util/__init__.py", line 1737, in wrapper
return f(*args, **kwargs)
File "/home/pi/oprint/lib/python3.7/site-packages/filament_scale_enhanced/__init__.py", line 50, in on_startup
self.hx = HX711(20, 21)
File "/home/pi/oprint/lib/python3.7/site-packages/filament_scale_enhanced/hx711.py", line 27, in __init__
GPIO.setmode(GPIO.BCM)
ValueError: A different mode has already been set!
Not a Python expert, but seems there's a conflict setting the mode as GPIO.BCM perhaps after a recent OP update? What may be done to address this?
UPDATE: Did see that another plugin, LED Strip Control; sets GPIO.BOARD which may be the conflict. That plugin works, though; and is used. Would potential fix be as easy as changing "GPIO.BCM" to "GPIO.BOARD" in hx711.py, then changing the 20, 21 values in init.py to board pin numbers? (In middle of long print currently, so can't test.)
Thank You
The text was updated successfully, but these errors were encountered:
The underlying issue and fix is described in #17 (along with #18) - The problem is that it's fixed to one type. So this would be currently incompatible with LED Strip Control. Switching it would likely make it incompatible with things that use GPIO.BCM. Now you could hack in a change to get it working for you and report back.
I've been getting back into 3D printing, so I'll take a look at fixing my sensor and seeing how much it would take to clean up the config.
Good Morning -
Just installed HX711 on Raspberry Pi 4 and successfully tested it using example.py from the hx711py library after editing script to use 20 & 21. Installed your plugin in OctoPrint, but always shows "Loading" in console. If I tear it in plugin config, it goes to 0g, but never shows any measurements.
Looked in octoprint.log and found the below:
Not a Python expert, but seems there's a conflict setting the mode as GPIO.BCM perhaps after a recent OP update? What may be done to address this?
UPDATE: Did see that another plugin, LED Strip Control; sets GPIO.BOARD which may be the conflict. That plugin works, though; and is used. Would potential fix be as easy as changing "GPIO.BCM" to "GPIO.BOARD" in hx711.py, then changing the 20, 21 values in init.py to board pin numbers? (In middle of long print currently, so can't test.)
Thank You
The text was updated successfully, but these errors were encountered: