fraschetti / Octoslack

OctoPrint plugin for Slack, Mattermost, Pushbullet, Pushover, Rocket.Chat, Discord, Riot/Matrix, & Microsoft Teams
MIT License
74 stars 34 forks source link

Layer number variable support #19

Closed scns closed 5 years ago

scns commented 6 years ago

Hi,

Is it possible to get an variable for the actual layer number and the actual time?

Kind regards

fraschetti commented 6 years ago

Hi @scns ,

  1. By "layer number" are you referring to the current Z-height or a slice derived layer number? Exposing the current Z height as a variable shouldn't be difficult - assuming that's what you're looking for.

  2. For "actual time" - can you be a bit more specific? Are you looking for the elapsed time? time remaining? estimated total print time? The library already provides: {elapsed_time} - Time since start of print {remaining_time} - Estimated remaining print time

So perhaps you're looking for the estimated total print time?

scns commented 6 years ago

With the layer number i mean layer 86 of 126.

See image in OctoPrint:

Image

And the actual time I just mean he system time of the raspberry.

But the layer number should be very nice if that is possible!

fraschetti commented 5 years ago

Hi @scns

Just to let you know - I've not forgotten about this request. I did look into this immediately after you submitted your previous response but never found the time to post my findings here. Unfortunately OctoPrint's layer calculation logic is all client-side and isn't available to our plugins without some serious hacks that would be unreliable to say the least.

The alternative solution I believe others have adopted here is to have the slicer insert a custom gcode when each new layer has started. In the case of Slic3r, it would make use of [layer_num]

Still brainstorming. I'll provide another update if anything changes.

fraschetti commented 5 years ago

Also, {eta} was added in 1.6.0 (just released) which may satisfy your "actual time" request.

scns commented 5 years ago

Tnx for the update and making the {eta} available. I will look for another option to get the Layer_num available.