Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Enable/Disable maintenance timers #4

Open
llambion72 opened this issue Dec 26, 2024 · 15 comments
Open

Feature: Enable/Disable maintenance timers #4

llambion72 opened this issue Dec 26, 2024 · 15 comments

Comments

@llambion72
Copy link

I think that it could be interesting to count print hours or not if you are printing certain material.
For example,
If you have a hepa filter, you need to know print hours to replace hepa filter but if you are printing PLA filament, filters are stopped and those hours shouldn't be added to filter counter. However, if you are printing ASA or ABS, hours should be added to counter.

@3DCoded
Copy link
Owner

3DCoded commented Dec 27, 2024

Hi @llambion72 ,

That is an interesting idea. Just to confirm, you want to be able to specify if a certain maintenance is manually counted, with a parameter:

[maintain hepafilter]
...
always_active: false

And then, you can use commands at the start and end of a print to start and stop the counting:

# Print Start
{% if material == "ABS" or material == "ASA" %}
  START_MAINTENANCE NAME=hepafilter
{% endif %}

# Print End
END_MAINTENANCE NAME=hepafilter

@llambion72
Copy link
Author

I have this config in my voron,

[maintain the_filter_hepa]
label: The filter hepa
trigger: print_time
threshold: 600
message: replace hepa filter

If you print something allways count print time. If you want to print a PLA piece...

Print Start

{% if material == "PLA" %}
DISABLE_MAINTENANCE NAME=the_filter_hepa
{% endif %}

Print End

ENABLE_MAINTENANCE NAME=the_filter_hepa

Another idea could be insert exceptions in config

[maintain the_filter_hepa]
label: The filter hepa
trigger: print_time
exceptions: PLA
threshold: 600
message: replace hepa filter

exceptions could be catched as parameter from slicer. I allways pass type of filament, temperature and others as slicer parameter

@3DCoded
Copy link
Owner

3DCoded commented Dec 29, 2024

I'll start working on the first method, with ENABLE_ and DISABLE_MAINTENANCE.

@3DCoded 3DCoded changed the title Feature: Printing hours counter by material Feature: Enable/Disable maintenance timers Dec 29, 2024
@3DCoded
Copy link
Owner

3DCoded commented Jan 1, 2025

Hi @llambion72 ,

A beta for this feature is now available in the dev branch.

Installation

cd ~/KlipperMaintenance
git checkout dev
git pull
sh install.sh
sudo service klipper restart

Configuration (OPTIONAL)

Optionally, to make it disabled on start, add the disabled parameter to your specific maintenance:

[maintain hepafilter]
...
disabled: true

Commands

To enable/disable (pause/resume) maintenance reminders, use the ENABLE_MAINTENANCE and DISABLE_MAINTENANCE. Examples:

# assuming disabled: true for hepafilter

# Example PRINT_START logic

{% if material == "ABS" or material == "ASA" %}
# turn on HEPA filter
ENABLE_MAINTENANCE NAME=hepafilter
{% endif %}

# Example PRINT_END logic

DISABLE_MAINTENANCE NAME=hepafilter



# Alternatively,  you can insert this in your FILTER_ON macro

ENABLE_MAINTENANCE NAME=hepafilter

# and this in your FILTER_OFF macro

DISABLE_MAINTENANCE NAME=hepafilter

@llambion72
Copy link
Author

I've started to check it. I need to print some part in ASA and PLA. I'll give you some feedback on the next days.

@llambion72
Copy link
Author

I'll try two prints and I think that there are something wrong... Disable messages is shown for them but elapsed time for three elements is counted instead they are disabled

It's this my printer console log at this morning printing a part

$ MAINTAIN_STATUS
10:48:54 // Rails: 250.88h remaining
10:48:54 // Belts: 1900.88h remaining
10:48:54 // nevermore: 3.56h remaining
10:48:54 // The filter left & Right: 3.56h remaining
10:48:54 // The filter hepa: 530.5h remaining
10:48:54 // Extruder maintenance: 274.85m remaining
10:48:54 // Machine: 4900.88h remaining

Print start
10:59:08 // Maintenance "nevermore" disabled.
10:59:08 // Maintenance "The filter left & Right" disabled.
10:59:08 // Maintenance "The filter hepa" disabled.

Print end
12:22:53 // Maintenance "nevermore" enabled (disabled for 0.0h)
12:22:53 // Maintenance "The filter left & Right" enabled (disabled for 0.0h)
12:22:53 // Maintenance "The filter hepa" enabled (disabled for 0.0h)

12:25:26 // Rails: 249.46h remaining
12:25:26 // Belts: 1899.46h remaining
12:25:26 // nevermore: 2.13h remaining
12:25:26 // The filter left & Right: 2.13h remaining
12:25:26 // The filter hepa: 529.08h remaining
12:25:26 // Extruder maintenance: 269.39m remaining
12:25:26 // Machine: 4899.46h remaining

@3DCoded
Copy link
Owner

3DCoded commented Jan 4, 2025

I'll look into this...

@3DCoded
Copy link
Owner

3DCoded commented Jan 8, 2025

Hmm... I'm unable to reproduce the issue on my end. If I disable maintenance, wait a while, and then enable it again, it keeps the same time.
Screenshot 2025-01-08 at 6 29 48 AM

@llambion72
Copy link
Author

llambion72 commented Jan 8, 2025

I config print_time as the trigger.
In my case, I disabled maintenance only for the filters (two items), I printed for two hours and when i enable it again there are two hours discounted for all devices, disabled and enabled items.

My config file,

[maintain]
interval: 600 # optional, time (in seconds) between checking if maintenance needs to be done (default is 60)

Lubricate XY rods

[maintain rails]
label: Rails
trigger: print_time
threshold: 350
message: Lubricate XYZ rails

[maintain belts]
label: Belts
trigger: print_time
threshold: 2000
message: Revisar correas y poleas

Replace air filter

[maintain nevermore]
label: nevermore
trigger: print_time
threshold: 70
message: replace scorch

[maintain the_filters]
label: The filter left & Right
trigger: print_time
threshold: 70
message: replace scorch

[maintain the_filter_hepa]
label: The hepa filter
trigger: print_time
threshold: 600
message: replace hepa filter

Extruder maintenance

[maintain extruder]
label: Extruder maintenance
trigger: filament
threshold: 700
message: Clean extruder gears and tighten extruder bolts

[maintain general]
label: Machine
trigger: print_time
threshold: 5000
message: General deep maintenance

@llambion72
Copy link
Author

llambion72 commented Jan 8, 2025

On the print start macro,

{% if FILAMENT_TYPE == "ABS" or FILAMENT_TYPE == "ASA" %}
    # filters fans
    SET_FAN_SPEED FAN=nevermore_fan SPEED=0.8
    SET_FAN_SPEED FAN=thefilter_left_fan SPEED=0.8
    SET_FAN_SPEED FAN=thefilter_right_fan SPEED=0.8
    SET_FAN_SPEED FAN=thefilter_HEPA_fan SPEED=0.8

    # electronics fans
    SET_FAN_SPEED FAN=controller_fan_out SPEED=0.5
    SET_FAN_SPEED FAN=controller_fan SPEED=0.4

{% else %}

    M118 {FILAMENT_TYPE}, desactivo el contador de los filtros (disable filter maintenance)
    DISABLE_MAINTENANCE NAME=nevermore
    DISABLE_MAINTENANCE NAME=the_filters
    DISABLE_MAINTENANCE NAME=the_filter_hepa

{% endif %}

On the print end macro,

{% if FILAMENT_TYPE == "ABS" or FILAMENT_TYPE == "ASA" %}

    #Clean VOCs
    M118 Limpiando VOCs durante 10 minutos (VOCs cleaning)
    CLEAN_AIR MINUTES=10
    M118 Limpieza de VOCs finalizada (VOC clean finished)
{% else %}
    #Activo el mantenimiento de los filtros otra vez
    M118 {FILAMENT_TYPE}, reactivo el contador de los filtros (enable filter maintenance)
    ENABLE_MAINTENANCE NAME=nevermore
    ENABLE_MAINTENANCE NAME=the_filters
    ENABLE_MAINTENANCE NAME=the_filter_hepa

{% endif %} 

@3DCoded
Copy link
Owner

3DCoded commented Jan 10, 2025

Hi @llambion72 ,

Does enable/disable work if you do trigger: time (not print_time)?

@llambion72
Copy link
Author

Hi @llambion72 ,

Does enable/disable work if you do trigger: time (not print_time)?

What events add usage time with the 'time' parameter? Just by leaving it on or do I have to do something?

@3DCoded
Copy link
Owner

3DCoded commented Jan 17, 2025

Hi @llambion72 ,

For the time trigger, it's just arbritary time, independent of whether or not a print is running. It's a workaround, but you should be able to set disabled: true in the config, then use ENABLE_MAINTENANCE at print start, and DISABLE_MAINTENANCE at print end.

@llambion72
Copy link
Author

Ok, I'll try it

@llambion72
Copy link
Author

I've changed rails trigger to time instead print_time and I've printed a couple of parts.

Rails hours value, Rails: 249.46h changed to Rails: -1712.48h after 17h printing.

11:01:22
// Rails: -1712.48h remaining
11:01:22
// Belts: 1881.77h remaining
11:01:22
// nevermore: 58.17h remaining
11:01:22
// The filter left & Right: 68.17h remaining
11:01:22
// The hepa filter: 597.17h remaining
11:01:22
// Extruder maintenance: 185.9m remaining
11:01:22
// Machine: 4881.77h remaining

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants