Possibility to filter console output

Hi,

some time ago i posted https://forum.repetier.com/discussion/comment/30685 for getting console output by some bash script. This works fine. I have a followup question which is more specific to general user interface behaviour of Repetier Server.

I have a bash script that sends M408 S4 to get hardware information like MCU temperature and board status (idle, busy, ...) from my Duet controller. This information is printed to Repetier Server console. I added some custom GCode callback to get the information from the websocket. The polling is quick so i get a lot of messages per minute on the console. So my question would be: is it possible to filter out some command output from the console window? You did this with M105 by default. It would be cool if i could filter out commands from UI with regex while keeping the information in websocket.

i am polling this data to push it into an InfluxDB time series database. Finally a Grafana instance is monitoring this data for longterm analysis. This works perfectly fine at the moment.

Only problem is the console spam i create with my polling polution script :-D

by the way: I did it this more complicated way because i cannot curl the json object from Duet directly because i have a 2 factor security cascade: htuser/htpassword + device password. So my workaround idea was to trigger M command to get the desired output from Repetier Console instead. I know it would be cooler to just grab the json output from Duet Web Control application/access which is shipped with Duet 2 Ethernet.

maybe anyone has an idea?

regards, Mario

Comments

  • Currently it is not possible. You would need to analyse it internally and change response type to 1 for ACK message filter. I have added for next release mod so that the lua analyse handler would be able to do it.

    function testResponse(printer, line, rtype)
      -- Test line and set rtype to 1 to treat is as ack
      return rtype
    end
    server:registerResponseHandler(testResponse);

    That would be able to make it hidden as ack, but requires next release.
Sign In or Register to comment.