Component for Mosaic's Palette and Canva hub

I’m looking at ways to integrate data from Palette into Home Assistant. Values that would be relevant to my use cases include (by order of importance):

  • Ping - Pong. This is the most important as it allows not only to monitor proper operation of Palette, but also of the entire system including the 3D printer itself. A use case could be, slow down print speed / feed rate when ping <98%. This is particularly relevant to me as a Prusa Mk3s user as this machine suffers from heat creep due to the extruder stepper motor overheating and a faulty heatbreak design. Pausing the print for a set time to let the motor cool down could be another way to achieve this. This could be implemented as a sensor.

  • Splices. I tend to slow my printing speed down in order not to run into “Buffer Collapse” Error 120. The plug-in’s advance feature helps buckets with this. I set the Splicing Speed Rate at 75% for most prints. Normal Feed Rate is set anywhere between 80% and 150% depending on the model’s geometry. Once all splices are completed, I could run at up to 200% reducing print times for some models. This could be implemented as a sensor.

  • Feed Rate Status. To know if a splice is currently happening. This could be implemented as a binary sensor.

  • Filament Used. Just a nice thing to know / record when printing the same model over and over. Helps with provisioning materials needed for production of future prints. This could be implemented as a sensor.

  • Connection Status. This could be implemented as a sensor / binary sensor or even a switch to connect when disconnected

  • Status: This could be implemented as a sensor. Similar to number of splices. May not be needed.

These data Pull Requests could be done via Octoprint Shell Commands to start with, but long term this could become an actual component for Home Assistant for other users to use along with the Octoprint component. Shell Command is the solution I rely on to add functionality to the existing Octoprint component for Home Assistant. Here is one such example that I use for a script / switch to decrease feed rate to 80%:
‘’’

shell_command:

prusa_speed_80pc: “curl -s http://192.168.XX.XX/api/printer/command -d ‘{“command”:“M220 S80”}’ -H ‘Content-Type: application/json’ -H ‘X-Api-Key: XXXXXXXXXXXXXXXXXX’”

script:

prusa_speed_80pc:

alias: Prusa 80%

sequence:

- delay:

    milliseconds: 1

- service: shell_command.prusa_speed_80pc

‘’’

I looked at the terminal window from Octoprint / Canvas Hub, but cannot find relevant data. Some pointers could be very helpful here… I think my skills are not sufficient to get this data pulled into Home Assistant. Maybe some more skilled programmers can chime in?

This is interesting!

Have ever been able to implement this?
would love to find out, thanks!