Adding a custom HTML page


#1

Is it possible to add a custom HTML page to Octoprint? I would like to create a functionality that:

  • requires only HTML, JS, CSS and no server side logic,
  • requires a full webpage,
  • utilizes existing Octoprint functionality, e.g. read temperatures or extrude now,
  • ideally does not require an additional login, but uses the existing authentication session of Octoprint.

So my plan is to create a new webpage, and let Octoprint to host it from the same origin, and the page call the same backend endpoints that the current Octoprint UI does.

I don't want to set up another webserver just for a simple webpage, so can I create a page that will be served by the Octoprint webserver?

Thanks.


#2

Check out the bottom of the article. This project was looking very promising, but the developer stopped responding to me.

He did however make a custom landing page to connect to 4 virtual instances of octoprint. I was able to get that part working, and it was awesome!!

http://sebastien.andrivet.com/en/posts/installing-multiple-octoprints-raspberry-pi-3-version-2/


#3

If you really want to serve it from OctoPrint's built in server: Not without writing a plugin. If that is an option, take a look at the BlueprintPlugin mixin.


#4

Thanks for the link, Brandon. This is a very interesting article, and if I understand correctly the author used Nginx to host that landing page. I'll try that, but I was hoping to find a simpler solution.


#5

Thank you, Gina, I'll check the plugin development docs.