Access sensor data (Bed-/Tool-Temperature, Fan speed, Feedrate etc.) over network (HTTP, SSH)

What is the problem?

Hello all,

I had the idea of programming a LabVIEW-monitoring tool, that displays and records various parameters during the printing process. First step was to install a thermocouple-sensor in the printer housing, which I can monitor via the Software:

Now I wanted to add additional data like tool-& bed temperature, fan speed etc. to the graph. Since I have no experince in "real" programming (like Python etc.), I tried to find access to the above mentioned values by extracting it in labview from the html website source code. Therefore I installed the autologin-plugin and read out the html-body of the pi-adress "http://192.168.178.xx/?#temp", but I didn't manage to export the relevant temperature data (I think due to missing Javascript implementation).

Has anybody a simple idea, how to access the data via the local network, a possible solution could be:

  • Creating and updating (definable interval e.g. 10s) a sensor data text file on the octopi using e.g. a python script, which can be read out from labview via SSH/SFTP access.

Any other suggestions, how to transmit the data via LAN connection to the labview system?

I am using the latest version of octoprint, monitoring/recording pc is on Windows10 in the same LAN IP-Range.

Best regards and thank you for your help!

I have a temp graph plugin that can be used to hook in additional data here. There is even an example of showing fan speed data here as a single file plugin. This example I believe requires a special firmware flag to report the fan speed when you run the M106 command though, so "mileage may vary".

There's also a fork of the enclosure plugin that can report data with my plugin installed, with a PR pending on the original repo.

Thank you for the feedback, as I already mentioned, my programming skills are very limited, therefore I don't know if I can see all the possibilities, the plugin can open up. As far as I understand, it helps to integrate inputs/outputs to the octoprint GUI, right? My idea would be an option to record and thus being able to document a printing process with e. g. Tool-, Bed-,Enclosure-Temp and Fan-speed (in %). Does your plugin also give an option to "export" these values?

Yeah, my plugin doesn't log anything, just visuals from realtime data being sent to the front-end UI. Som of the history you're asking about would probably be covered by other better solutions outside of an OctoPrint plugin TBH. Things like the Prometheus plugin and InfluxDB plugin can ship off that data and allow for external graphing with tools like grafana that are designed for that kind of analytics.

Otherwise, simple stuff could be logged with this plugin.

You may also want to look into the OctoPrint Rest API - REST API β€” OctoPrint master documentation

It will allow you to get the data you need, HTTP requests are quite simple to implement using a lot of tools, in Python you could probably poll and save to a file in around 20 lines.