I saw the Octoprint driver didn't fully support Klipper, so I wrote one in a day, it's provided as is and you just need to add the Klipper Pi IP address, this uses the Moonraker API and was specifically developed to work with Fluidd as that is my setup, I understand that this should also work with Octoprint assuming Moonraker is installed there too..
I don't have a lot of spare time to further develop but pull requests are welcome, other features may be added when I have some time to do so.
Features:
Get various print/printer details, see pic below (ad-hoc or timed refresh)
Printer Control - Home (G28), FIRMWARE_RESTART, EMERGENCY_STOP
GCODE - execute any gcode command including custom gcode
Print file - Print any file on the server by filename
Looks great, haven't tried it yet. I'm wondering if this allows fluid to control a hubitat device? I'd like to turn off a Z wave switch when the print ends. Thanks for your effort!
This is really well timed! I was just looking for a solution to use a Sonoff zigbee plug (without flashing Tasmoto) to turn my printer on and off when not being used.
One simple question - how do you pair the Klipper/Fluidd device with Hubitat?
Got it running and did a test print. All works well and I am able to see the job status, etc. Thanks for putting this driver together!
One question - is there a way to recognize that I've sent a job to klipper and use this event to trigger a hubitat action (turn on the smart plug). This would allow me to use the smart plug to both turn on and turn off the printer. I looked through the driver code and didn't spot anything that checks the queue or anything like that.
Sorry I didn't get any notification of your question, however I don't think so, I guess if you send a job to Klipper and the MCU isn't alive it'll fail even if the printer was then turned on later.. you could obviously setup an action to turn on the switch, pause and then do a firmware restart, allowing everything to be in the correct state before hand, but I think what you are asking needs to be in Klipper itself
V0.5 - Changed RunIn to Schedule, changed checks from seconds to minutes in settings
This will fix longer term reliability issues.. mine had unscheduled itself likely due to another issue with an unexpected value being returned from Klipper (next time I print I'll see if I can work out what the issue is)
Ok...I haven't been active here for a long time. Still have my hub doing great!!! Just saw this looking for some Klipper update stuff and was intrigued. It installed perfect and easy for me!!! All current data from my printer is displaying great!! Thanks for a wonderful addition. Now to think how to integrate this into some of my automations...
No problem, I’m just using it mostly for print complete notifications, I’ve just attached a smart plug to my printers so will see if I can add support for powering the printer on and off rather than just reporting.
But if you have any issues let me know, it’s not very well tested, but I think I’ve ironed out most of them now!
If you manually disable debug logging do you still get the errors? If not then it’s fine it’s an issue with the debug lines rather than the core code, looks like it’s erroring on the additional reporting data which might be different based on slicer perhaps