Printer-level button from extcommands.xml

edited July 2021 in Repetier-Server
I am running the 1.0.5 beta and have found that the new external links are awesome! I have since been looking at ways to run my bash script that controls the printer plug via Home Assistant.

As such, is there any way to make the webactions call a script or the extcommand.xml command? The script is a little more complex than a url call; and I would like to access this button remotely (I have a reverse SSH tunnel to the Repetier-Server which wont execute locally hosted webpages).

My script runs, but the buttons being added to the extcommands.xml file make them appear under the "high level" cog.I would prefer to have them appear under the printer like the webactions do. Is this at all possible?

I see that the angualrJS ng-click is executing "closeMain();overview.runExternalCommand(c.id)". Is there a way to get maybe get a URL to this upstream link/command to use?

Comments

  • extcommands.xml can also add them to a priter. Just add slug="printeSlugName" to the command and it appears in the printer menu instead.
  • Thank you, it took me a while to get the "slug". For anyone else, this is where I got it from - the URL: http://myIPaddress/#!/printer/Printer_Name/print

    This works as expected on the Web-Interface adding the Printer-Level section. On the Touch-Screen it still resides under the "Server Commands" which matches the 1.0.5 behaviour of Web Actions going in their own folder "Web Actions".

    I am looking at using my script as an override G-Code to the Printer On/Off/Shutdown. I am not sure how to upload an image here - but it seems I can use Web Actions in the gcode sections for the on/off; but how would I get the URL for that ExternalCommand so that it can be called for me?
  • G-Code only works when you are connected, so on only works if printer gets powered by the pc already and on means main power. 

    External commands don't call web actions - use web actions directly if that is what you need. External commands are off server commands. 
Sign In or Register to comment.