API module and Web api

Hi,

I am interesting to compare data analyst values with printer commands, printing specific G-Code depends on an output.

I run the web api and it worked perfect. I am trying now to understand how can I have access at all the things in the printer.

I saw that in order to use lua functions i should have the pro edition.

I saw as well that i can use the web APIcommands at the standard version of Repetier server. 

Do someone did something similar before, or can i have some suggestions?

Thanks in advance!

Comments

  • You want to parse firmware responses and send g-code depending on what you get?

    You can do that with both - lua or web api. lua has advantage of being closer to the data and not requiring an additional software being run. Would also automatically work with any added printers.
  • let's say something like this. 

    for now I would like to pick a specific file for printing that I have on the printer memory, depending what i am getting.

    maybe to the future I would like to change some how and the G-code depending what I am getting. For sure I need something that is stable!

    As i study a bit the difference between the both two, "lua" and "web Api", with "lua" as you said, I have access to more specific data, with more specific functions!


  • Yes. The lua modules are meant as an extension for exactly such cases where you need server side some modifications. That is why they are the natural choice for such problems.
  • Perfect.

    After the upgrade i can use the lua commands, directly into the demo API combine with the already existing commands?

    except this i can build lua modules, and store them into a path so i can call them independently?

    Kind regards,
    Dimitris
  • There is a special modules folder where it needs to reside. See the firmware module for example. It even adds a extra screen to the gui that uses the new command. In lua script you see 

    server:registerDynRequest("firmware_upload", firmwareUploadCalled)
    server:registerAction("firmware_boards", firmwareGetBoards)
    Upload is a non websocket request as it contains a file. firmware_boards is just a new api command added that you can call remotely. So you see you can extend the api with that as well.
  • i saw this folder even in the developer tools on chrome, with one firmware inside, which is for upload new irmware purpose.

    the truth is that i am a bit confused with the API and how with the different ways that i can use the commands and automate the printer.  Especially with the anjularm and because i have the basic knowledje of angular, the things becoming difficult.

    Maybe with the pro version the things will become more clear. I suppose...


  • Apart from pro allowing to use and play with it, it is still lua and angular:-)

    Import difference between monitor and module is that the modules are created per printer so each module instance is assigned exactly one printer and is also integrated in the printer events, which is not the case for the monitor. 

    Monitor was mainly added to monitor hardware pins and do actions based the pin change.
Sign In or Register to comment.