InvenTree icon indicating copy to clipboard operation
InvenTree copied to clipboard

Machine registry

Open wolflu05 opened this issue 1 year ago • 8 comments

This issue is a summary of possible ideas to improve the machine registry introduced with #4824.

🎰 Machine type improvements

  • [ ] ❗ send notification on error status change or machines capture errors
  • [ ] machine permissions with custom permission levels per machine type (e.g. so that only specific roles/users can print labels with a specific printer - e.g. for label printers there are the following permission levels: "print")
  • [ ] Define icons for each machine type and show them along the UI

🚚 Driver improvements

  • [x] ❗ machine status polling function on driver (with option to disable status polling for all printers/for an individual printer) #10381
  • [ ] Termination hook for machines, (already tried at 6bb0ba719bef6f61f4395823f2ff8ee8f7097a3e but not that easy when run in gunicorn), then the machine restart could be a simple terminate + re init
  • [ ] let driver auto discover physical machines in the network/computer and show them so that they can be added quickly (like homeassistant has it)
  • [ ] machine actions (buttons on machine page that can trigger certain function on the driver)

🖨️ Label printer improvements

  • [ ] ❗Show the printer status badge in the machine selection dropdown (maybe by extending the ChoiceField with an optional status code property)
  • [ ] integrated label printing queue for each machine
  • [ ] label printer dialog sort machines based on priorities provided as tuple with get_printers (not sure if that makes sense or if last used is just enough, we have to see)

🎰 Ideas for other machine types

  • [ ] PnP machine type (#4164)
  • [ ] 3d printer machine type (#5191)

📝 Other things

  • [ ] ❗ Settings only required if conditions are met (e.g. for a usb/network printer select the host, port, user, password only makes sense for network printers, for usb printer a single select is enough. => Dependent settings)
  • [ ] Live Autocomplete Settings type key (Client posts current values to API and API responds with suggestion)
  • [ ] add metadata to machine models
  • [x] How does scaling of the machine registry work if InvenTree runs on multiple nodes (maybe Kubernetes)
  • [ ] Issue plugin events on machine load/finish load (ref: https://github.com/inventree/InvenTree/pull/4824#issuecomment-1574104681) (Already tried, but: enqueues to much offloaded events that are unnecessary on simple setups on startup => the event system first needs a fix)
  • [x] #6772

wolflu05 avatar Feb 14 '24 14:02 wolflu05

Ideas for other machine types: we have automated cable cutter/stripper and manual (but stationary non hand tooled) crimping in our manufacturing.

What came into my mind when I saw about the machines integration is the resource planning/allocation. It would be great if "machine time" could be added as a BoM item or assigned separately as "resources" to parts. Resources could include not just machine time, but also labour even labour assigned to users/users groups.

This way the (in the far distant future) we could implement a somewhat automated production planning. But that is a slightly different topic which might needed to be discussed in a separate discussion.

martonmiklos avatar Feb 15 '24 12:02 martonmiklos

I currently integrate my 2 PnP machines, conveyors and stencil printer with inventree using MQTT. Basically a program runs on the PnPs and sends info to inventree. The PnPs consume parts. Currently the way they create build orders / build units is a bit messy but I suspect I should transition over to this interface. I'd like to easily view status for the line and some stats would be handy too.

loki42 avatar Feb 16 '24 08:02 loki42

@loki42 sounds like a great candidate for a "machine" interface. Perhaps you could work with @wolflu05 to provide a demonstrator for this

SchrodingersGat avatar Feb 16 '24 08:02 SchrodingersGat

@loki42 would you be open to do a short call/chat to understand your requirements better?

matmair avatar Mar 11 '24 18:03 matmair

Yeah, happy to do that. Basically keen to have an easy way to see status of all the machines and utilisation.

I currently have events triggered from the machines that run code that does stuff to inventree.

A mis pick on the pnp machines consumes stock from that feeder, a board being finished runs a build order. It would also be nice to see stencil printer status so it can consume wiping paper, pcb panels on mis print and maybe paste.

Seeing status of machines would also be good (waiting for upstream / downstream, reel empty error, oven not at temperatures etc). Would be nice to know units per hour and other stats too. My air compressor is network connected too so there's some out of line stuff as well.

On Tue, 12 Mar 2024, 5:59 am Matthias Mair, @.***> wrote:

@loki42 https://github.com/loki42 would you be open to do a short call/chat to understand your requirements better?

— Reply to this email directly, view it on GitHub https://github.com/inventree/InvenTree/issues/6486#issuecomment-1989215804, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAISQBE5WI6CZGRSURZRL6TYXX5H5AVCNFSM6AAAAABDINLJWOVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMYTSOBZGIYTKOBQGQ . You are receiving this because you were mentioned.Message ID: @.***>

loki42 avatar Mar 12 '24 02:03 loki42

I've added my current integration of the PNP with Inventree here: https://github.com/polyeffects/poly_erp it's also got my code for Inventree sales orders to Xero invoices and a few other things. The next plan is to add shipping stuff using Karrio.

loki42 avatar Mar 29 '24 08:03 loki42

This issue seems stale. Please react to show this is still important.

github-actions[bot] avatar May 28 '24 11:05 github-actions[bot]

Still active

wolflu05 avatar May 28 '24 15:05 wolflu05