I want Help Creating a Simple OctoPrint Plugin

Hey everyone,

I got inspired to build a small plugin that customizes how my printer interacts with filament runout detection. Telegram alert when a runout event happens & pauses the print cleanly.

I have been poking around the plugin tutorials & GitHub examples but I am still trying to wrap my head around the plugin structure, when it comes to hooking into events and writing clean, modular code. I have got some Python basics down but most of my background is in web dev. I did a Golang Training course, so my brain’s still wired in that direction, lol. Also i have check this Help: Creating a Button to send Wake on Lan from OctoPi to Home PC? still need help.

Any tips, code snippets or even a minimal boilerplate template to get started? Plz share with me.

Thank you.:slight_smile:

Hello @Sofiaya !

And that has to do what with networking? I'll move it to Get Help, ok?

Simply running the command octoprint dev plugin:new will get through a lot of the boilerplate structure for a plugin. then you just fill in the python/js code into the files it creates and add your jinja2 templates for the UI. The helloworld plugin tutorial is also a great starting point for explaining how things link together. It really boils down to what you are trying to create to give better guidance on what to look at in the docs.