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

Migrate to "machines" interface #32

Closed
SchrodingersGat opened this issue Feb 14, 2024 · 10 comments
Closed

Migrate to "machines" interface #32

SchrodingersGat opened this issue Feb 14, 2024 · 10 comments
Assignees

Comments

@SchrodingersGat
Copy link
Member

Ref: inventree/InvenTree#4824

Once the linked PR is merged, update this plugin to make use of the new machines interface. With this we should be able to:

  • Support multiple connected printers
  • Ping printers to keep status information
@simonkuehling
Copy link
Contributor

As the machines interface seems to be up and running - is there any reason not to try to go ahead with this? Looking at the inventree-cups-plugin it should be pretty straight forward and I could give it a try, unless you happen to have something cooking but not released yet already...
I have two different network connected Brother models for testing that I would like to use at different locations in the company.

@SchrodingersGat
Copy link
Member Author

@simonkuehling I would appreciate you taking the lead on this! It would be great to support multiple machines for this, 100%

LMK if you hit any problems on the way.

@simonkuehling
Copy link
Contributor

@SchrodingersGat I have something working now - could you have a quick look at https://github.com/simonkuehling/inventree-brother-plugin/blob/machine-registry-integration/inventree_brother/brother_plugin.py for comments?

there could be a bit more actual logic tracking the machine status - but I'm not sure if we get any information in this regard out of the BrotherQL library...

One issue is remaining right now: when printing a label, I get two notification popups in the bottom right corner (using PUI) - one with "success" and another says label generation failed:

I cannot find any errors (running in vscode devcontainer with demo dataset at the moment) - do you have an idea?

@matmair
Copy link
Member

matmair commented Oct 17, 2024

@simonkuehling this looks promising - maybe open up a PR, this feels pretty ready. Regarding status: there are some fairly new status-requesting APIs in borther-ql_inventree that could be helpful. I would like to keep the stump you already have for now as there is probably some testing and discussion required for states.
Sounds good?

@matmair
Copy link
Member

matmair commented Oct 17, 2024

Ref #43, #28

@wolflu05
Copy link

The error you are seeing is in the frontend code, because machines make use of the async printing, and that currently falsely shows an error to the user in PUI. That still needs to be implemented on the frontend side. Maybe with web sockets or polling and a notification with a progress bar at the bottom.

@simonkuehling
Copy link
Contributor

@matmair Sure, I opened a PR at #46

@wolflu05 I see, thanks for the pointer!

@SchrodingersGat
Copy link
Member Author

@wolflu05 is there an outstanding issue for the PUI bug you referenced?

@wolflu05
Copy link

Not sure, but I don't think so. I haven't added this implementation.

@matmair
Copy link
Member

matmair commented Oct 18, 2024

Closed with #46

@matmair matmair closed this as completed Oct 18, 2024
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

4 participants