Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The future of OctoPrint-Enclosure #435

Closed
hbast opened this issue Aug 30, 2021 · 53 comments
Closed

The future of OctoPrint-Enclosure #435

hbast opened this issue Aug 30, 2021 · 53 comments

Comments

@hbast
Copy link

hbast commented Aug 30, 2021

Hey @vitormhenrique, I'm currently building a case for my 3D printer and I found this plugin while putting together the software. I am confused about the status of the plugin. I don't see any real progress in development since some time. In the Octoprint plugin manager, version 4.13.1 is current; however, this does not appear to exist in this repository - or I'm blind ;). There is only 4.12. In addition, some pull requests are open with new features, such as connection of new sensors, or graphical functionalities, which are not processed / incorporated. I need the integration of BME688, which is interface compatible wiht BME680... I could help testing and integrating the PR.

For me, the question is whether it is worth using this plugin, or to realize the control of my 3D printer enclosure in another way. Where are there problems? How can the community contribute to revive and develop the plugin. What does the roadmap look like?

@stephenfeather
Copy link

Same here. With anything other than PLA, need to test AQ inside enclosures.
Also adding a laser head which gives off contaminants as it burns.

@hbast maybe a fork is in order if you don't get an answer soon (its been a week)

@6ffm70
Copy link

6ffm70 commented Oct 11, 2021

@hbast, I'm with @stephenfeather

@foosel
Copy link

foosel commented Oct 12, 2021

Hi, project lead of OctoPrint here. I just got made aware of an issue of this plugin with the latest 1.7.0 release, and as far as I can see there appears to be an issue with a long deprecated and now removed property, as visible in #432.

@vitormhenrique I understand that a heavy injury caused you to have to step away from this and I totally understand this and hope you've since made a good recovery. It is totally fine when priorities shift and when projects like this one fall off the side as a consequence - just a normal thing in Open Source, absolutely no harm with it! You don't owe anyone anything and you should not feel obligated to keep something alive and going that you can't or even don't want to anymore.

Given the strong interest in this particular plugin in the community however (it IS quite helpful after all) and the demand visible in this thread, I'd like to figure out if it's time to declare it as abandoned and try to find a new maintainer for it (we have an established process for this in the plugin repository, it happens!) or if there's still hope.

If I don't hear anything back here within the next 14 days from you @vitormhenrique, again, absolutely no harm done, totally understandable, but I'll then mark the plugin as abandoned and launch a call for adoption. In any case, thank you for your work!

@vitormhenrique
Copy link
Owner

vitormhenrique commented Oct 12, 2021

Hi @foosel and everyone else here!

@foosel to start, thanks for your amazing work on Octoprint...

I tried to get the ball rolling again few months ago:
#392 (comment)

Unfortunately I could not find a single person that wanted to help with the code.

So when I started this project I had ZERO experience with python... this made this plugin be very very "hacky" it required installing and configuring a lot of external libraries and the user interface sucked, this caused me to spend a lot of hours every week helping people to get the settings just right and doing free software support over the internet for people all around the world, and I really enjoined doing so... But I just don't have time to do that anymore, so now that I have been working with python for a few years, I wanted to fix the core issues with the initial implementation. But I will need some help.

I started completely rewriting this to properly support python 3 few months ago, I hate the way that i wrote this on the first place, it's way to hacky and it was my first project on python. I started a new UI for the setting screen and it is much better, follows the other screens that octoprint has.

I also wanna move away for the manual installed libraries and including circuit python as standard on the plugin.

I have a lot of pull requests open, but most of them have conflicts and I can't stop to fix those and work on the new stuff...

So here is what I propose, some of I will need help

  • Fix pull requests, and get those contributions on the master branch (need help)
  • Fix the issue with the deprecated and now removed property (i can do this this weekend)
  • NO more features added to this source code after this point (as the new code shares nothing with it)
  • Migrate to the new branch on python3, with better software architecture and ui.

@foosel
Copy link

foosel commented Oct 12, 2021

Hey, that sounds like a great roadmap. Do you want me to spread your request for help a bit wider? I could push a notification to people who have the plugin installed at the moment, and also share a link to your post on social media. Maybe that will get more attention and possible co-maintainers than a comment on a PR? :)

@vitormhenrique
Copy link
Owner

@foosel that would be great!

Any help that I can get would be very welcome.

I'm gonna create a discord server to get a little bit more organized if someone whats to volunteer.

https://discord.gg/sJQe9PmA

@jneilliii
Copy link
Contributor

Maybe this is something that @Dak0r or some of the other PR submitters would be interested in helping with?

@hbast
Copy link
Author

hbast commented Oct 12, 2021

@foosel Thanks Gina for pushing the request. I agree with you that this plugin absolutely must live on.

@vitormhenrique I have already looked a little bit at the source code in the last weeks, especially the integration of the sensors. I would be happy if I could support you to revise the sensor connection and to standardize interfaces. I already have first ideas, which makes the integration of new sensors no longer directly dependent on octoprint-enclosure. A more generic approach would create a big advantage.

I could support you with the maintenance and migration. I've been programming with Python in my spare time for a few years and already have experience with frameworks like Django.

@foosel
Copy link

foosel commented Oct 12, 2021

I've thrown up a notice and a tweet, let's see what happens.

@vitormhenrique
Copy link
Owner

@hbast I see that you joined the discord, I'll shoot you a message and we can discuss there, I also had ideas on how to improve the current code.

@mynameisbrendan
Copy link

First up - I am not a developer, so I offer no help here. Sorry!

I just happened to get the alert above in my octoprint UI at the same time as I was offered the OP update to 1.7.0. I just wanted to check if that is a coincidence, or if this thread has come about due to an incompatibility of the current version of Enclosure Plugin with OP 1.7.0?

@jneilliii
Copy link
Contributor

There is currently an issue with the current release of the Enclosure plugin and OctoPrint 1.7.0. I've submitted a PR that I believe will resolve the issue, but awaiting verification from #432.

@ni-aackerman
Copy link

ni-aackerman commented Oct 13, 2021

Maybe @wmonzel wants to help? He created a branch for Hardware PWM which is not working on master branch, and it works flawesly.

@wmonzel
Copy link

wmonzel commented Oct 13, 2021

@foosel @vitormhenrique @ni-aackerman Sure, count me in! I'm happy to help in any way I can.

@chartist1
Copy link

Hi I would be more than happy to help if I can, I am a software developer although C/C++ with a hardwire bent as well, I have a little experience with Python and am interested in this enclosure plugin, as I want to remotely control and monitor the printer and enclosure.

@ni-aackerman
Copy link

ni-aackerman commented Oct 13, 2021

Me too as well @vitormhenrique im devops engineer with some python knowledge, but willing to help

@Dylan-Gardner
Copy link

@vitormhenrique I would also volunteer to help. I have some Python experience but JavaScript is what I do in my day job

@spiff72
Copy link

spiff72 commented Oct 13, 2021

I just wanted to chime in...as I use the plugin for monitoring my Lack enclosure and controlling an exhaust fan to keep temps consitent. I am glad I read this thread prior to clicking the upgrade to 1.7.0, and I will hold off on that upgrade...

I am unqualified to help out, but as I read through this thread, it is clearly a testament to the value of open source! Kudos to all of you that are stepping up to help with this one...

@X10SIV
Copy link

X10SIV commented Oct 13, 2021

First off I want to thank you guys for making this possable for guys like me and many others. Im not very good with coding but can figure it out. Im hoping someone takes this on because I use the enclosure plugin to run my printer through my pi. So is there gonna be a new enclosure plugin?

@2211kp
Copy link

2211kp commented Oct 13, 2021

@foosel that would be great!

Any help that I can get would be very welcome.

I'm gonna create a discord server to get a little bit more organized if someone whats to volunteer.

https://discord.gg/sJQe9PmA

i currently have a working version

@gdiciocco
Copy link

I'm using the plugin on a chambered sidewinder x1, all working fine, bme280 sensors and triacs output board for heater. I'm also available for help in development (python, networking, linux, electronics, no js)

@AlexDep
Copy link

AlexDep commented Oct 15, 2021

Hi, would love to help as your plugin is so useful. I will join your discord.

@jsymonds
Copy link

I have not yet set up this plugin with my enclosure hardware, but I wanted to thank all of you for keeping octoprint-enclosure going. I really appreciate the effort everyone is making to improve this project and keep it up to date!

@MIIB1
Copy link

MIIB1 commented Oct 21, 2021

Hello,

i want ask can i control snapmaker 2 A350 enclosures ?

i can't find how do it ?

@nfored
Copy link

nfored commented Oct 29, 2021

When upgraded to python 3 by running apt update and apt upgrade in the fresh install octopi 0.18 ds18b20 probes have this errror.

2021-10-29 12:09:15,377 - octoprint.plugins.enclosure - WARNING - An exception of type IndexError occurred on log_error. Arguments:
('list index out of range',)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 986, in get_sensor_data
temp = self.read_18b20_temp(sensor['ds18b20_serial'])
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1203, in read_18b20_temp
lines = self.read_raw_18b20_temp(serial_number)
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 1218, in read_raw_18b20_temp
device_folder = glob.glob(base_dir + str(serial_number) + '*')[0]
IndexError: list index out of range
2021-10-29 12:09:15,379 - octoprint.plugins.enclosure - WARNING - An exception of type TypeError occurred on log_error. Arguments:
('cannot unpack non-iterable NoneType object',)
Traceback (most recent call last):
File "/home/pi/oprint/lib/python3.7/site-packages/octoprint_enclosure/init.py", line 811, in check_enclosure_temp
temp, hum = self.get_sensor_data(sensor)
TypeError: cannot unpack non-iterable NoneType object

@nelsonov
Copy link

nelsonov commented Nov 4, 2021

Somebody should pin this issue. The link from the Octoprint notification landed me here, but that may not be the case for everyone.

Also, the invite above for the Discord channel is invalid. Is the channel no longer being used or did it just expire? I have so many future plans for this plugin that I hope I can find a way to contribute back.

@AlexDep
Copy link

AlexDep commented Nov 4, 2021

hi,
Here a permanent link : https://discord.gg/bMQCsScaus

@vitormhenrique vitormhenrique pinned this issue Nov 4, 2021
@DIY89
Copy link

DIY89 commented Jan 7, 2022

Hi folks,
first of all. I really like this plugin it. So thanks to all you greats guys who develop this.
During my work on my 3D Printer i recognized that the lower level IO Stuff is working much better on an Arduino Board like 1-Wire communication and much more safely for controlling relays.
So i would like to contribute this great project but i need a little start help to initialize the git repository. I there a chance to run the repo directly on Raspi from GitHub?

Thanks

@vitormhenrique
Copy link
Owner

@DIY89 I have no idea what do you mean by run the repo directly from github.

you mean install from github? run from a local copy on octoprint?

@DIY89
Copy link

DIY89 commented Jan 7, 2022

@vitormhenrique: Currently i've installed the Plugin via oprint/bin/pip3 pip install "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip. So i find the files i want to change under oprint/lib/python3.7/site-packages/octoprint_enclosure. For example the __init__.py. How can i bring the changes back to your master branch via git?

@rtheil-growlink
Copy link

@vitormhenrique: Currently i've installed the Plugin via oprint/bin/pip3 pip install "https://github.com/vitormhenrique/OctoPrint-Enclosure/archive/master.zip. So i find the files i want to change under oprint/lib/python3.7/site-packages/octoprint_enclosure. For example the __init__.py. How can i bring the changes back to your master branch via git?

  1. clone repo
  2. create new local branch
  3. make changes
  4. when happy, commit changes and push to github
  5. create a pull request for the code in the branch
  6. @vitormhenrique will approve & merge your changes if he so chooses

@NDR008
Copy link

NDR008 commented Feb 15, 2022

I was using OctoRelay, and after fixing fundamental bugs in that plugin (which never good pulled into the main master), I came across your plugin.
Seems like a WAY better baseline.
So I think I'll contribute to yours instead.

First thing I wish to add is, an autoshutdown timer (to turn things off with delays after printing). :)

@NDR008
Copy link

NDR008 commented Feb 16, 2022

@vitormhenrique @DIY89
Read up on git. Fork this repo, make modifications, push them to your fork, then make a pull request to this master repo.

@ni-aackerman
Copy link

I was using OctoRelay, and after fixing fundamental bugs in that plugin (which never good pulled into the main master), I came across your plugin. Seems like a WAY better baseline. So I think I'll contribute to yours instead.

First thing I wish to add is, an autoshutdown timer (to turn things off with delays after printing). :)

The timers with delay would be extremely helpful, since some things are activated with the inverted state, so there is no way of turning them off after the print ends, only start them.

@vitormhenrique
Copy link
Owner

vitormhenrique commented Feb 17, 2022 via email

@JeremyLaurenson
Copy link

JeremyLaurenson commented Feb 17, 2022

Hey @vitormhenrique

There is some discussion in the Discord chat server around pull requests, for example the one 'ready to go' in November and whether we should just fork a new build.

I think the issue at hand is that you have asked for help, and there are folks willing, but we dont know what to do.

What are your current thoughts? What do you exactly need help with and how do we sign up officially?

@ni-aackerman
Copy link

How would you configure then in this particular case to stop after 5 minutes. This is an Active Low setup, so the fan turns off (on) when the print ends? For me it doesnt work when I add the time in seconds.
Screenshot 2022-02-17 at 13 35 51
.

@troywneal
Copy link

Hi there. While I am not a programmer by trade, I spent several years programming in python for work. While it has been a while since, I still regularly program in other languages and I am very interested in helping (and learning). I tried to join the discord, but it was closed. I may be late to this, but I hope to contribute to your amazing work.

@hbast
Copy link
Author

hbast commented Feb 22, 2022

After all the good will and great support from @foosel via Twitter, a lot of people showed up on the Discord server. All of them were ready to support in their own way. Be it in project management, Python programming, organization, hardware related programming, expertise was gathered there from all corners. But it just didn't happen. People were stalled and nothing was done instead of assigning tasks and facilitating them.

I for myself am fed up with it. It's a disgrace. This horse is dead and should not be resurrected. Let it rest and saddle up on another one.

@hbast hbast closed this as completed Feb 22, 2022
@troywneal
Copy link

troywneal commented Feb 22, 2022 via email

@mhesselgator
Copy link

I'm bummed! Cool plugin!!!

@spiff72
Copy link

spiff72 commented Feb 25, 2022

I am a bit confused - I got signed up for notifications on this topic a while back, and I am not clear on whether this plugin is still viable. From reading this thread, it seems it isn't. However, it is working fine for me right now.
I have Octoprint 1.7.3
Enclosure Plugin 4.13.2
I have it set up to turn on/off an exhaust fan at certain temperatures based on some starting GCODE that gets added when i slice parts (based on the tool temp (PLA material sets a lower enclosure temp than stuff like PETG/ABS/PCblend). Everything works great on my end.

@rtheil-growlink
Copy link

I am not clear on whether this plugin is still viable

It still works really well, but there are a lot of issues noted that are incompatible with Python 3, and there have been no updates. Even pull requests are not being merged.

@spiff72
Copy link

spiff72 commented Feb 25, 2022

I am not clear on whether this plugin is still viable

It still works really well, but there are a lot of issues noted that are incompatible with Python 3, and there have been no updates. Even pull requests are not being merged.

Ah - OK. I had updated octoprint a while back and since it was using Python 3 now (and I was still using the Enclosure Plugin successfully) I thought all had been resolved.

Thanks!

@GerhardMassenbichler
Copy link

GerhardMassenbichler commented Feb 25, 2022

The Future - what‘s needed:

  • design principles (API, PigPIO vs. small libs, etc.)
  • CI/CD for automated builds
  • automated tests to secure the codebase
  • People with write access to merge pull-requests
  • short releasecycle

Anything else?

@vitormhenrique
Copy link
Owner

i think there is a misunderstanding here.

I said that I was gonna make this plugin compatible with python 3, and we got those pull requests on.

I'll accept PR's for but fixes but NOT new features.

The current way that the plugin works takes a lot of effort and knowledge of python environments and libraries to make it work, the configuration is terrible and user's just don't know how to use it.

The idea here is to move away from this plugin and build another with helper plugins, each helper plugin would have all libraries and easier way to configure them.
For example a GPIO helper plugin would be able to act like a trigger and actions.
The main plugin would have the glue logic and enable a screen like an "IF THIS THEN THAT".

The POC with the new style of plugin was here on the "Python 3" branch. But moved it to here:
https://github.com/vitormhenrique/OctoPrint-Enclosure-V2

An example of a helper plugin is here:
https://github.com/vitormhenrique/OctoPrint-Enclosure-RPiGPIO-Faker

This is only a POC and I already have some stuff that I don't like and will be changing.
Please this is a free software that I worked for years, don't come saying "it's a shame" or whatever, specially if you have zero contributions to this plugin or any opensource library.

@TechWithTy
Copy link

TechWithTy commented Apr 15, 2022

Hello sorry here really looking forward to helping I'm sorry don't have much time couldn't read the entire thread but the discord link is invalid. Please let me know if you are still looking for help thank you

Death305#5861 (Discord)

@jneilliii
Copy link
Contributor

Updated invite: https://discord.gg/cwgqHnEZk3

@spiff72
Copy link

spiff72 commented May 20, 2022

I know this is closed, but is it reasonable to say "Don't upgrade to octoprint 1.8.0 if you are still using OctoPrint-Enclosure"?

@stephenfeather
Copy link

When large frameworks or underlying languages have major version changes, it often requires a lot of code changes.

I'm currently fighting a PHP 8x, MySQL 8x battle. Neither side paid attention and the 2 giant ships passed each other.

Python 2 -> Python 3 was an 8 year span with nearly 14 years to present since 3 was released.
But here is the thing to remember on all sides here. Until Octoprint moved to Python 3, plugins couldn't.

Until just a few years ago, Apple was shipping Python 2 in OSX and it was (and for some still is) a PITA to get python 3.x on.

@vitormhenrique has put a ton of time into a plugin that by all intents was designed to take a huge collection of disparate inputs (hardware, software, cloud) and bring them into a view that we could read easily. And for that I think him tremendously.

On the other side as a user, I understand the frustration when a working setup just dies on you because of underlying changes. You want the latest Octoprint, the fixes, the advantages, and now a sub-product that depends on that breaks from the changes.

Python is definitely not in my wheelhouse. "Hack in" fixes I can do sometimes. Give me some PASCAL and I'm a KING! :)

I read through the POC and like the direction.

Now, I want the plugin to grab an alexa hook and sound an alarm throughout the property that a 3d printer is on fire! j/k

i think there is a misunderstanding here.

I said that I was gonna make this plugin compatible with python 3, and we got those pull requests on.

This is only a POC and I already have some stuff that I don't like and will be changing. Please this is a free software that I worked for years, don't come saying "it's a shame" or whatever, specially if you have zero contributions to this plugin or any opensource library.

@nicman23
Copy link

fixed dht sensors for me on python 3

import sys
import time
import board
import adafruit_dht

# Parse command line parameters.
sensor_args =   {
                    '11': adafruit_dht.DHT11,
                    '22': adafruit_dht.DHT22,
                    '2302': adafruit_dht.DHT22
                }

if len(sys.argv) == 3 and sys.argv[1] in sensor_args:
    sensor = sensor_args[sys.argv[1]]
    pin = "D%s" % sys.argv[2]
    pin = getattr(board,pin)
else:
    sys.exit(1)

dhtDevice = sensor(pin)

# DHT sensor read fails quite often, causing enclosure plugin to report value of 0.
# If this happens, retry as suggested in the adafruit_dht docs.
max_retries = 3
retry_count = 0
while retry_count <= max_retries:
#    try:
     if True:
        humidity=dhtDevice.humidity
        temperature=dhtDevice.temperature

        if humidity is not None and temperature is not None:
            print(('{0:0.1f} | {1:0.1f}'.format(temperature, humidity)))
            sys.exit(1)
#    except Exception as e:
#        print('-1 | -1')
#        sys.exit(1)

     time.sleep(1)
     retry_count += 1

print('-1 | -1')
sys.exit(1)

@nrafonso
Copy link

Hi everyone, I'm struggling to get the DHT22 sensor working on the Enclosure plugin. Followed the documentation on github for this but seems not working. I've run a small program on the PI terminal and the sensor work fine there. I have the raspberry 4b with OctoPrint version 1.8.6 and OctoPi version 0.18.0. Thank you for your help

@nrafonso
Copy link

Thanks @nicman23
I have updated the /home/$myuser/oprint/lib/python3.9/site-packages/octoprint_enclosure/getDHTTemp.py with your code and it solved things.

FYI on the plugin page I have sudo disabled because I'm already able to get temperatures with normal user.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests