nevermore3d / Nevermore_Micro

Activated Carbon Filters. Bad smells or fumes, or complaints thereof, should not keep you from being a maker!
1.21k stars 131 forks source link

API klipper for changing carbon after notofication? #62

Open mwalter665 opened 8 months ago

mwalter665 commented 8 months ago

Hello,

i have already several API endpoints from klipper, so that I get infos to my homeassistant. For example the whatsapp message when a print is ready, or switching Power of when the temp of the head is under 40°C.

Now I thougt that I can get the statistics from klipper too and every x hours of printing i get a notification to change the carbon in the box.

The YAML and sensors with calculating in homeassistant is not the problem, but I couldn´t find an endpoint for getting the values, which I can see on the history page of mainsailos. Has anyone maybe an idea? Or how do you bei informed if the the 50 hours are gone since last change?

irgendwer92 commented 7 months ago

Hi, maybe this helps a bit, but i haven't done it and am in a hurry:

Using this super useful macro i found that klipper has the variable printer.toolhead.print_time which seems to be the total print time.

Elli shared this macro that prints a variable to the console, maybe it's useful for you, at least in parts.

With [save_variables] you enable persistent variables, you can use that for the value of printer.toolhead.print_time from the moment you click a 'charcoal_changed' macro or something like that.

However i don't have any knowledge of the moonraker API.