External commands on printer level

Hello,

I am trying to find a way to implement external commands (like you can do with the extcommands.xml), but on printer level.
Is there a way that this can be done?

The reason I want this is that I have a Pi Server that controls 2 printers. Each printer can be powered on and off separately using the GPIOs of the Pi and SS Relays. Additionally each printer has a web cam that can be switched on (Start streaming) and off (Stop streaming) separately. I want to be able to have commands like "Power on", "Power Off" etc. at the actions of each printer.

I know that this can be done globally with the already existing external commands, but it is more convenient to have the commands assigned to each printer, and avoid having commands like "Power On Printer #".

Comments

  • It can be done if the printer is online. In extcommands you can also define commands for @execute which you can use in a script. If added as script and online you can send them to printer but conatining only 
    @execute webcam 1 0
    or something like this would instead call a command like the server commands. These scripts are per printer so they only appear in printers where they are assigned.

    Completely independend per printer commands whcih would appear in the printer menu do not exist.
  • Actually this is only useful when the printer is online, so no way to have the power on commands separately.
    Anyway I will add it as a request so maybe in the future can be implemented.
  • Yes, could be done but generic with e.g. $slug as parameter replaced by printer slug so called script has to find out for which printer the command is meant. Or alternatively with slug filter in the list. Will think about it.
Sign In or Register to comment.