Duet3 reading the metrics...



  • Hi *,

    I have a Duet 3 and a raspberry connected to it. So my idea is now to read out some metrics from the Duet and write them to a time series database for further analytics.
    My idea is to use telegraf (https://www.influxdata.com/time-series-platform/telegraf/) and write the data to a influxdb (https://www.influxdata.com/). The tools for graphs will be grafana. (https://grafana.com/)

    I user grafana, influx and telegraf in my job and at my home environment, so that should be a peace of a cake.

    My question is now: How can I read out the data from the Duet? The telegraf can execute commands/scripts to gather information. But where can I get information from? I think about hotend temperature, current layer No, time of the print? etc etc....

    Can I get that information form the serial interface? Or does one of the daemons provide that?

    (Yes I can provide a guide when I have something "ready".)

    Cheers, Chriss



  • @Chriss The new firmware RRF3 which is used by Duet 3 introduced a object model, which provides those information in json format, which you can get.

    As a first overview, you can check the links
    https://duet3d.dozuki.com/Wiki/Object_Model_of_RepRapFirmware
    https://duet3d.github.io/DuetSoftwareFramework/api/DuetAPI.Machine.MachineModel.html

    The first links gives in chapter "Uses" an overview how you can transfer the data.



  • @JoergS5

    Nice..... Thanks. I will source that json document from the web interface than. There is json plugin for telegraf which makes it very easy to handle that.....

    I have a duet2 main-board around, too. So I will source the the data from the web-interface, too.

    Well, I want to keep my 3D printer(s) as much self contained as I could. So it would be very convenient to use the local connected raspberry to query the local web service for the data. The data can than be stored in a local influxdb. The PI4 has more than enough resources for that.

    Cheers, Chriss


Log in to reply