I built a plugin that displays the current layer of a print job. The host handles analyzing the GCode and notifying the clients when a layer change has taken place. The issue I've run into is that I don't know how to push the layer information to the client when the client first connects to the host.
I'm currently sending updates to the client via
send_plugin_message. Is there a straight forward way for the client to request an update? How does OctoPrint keep other progress metrics in sync with the client?
This is my first time using python or knockout, I may be missing some obvious stuff. Here is the repo the project if anyone is interested: https://github.com/chatrat12/layerdisplay