mainsail
mainsail copied to clipboard
Incremental reminders based on number of hours printed - i.e. lubricate, change filter media etc.
Requested feature:
Since mainsail tracks total hours printed it would be very nice and useful to have customizable incremental reminders based on number of hours printed.
For instance, a reminder to change filter media every 50 hours of printing. Or a reminder to lubricate rails every 500 hours ect.
Solves the following problem:
the need to track these things which we all should do, but probably no one does... especially the filter media.
Additional information:
I think this would be very useful and everyone could benefit from it.
I am already using this. Create a macro with a delayed gcode - update the delayed gcode every 5min and save the value to the sd card. Thats the way how I change my filter. After change I can reset the saved value. But I would also prefer a feature in mainsail :)
+1
@Zodiak1993
Ahhh, mind posting your code for this? Yes, hope they will think its a good idea and integrate it. But until then at least I can keep track.
would be awesome if:
it would:
- read/ write to variables.stb - to track printer hours / filter hours / maintenance actions
- display a popup on mainsail ui with a message of required maintenance action
- ability to dismiss pop-up, delay, reset hour meter (variables.stb)
Excellent Idea!
What would you think about basing the reminders on the linear distance traveled by the specific axis or extruder rather than the hours? Hours would probably do the job. But, I wonder if travel distance would better for things like bearings are wheels.
@JEDean
I think hours is the way to go. Especially for filter media.
Just my 2 cents.
I would use the "moonraker history totals". So Filament meters would also be possible, but axis movements are not included in these values: https://moonraker.readthedocs.io/en/latest/web_api/#get-job-totals
@meteyou
Ahh, glad to see you like this idea. It really would be a helpful little feature.
Royal ascent!
Hey @meteyou ! I'd like to try my hand at implementing this feature. My high level plan:
- New "reminders" panel on the home screen that renders a table of active reminders
- Add reminder button that pops up a dialog with "name" and "print hours" fields
- Popup that displays when the reminder's designated number of print hours have passed, with "snooze", "reset", and "dismiss" buttons; "snooze" extends the reminder for a configurable number of print hours, "reset" overwrites the start_total_print_time value for the reminder with the current value from history, "dismiss" deletes the reminder. IMO, popups should be configured to only show when there are not active print jobs, since the use case is primarily for maintenance work that requires the printer to be... not running.
- New store leaf under /store/server/reminders that posts reminders to namespace "reminders" in the database, and retrieves them for the client. Reminders are stored with a start_total_print_time equal to the current total print time from moonraker history totals, and this is used to compute number of hours remaining in the reminder.
If this sounds un-problematic, I'll try to cobble something together over the next couple of weeks :) thanks!
@jeremiahvpratt
Ahh awesome, thanks for picking up the feature!
One thought. Maybe a separate panel is to much? I had always imagined the reminders would show in the existing notification area ( the bell icon).
But then, I don't understand anything about what's necessary to implement the feature.
Thanks again! Very excited :)
@PhilBaz it's probably preferable that there be some way to view your currently set reminders, edit them, etc. - I'm not sure that adding those things to the notification area would be the most proper. If they don't merit their own panel, potential alternatives:
- adding them to the "miscellaneous" panel. arguments in favor would be that reminders are pretty lean in terms of info, so adding a row there to show remaining hours on a given reminder is relatively low in terms of intrusiveness
- adding them as a new table area on the "history" page. argument for that would be "it relates to the other info shown on the history page", but the logical connection isn't super strong, and I think it would make it difficult for users to discover the feature.
@jeremiahvpratt
Ahh, I hadn't thought about about setting and editing them.... Good point. Ill be quiet now :)
@PhilBaz I do think that having expired reminders show up in the notifications area instead of as a popup may make sense! My only qualm is that there are several different things a user might want to do when a reminder expires - set it to run again, snooze it for a few print hours, or delete the reminder altogether, and it's not clear to me what that user flow would look like from the notification area - it's a lot easier to fit a few buttons in a popup. If you have thoughts about that lmk!
@jeremiahvpratt
I hear you. I hadn't really thought about the workflow at all, just where it might appear. Having a panel for workflow and the reminder itself showing in the notification area might be good.
yes, functions of setting, resetting, and checking the status/run time of the reminder will all be good things to have included in terms of functions.
@jeremiahvpratt
Might also be nice to have all reminder(s) run time show in console when a print is started or finished. Like 'Filter: 36 Hours' etc.
I would have thought to do the reminder in the notifications. furthermore, I would do the "create" and "manage" of the reminder on the history page. would have thought between the stats and the history print list a separate panel for it.
@meteyou sure, makes sense to me! In that case I’ll fold the reminder store code into the existing store/server/history files
I would use a separate store, because you also need different functions for reminders
@jeremiahvpratt Hey Just saw you put in a PR for reminders. Awesome, cant wait to use it.
@PhilBaz yeah, it’s been a busy few weeks, hopefully will get around to addressing edits this coming weekend! If you want to try it out, my branch is in a useable state, and any reminders you make on the branch should persist if it eventually gets incorporated into a real release.
@jeremiahvpratt
Cool, Il see if I can figure out how to get it installed :)