Idea for remote monitoring of 3d prints?

Hey all, I’m new to MakeICT (and I haven’t taken intro to 3d printing yet), but I recently had an idea for the FabLab. It looks like ultimaker printers have a web api built into them, meaning that one could query the printer for various information about what’s going on with the printer. (They don’t post the specification of this api publicly, but the openapi spec should be available on the ip address of the printer itself) I was thinking about developing an application that could show the progress or ETA of prints for each printer in the lab, while also potentially showing a preview of the stl file currently being printed? Maybe also attach a camera to the printers to provide a live view of prints?

Any thoughts on this?

3 Likes

We actually used to have a cameras on them, which you could see from the webpage. So if you were in another part of the building, you could still check up on your print. It clearly didn’t help you unless you were at the space. Currently you can’t access our network without VPN access, and all of our public facing access is hosted offsite.

2 Likes

Octoprint (via plugins) has this functionality already.

2 Likes

Yeah, this has been on the to-do list for a while. All of our printers are actually run through Octoprint, which is open source and has a documented API and a plugin system. So no need to deal with any undocumented proprietary systems. As Steve mentioned one minor hurdle would be getting the information from the internal network to an externally accessible server. There are multiple ways this could be accomplished: set up a VPN with the server, push data from Octoprint to the server, etc.

Having an externally accessible webpage with an overview of what the printers are currently up to would be very handy. The STL file wouldn’t be available, but there is an image that is integrated into the gcode file that should be accessible.

I look around every once in a while for pre-built solutions that fit the bill, but most external access setups are aimed at giving you full access to the printer and require login credentials, both of which are not desirable for our use case. If you want to try and tackle this I can definitely help get you started and pointed in the right direction.

3 Likes

If we do it right, it might also be a useful way of tackling the requested reservation system. If the status page showed how long is remaining, and maybe have a wait queue where someone could add their name for “next access”. If we wanted to put enough effort into it, it could even add notifications in to let the owner and the waiting user know that the print is finished.

4 Likes

Maybe we could try an agent that lives within the network that pushes to an API listening outside the network like on the cloud or something? That way we don’t have to worry about opening ports or dealing with VPN’s. However we’d have to worry about security on the API side, but fortunately that’s in the application domain and not the networking domain which means that we can work something out.

I guess a good starting point would be to ask what features we want from our public facing application. It sounds like we’re just wanting a view into what the printers are doing without necessarily requiring a login or providing external control? Is scheduling a part of it? Notifications when your print is done?

2 Likes

@Christian @brsmith7 and I talked about the Octoprint API a couple weeks ago. I tried to make a quick connection and it seemed like I needed authentication that I didn’t have. (Authentication would be a good thing.) Maybe I just didn’t know what I was doing.

In that conversation we thought posting the status of the printers would a good start and good learning base before moving on to a reservation system as mentioned by @SteveO.

I was going to try my hand at the API as an opportunity to learn more about Python but if someone else wants to take a shot at it - please do.

Is there a public directory on the Wiki where a file could be dropped? I’m assuming if we can drop a file there something could be created in the Wiki to display that data, would that be true?

2 Likes

Yeah, a great start would just be displaying printer status on an externally accessible webpage. Reservations are a whole different beast that would be further down the road.

Yes, you need an API key. We can make a user with read-only permissions and generate an API key for testing.

MediaWiki has an API but I’ve never looked into it. It might be easier to just link to an external page.

I’ll be in the Fab Lab tonight 6:30-8:30 if anyone is around and wants to chat.

2 Likes

Sorry Im unable to join today as I had a late night meeting for work. But I should be free to meet in person until the 14th when I go on-call.

1 Like

Some interesting endpoints I found on the documentation:

https://docs.octoprint.org/en/master/api/files.html#retrieve-files-from-specific-location
I believe that this endpoint should allow you to get a download url of a model either stored locally or on an SD card. I think this would be a neat feature to show a preview of what’s printing on a particular printer

This requires the files-list permission

https://docs.octoprint.org/en/master/api/job.html#retrieve-information-about-the-current-job
This one allows you to see details about the current job. Like which file is printing, ETA and current status of the printer. This is probably the most useful endpoint

This requires the STATUS permission

Given a service account is set up on a printer it should be fairly easy to query the printer on it’s current status using an http client. Then it’s just a matter of figuring out where we want to put that data

2 Likes

@xrunner
I’d be happy to help with this. Perhaps we could find some time to meet up at mICT and pair program on it.

2 Likes

Sounds good, I’m free this weekend

1 Like

@chris_w I’m going to be busy most of the weekend. If you and @ThatNerdUKnow want to give it a go you’ll need an API key. @Christian created one the other night but I’m not sure how to get it to either of you securely and in time for the weekend.

1 Like

@Christian is octoprint like custom 3d printer firmware? Or is it a server that’s able to talk to printers from various vendors?

1 Like

The latter.

2 Likes

Yeah, each printer has a Pi connected via USB that is running Octoprint.

@xrunner you can just send them the API key in a PM or email. It’s got read-only permissions, so even if someone gets it they can’t really do anything interesting. And we’ll probably change it when the system goes live anyways.

3 Likes

Oh, and in case it wasn’t clear: API keys are generated individually for each Octoprint instance. The one we generated was for the Ultimaker.

2 Likes

What’s the IP address of the printer?

1 Like

Addresses for all the printers can be found on the Wiki: 3D Printing - MakeICT Wiki

2 Likes

@ThatNerdUKnow @xrunner
I’m a bit busy this weekend, but will be at make ICT Tuesday and could work on it then (about 5-7pm). If either of you are available then, let me know.

1 Like