waltmoorhouse / OctoPrint-Filamentstorage

OctoPrint Plugin for an Open Source Filament Storage system.
https://github.com/waltmoorhouse/FilamentBox
22 stars 4 forks source link

Python 3.6 #6

Open Brebinator opened 4 years ago

Brebinator commented 4 years ago

Ocotoprint will no longer support previous versions of python in the near future, it would be awesome if this plugin could get updated to be compatible with python 3.6.

JORATORCA commented 2 years ago

Are you planning to upgrade to Python 3.6? It would be a shame if this plugin were to be rendered useless.

umsmin commented 2 years ago

It's not needed. Load it directly from github and install it from zipfile. Then you only write in the file /home/pi/oprint/lib/python3.7/site-packages/octoprint_filamentstorage/__init__.py

after

__plugin_name__ = "Filament Storage"

the following line

__plugin_pythoncompat__ = ">=2.7,<4"

Now you can activate it after octoprint restart.

That's it.

waltmoorhouse commented 2 years ago

All, I am very pleased that others have been able to use this plugin. I have mostly switched to Resin printing now, so am not using this anymore, and I have other projects that are more urgent for me now. If someone would like to submit the Pull Request with the changed code, I will gladly review and merge it, but I do not have the time to write it myself.

Thanks, Walt

umsmin commented 2 years ago

Am sorry but I never made a pull request.

krc commented 2 years ago

I will look into this

JORATORCA commented 2 years ago

Thank you very much for your answer. Have you been able to get it to work with the Octoprint version with Python> 3?

De: Uli Manz @.> Enviado el: sábado, 18 de diciembre de 2021 23:08 Para: waltmoorhouse/OctoPrint-Filamentstorage @.> CC: JORATORCA @.>; Comment @.> Asunto: Re: [waltmoorhouse/OctoPrint-Filamentstorage] Python 3.6 (#6)

Am sorry but I never made a pull request.

— Reply to this email directly, view it on GitHub https://github.com/waltmoorhouse/OctoPrint-Filamentstorage/issues/6#issuecomment-997291399 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3PSZVWKXB32YUZ472VXRLURUA4ZANCNFSM4MW4DXZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you commented. https://github.com/notifications/beacon/AF3PSZWUS6UVZLF7PFPDG2TURUA4ZA5CNFSM4MW4DXZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHNYXLBY.gif Message ID: @. @.> >

JORATORCA commented 2 years ago

Thanks for your answer Walt. I have no experience with Python, but since my project hardware (dry box, scales, etc.) was quite advanced when I discovered the incompatibility of your plugin with current versions of Octoprint, I tried updating your code. I have created a new branch on your code that I have managed to open in the latest version of Octoprint, but I have not been able to get serial communication to work. I do not know how to provide you with the code that I have edited so that you can review the existing problem with serial communication. Any help is welcome.

Thanks

José Ramón

De: Walt Moorhouse @.> Enviado el: sábado, 18 de diciembre de 2021 21:57 Para: waltmoorhouse/OctoPrint-Filamentstorage @.> CC: JORATORCA @.>; Comment @.> Asunto: Re: [waltmoorhouse/OctoPrint-Filamentstorage] Python 3.6 (#6)

All, I am very pleased that others have been able to use this plugin. I have mostly switched to Resin printing now, so am not using this anymore, and I have other projects that are more urgent for me now. If someone would like to submit the Pull Request with the changed code, I will gladly review and merge it, but I do not have the time to write it myself.

Thanks, Walt

— Reply to this email directly, view it on GitHub https://github.com/waltmoorhouse/OctoPrint-Filamentstorage/issues/6#issuecomment-997283673 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3PSZWXA45UXPQE5KI4BV3URTYQ7ANCNFSM4MW4DXZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you commented. https://github.com/notifications/beacon/AF3PSZQ7KCNKHZOHVESHSTLURTYQ7A5CNFSM4MW4DXZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHNYVOWI.gif Message ID: @. @.> >

JORATORCA commented 2 years ago

Thanks Ulli. So far I have come. I managed to open the plugin in the latest version of Octoprint, but the serial communication does not work and I am not sure what to do to solve it.

Thanks

José Ramón

De: Uli Manz @.> Enviado el: sábado, 18 de diciembre de 2021 21:12 Para: waltmoorhouse/OctoPrint-Filamentstorage @.> CC: JORATORCA @.>; Comment @.> Asunto: Re: [waltmoorhouse/OctoPrint-Filamentstorage] Python 3.6 (#6)

It's not needed. Load it directly from github and install it from zipfile. Then you only write in the file /home/pi/oprint/lib/python3.7/site-packages/octoprint_filamentstorage/init.py

after

__plugin_name__ = "Filament Storage"

the following line

__plugin_pythoncompat__ = ">=2.7,<4"

Now you can activate it after octoprint restart.

That's it.

— Reply to this email directly, view it on GitHub https://github.com/waltmoorhouse/OctoPrint-Filamentstorage/issues/6#issuecomment-997278730 , or unsubscribe https://github.com/notifications/unsubscribe-auth/AF3PSZVJJNUHMVUWWH6T23TURTTIBANCNFSM4MW4DXZA . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&referrer=utm_campaign%3Dnotification-email%26utm_medium%3Demail%26utm_source%3Dgithub . You are receiving this because you commented. https://github.com/notifications/beacon/AF3PSZU3TE5S55OPOVS7MRTURTTIBA5CNFSM4MW4DXZKYY3PNVWWK3TUL52HS4DFVREXG43VMVBW63LNMVXHJKTDN5WW2ZLOORPWSZGOHNYUICQ.gif Message ID: @. @.> >

JORATORCA commented 2 years ago

I managed to establish serial communication with my Arduino MEGA 2560 by modifying this part of Connection.py baselist = baselist \

JORATORCA commented 2 years ago

Any idea why I can't see the values that Arduino sends in the octoprint window? I know that I am connected to the Arduino through the serial connection because I see it in the octoprint.log and because if I connect annually through the printer connection commands selecting the corresponding serial port and the communication speed I see in the Terminal the data string sent by the Arduino, but the boxes corresponding to temperature, humidity, weights, etc. are not refreshed. All remain blank. Best regards

JORATORCA commented 2 years ago

I was finally able to find out why the data was not displayed on the Octoprint screen. For some unknown reason, in the module filamentstorage.css the property! Important assigned to the background color "covered" the text. After some tests with other colors and removing the! Important property I was able to visualize the data that came from the Arduino. Greetings

waltmoorhouse commented 2 years ago

I was finally able to find out why the data was not displayed on the Octoprint screen. For some unknown reason, in the module filamentstorage.css the property! Important assigned to the background color "covered" the text. After some tests with other colors and removing the! Important property I was able to visualize the data that came from the Arduino. Greetings

Awesome! Glad you were able to fix it. If you would like to create a branch and push up a PR with your changes, I will merge them in so other people can use it.

JORATORCA commented 2 years ago

I will try to do it (I am new to this and I don't do much on Github). I'm adding a few more changes to use it with 5 reels instead of 4. I have a question for you. I don't really know what the parameters that are entered from the Arduino through the encoders are for or how the whole part of the extrusion monitor works. Could you explain its basic operation to me?

waltmoorhouse commented 2 years ago

Sorry I don't have more time to help you now, but here is a tutorial for how to create a PR. https://opensource.com/article/19/7/create-pull-request-github Let me know if you have and questions.

As for your question... The extrusion monitor works by wrapping the filament around a wheel, so when the filament is pulled from the box, the wheel turns. The wheel is attached to a rotary encoder than counts the rotations. The parameters are so that if you use a different wheel, you can change the number of mm per rotation.

The GCODE says to extrude 5mm of filament, so it will report to the plugin that it pulled 5mm. The plugin looks at the rotary encoder and says, ok, I see the wheel moved 5mm worth of filament so we're good. But lets say the filament breaks for some reason, so your filament detector still say it has filament, but it isn't pulling any from the box. At this point the box will detect the wheel is not moving even though the GCODE says it should be. when it hits the configured threshold it should pause the print and allow you to fix the issue before the printer starts printing without filament. I hope that helps.

Walt

JORATORCA commented 2 years ago

Walt, Excellent. Thank you very much. One last question. What are the potentiometers that regulate tolerance for? What is your function?