Octopi integration

I recently migrated to Hubitat and I am not only impressed with the product but also with the support and wealth of knowledge on this forum.

I have recently gotten into 3d printing and have set up my Octopi to handle the printer and it works great. However, I would like to be able to set it up to do the following (for starters):

  1. Turn the printer on (I have a ZWave plug)
  2. Print
  3. Turn the printer off

I did a search and I couldn't find either a plugin for Octopi or an app/driver for Hubitat.

Is there something like that available? I am halfway competent with code so, I can put something together if anyone has any pointers.

I am fully aware that I can just switch between the two websites and do it myself but, I'm lazy. If I weren't, I wouldn't have gotten into home automation!

Thanks!

1 Like

I do something similar (with regular printers) using @fblackburn's Node-RED Hubitat integration.

I have two laser printers - both of which are on z-wave outlets. I use scripts run out of systemd that monitor the spool for each printer. When the number of documents in the spool is >0, using MQTT, a message is sent to turn on the appropriate printer (if it is off). Five minutes after the spool has zero documents, the printer is turned off (if it is on).

Works exactly as intended, and I imagine this could be adapted to work with any printer that has a spool that can be monitored and is plugged into a z-wave outlet.

2 Likes

That's really cool. When I finally set up a dedicated Node-Red box...this is going on the list!

S.

1 Like

Be cooler if I had a 3D printer .... might have to get one.

That solution might work, thank you @aaiyar though I was hoping for some better integration.
And yes, you ought to get one!

there are octo pi plug ins that do this TP-link smartplug is one
look here to start

Well, through the MakerAPI, you can use curl/wget on your OctoPi to directly send on/off commands to the Hubitat Elevation. Node-RED isn't required. Personally, I use Node-RED for all my automation, so for me using NR was natural.

1 Like

I wrote a little HE MQTT driver virtual switch that monitors octoprint status (Started, Done and progress %. Then a little RM rule to turn on/off the lamp next to it and turn off the power outlet of the printer 5 minutes after it's done (I don't want to turn off the cooling fans too soon). This is enough to turn things off when I'm sleeping and a print completes.

A couple of notes: Monitoring temperatures generates a lot of events, too much for HE, imo. Practically speaking one is better off watching that sort of detail with octoprint (I use the Cura/Octoprint plugin instead of the Octoprint web page to manage things.) It would be impractical to do much more control or monitoring inside HE. Not to mention the enormous duplication of effort.