Skip to content

FEATURE REQUEST: Add API calls for data logging

It would be great to be able to log Palette values into an external database outside OctoPrint. This would allow for troubleshooting of the Palette, ensuring continued function and automating tasks. To make this easy, adding API calls is necessary. These can be created in the same way that OctoPod uses the getPingHistory and downloadPingHistory calls. The API calls that would be useful are:

  • latestPing: A sensor showing the value of the latest Ping.
  • latestPong: A sensor showing the value of the latest Pong.
  • currentSplice: A sensor showing the number of the last splice.
  • totalSplice: A sensor showing the total number of splices for the current print.
  • splicingStatus: A binary sensor showing whether Palette is currently splicing. Currently, the getPingHistory can be retrieved like this:
$.ajax({
                url: API_BASEURL + "plugin/palette2",
                type: "POST",
                dataType: "json",
                data: JSON.stringify({
                    command: "getPingHistory"
                }),
                contentType: "application/json; charset=UTF-8"
            }).done(function(data){console.log(data)});

The idea would be to make these calls and log all Palette history into any external database.

To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information