bring printer actions, sensors info into status screen at fronend

mkrmkr
edited April 25 in Questions & Answers
hellow! Sb knows how do you bring infos, and some functionalities from connected printer by usb into the printer's printing status screen? I have to display temperature, speed, add some buttons to switch the actions from my custom printer... Is frontend customization needed? if needed how do you send requests via websocket or rest or ... to the server api to achieve this? Do I need to customize the backend too? really can't find any documentation that points to the right direction... please help

Comments

  • Hope you have seen
    https://www.repetier-server.com/customizing-printer-frontend/
    with instructions to customize it. As described you would extend the existing status page in your app version, so you get all javascript and updates for free in your version.

    For communication and getting informations see how the other functions do it first. All regarding communication and status data is directly available through the binding library included. You either get information directly from printer state and typescript autocomplete will help you to access it correctly. Or it is not included and you can query it easyly via websocket connection with connectionHandler:

    // add connctionHandler to component
    constructor(private connectionHandler: ConnectionHandler,
    ....
    // use it later where needed
    this.connectionHandler.send("GPIORun", {uuid: cmd.uuid, cmd: "off"});
  • thank you @Repetier

Sign In or Register to comment.