[RELEASE] OctoPrint Driver to Manage Jobs

Well first I'm pretty new to Hubitat, but I've spent 2 hours trying to find this after installing it in Hubitat. Can someone give instruction on how to setup in Hubitat? I've got it install via HPM.

I've looked under rules, notifications and can't find it. I know this needs to be configured to find the pi and I can't figure that out either.

Thanks,

Did you create a new device?
I think you create a virtual device and select the Octoprint driver.

1 Like

Perfect Thanks.

Anyone know how to make it trigger something when job is done?

There might be a better way but I would explore using RM and the custom attribute trigger, which compares what you give it to the current states of the printer. You need to do some research first though into what the options of the states are.

Did you ever figure this out? I am looking to do the same

No :frowning:

I told you guys how to do it, see my screenshot below for a more concrete example, it is using the completion attribute, but there might be other ones which you would want to reference such as the print times or the current state:


This is how I did my notification in RM.

1 Like

Thanks to @mike10 for starting this project. I recently got a 3d printer with octopi setup and wanted to integrate into hubitat for data logging and notifications. I added some enhancements to the project and submitted a pull request in github which is now in the main branch.
With the new updates, additional states are available to trigger from and there are now 2 polling delays, a long delay for polling when the printer is idle, and a short delay for polling when the printer is actively printing or the hot end is above 50c.

This is how I manage my notifications for print job complete:

This will save the % complete each time it changes, and when it gets reset back to 0 when a print ends, RM will make sure the previous value was over 90 and then send a notification. This helps prevent notifications in the case I need to cancel the print within the first few layers (or before 90% complete) for whatever reason.

OMG, Thanks to everyone who worked on this. I got to say its people like you that make the community and Hubitat so awesome to work with

Thanks to @mike10 and @proffalken for these. I was able to figure out how to install the version in the HSM and I created a virtual device using that driver. I also created an app API in OctoPrint for one of my printers to test this.

I am interested in creating a tile for a dashboard using data from this virtual device. I added a tile that used the OctoPrint device then I wasn't sure what template to use from there. I tried the "attribute" template, but am not sure what attributes are correct or should work. If I use the "Completion" attribute it says "0". I have tried a bunch of different attributes, but none make sense.

is there a completely different tile I should be looking at?

Thanks!

The attribute tile is what you want. You will see the attributes reflect correct values when you are printing something. If there is nothing being printed, then the attributes get reset to their default values.

Here is my dedicated dashboard for octoprint using the attribute tiles:

i am using the DisplayLayerProgress addon in octoprint and have that preference enabled in the hubitat driver to get the DLP values from the addon. The "completion" attribute is the % done for your current print. so it should be 0 if you are not printing anything.

1 Like

That looks very cool, but I’m not sure what I’m looking at. Is that a big video screen with Hubitat tiles on top of it?

Also, I thought the app had been updated to get readings even when not printing? A few posts below the OP I thought there was a comment that reflected that with some sort of updated code?

I did a pull request to the original authors code and added some features.

I have the background of my dashboard using the video from my octoprint so i can see the current status of the print, this may be a custom driver I made, but cant remember the details right now. [edit, its using the iFrame device driver, and creating an iframe for the video window from the octoprint web server]

I meant to direct your attention to the tiles on the right side of the screen. those are just attribute tiles showing different attributes of the octoprint device. you should be able to add those to any dashboard.

Is it possible to send a firmware_restart command (or any console command really)? I'd like to have it reconnect to the MCU after it detects that my printer's smart switch has been toggled on.

@tofu it would need to be supported by the API. I don't see a firmware_restart in the API, if you have a link I could look at it. I did add a command to tell octoprint to try and connect to the printer.

@mike10 Thanks for the reply!

I was actually using your driver with Fluidd instead of octoprint. Since all the "current states" and "state variables" were functioning, I had assumed all of the other features were working as well. It appears that's not the case. Looks like this alternate Klipper UI would need a completely different plugin. Thanks anyway!

Probably a few years too late, but I found this post yesterday and had the same problem, so I wrote a Klipper/Fluidd version:

Not too late at all! I moved on from HE to home assistant, but I still use the HE hub for radios and odd devices. Thanks! I'll give this a go sometime this week :slight_smile:

1 Like

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.