Extract realtime 3D printer parameter data into python?

What is the problem?

I would like to get the following parameter data from the 3d printer, while it is printing an object

  1. Extruder Temp.
  2. Bed Temp
  3. Fan Speed
  4. Feed Rate
  5. X,y,z Coordinates
  6. Time of completion
  7. Date and Timestamp
  8. Operation status (printing, not printing, paused, etc)

How do I get all this data? Also is it possible to get any other data from the 3D Printer?

If you have ran already OctoPrint on a printer, you may have noticed that the most of the data are displayed within OctoPrint's GUI.

The temperatures are reported back from the printer, other data is derived from the gcode file.

The coordinates can't be exact because of the input buffer of the printer.
And no, the printer does not report back the actual head position during print.

1 Like

You can check the REST API documentation for what data is available, including in the push updates over the websocket. If you want to collect any data you cannot already see from these interfaces, you may have to write a custom plugin.

1 Like

Not sure if feedrate is reported at all - at least I couldn't find a gcode for it

For fan speed you need a fan with tachometer output and a board that supports it - alternatively, you can let Marlin notify you when the speed has been changed.

Realtime coordinates reporting from the planner can be enabled, but can have an impact on the performance of your printer.

You have to enable those options in the Marlin config, compile a new firmware and flash it on your printer if you want to use them.

The plugin DisplayLayerProgress provides an API for feedrate and fanspeed (beside other mentioned data)

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.