3D Printer Binding?

Hi together,
3D printers are becoming cheaper in the moment (M3D Micro).
maybe someone of the OpenHAB users owns a 3D printer or is going to buy one. A lot of 3D printers uses similar firmwares like marlin. There is a very nice software called OctoPrint which offers a really strong API to control different kinds of 3D printers (http://octoprint.org/). I don’t know how much a 3D printer belongs into a SmartHome. Maybe other users are interested too to control their 3D printer through OpenHAB or ESH.

A possible Thing definition would be:

octoprint:printer:ultimaker2 [ip=“192.168.178.78”, port=5000, apiKey=“XXXXXX”]

Channels could be:
nozzleTemperature
nozzleTargetTemperature
bedTemperature
bedTargetTemperature
printerState (disconnected, error, printing, finished, ready…) as a Number or a Text? I would prefer a number.

Do you have some additions? Is there a demand for a 3dprinter/octoprint binding?

If there are not additions and a demand is existing I would start coding :slight_smile:

1 Like

I know of no 3D printer bindings. I’m not sure how much in demand one would be. I notice that the API is REST based. If it is and doesn’t require complex authentication etc. I would actually recommend documenting how to set it up using the HTTP API rather than building a brand new binding. There are already soooo many bindings and keeping the bindings up to date is one of the things that makes openHAB releases so slow and painful.

There is already precedence for this approach with the Roku and Zoneminder.

1 Like

I am actually working today on integrating my octoprint with openhab. I am using the mqtt plugin for octoprint and having openhab watch those mqtt nodes.

My scenario is to use the events sent from octoprint to turn my printer enclosure lights to red when everything is heating up. White while printing for the timelapse, and blink when done and turn off the lights.

2 Likes

Yes a REST setup or a binding will be great

I just set something up for my Reprap (duet electronics) to pull the printer status from the printer.
I don’t know how octoprint handles things but the duet web interface has 3 different json files so the HTTP binding pulls the data pretty easily.

Use network health binding to verify that the printer is up, use http binding to pull the status.
Depending on the network health I’ll show a sitemap menu for the printer, and depending on the status I’ll show a video stream of the printer.

Eventually I want to get rules put in place for audio notification at certain stages of the print… after it’s warmed up get a notification on the stereo, once it’s done get a notification, and then get a notification again once the heated bed has cooled down.

Did anyone develop a binding for OctoPrint?
I would like to be able to perform the following actions:
At start of print, during bed and nozzle temperature warm up, switch on light (using tplink hs105)
At end of print, turn off light
If print. error send notification.

any guidance is appreciated, I also have mqtt setup but though using a binding would be easier than pub/sub rules

I use the mqtt plugin for octoprint. It then fires events at different times and I trigger openhab off them

I have connected octoprint via http Json rest API.

This could be a starting point for what you want to do!

1 Like