OctoPrint addon dev help
Hey guys,

I'm hoping you can point me in the right direction to make this work.
I have a 3d printer, its in the basement so i monitor it remotely via a webcam stream/octoprint, i currently use the multicam addon to see the webcam stream.

what i want to do is make an octoprint addon that will display the webcam stream, and overlay print stats (time to completion etc)

I'm not a python dev and in over my head a little so some help would be greatly appreciated, i cant seem to find what i need from searching.

i think can hack up multicams existing code for the picture, and i can figure out how to retrieve the data and build the strings using json or something, but what call would i need to overlay the text on the picture?

thanks so much for the help!
Thread moved to add-on requests
| Banned add-ons (wiki) | Forum rules (wiki) | VPN policy (wiki) | First time user (wiki) | FAQs (wiki) | Troubleshooting (wiki) | Add-ons (wiki) | Free content (wiki) | Debug Log (wiki) | Free Movies/TV Shows |
... and moving back to python dev :-)

i'm not familiar with the multicam addon, so i can't tell how to expand it.

what you would basically need is a script type addon which uses WindowsXML.
in your xml file, define a videowindow control and a label control.
your python file should start the playback of the stream and set the text of the label control.

you can use a few bits and pieces from this tutorial:
HOW-TO:Script_addon (wiki)

links to the python functions you need to set the text of the label control:
- get the control:
- set the label of the control:
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
Thanks for the help.

I got it working and done v1.0 Tongue

Can some one advise where to post it for others to find it and use it?
you can start a release thread in the program addons section:

if you'd like it to be included in the kodi repo, here's the details on how to submit it:
Submitting_Add-ons (wiki)
Do not PM or e-mail Team-Kodi members directly asking for support.
Always read the Forum rules, Kodi online-manual, FAQ, Help and Search the forum before posting.
@Kaziya  - tried to send a PM but you have them disabled. 

This sounds like a great idea, I use Octoprint too. Currently I use a .strm file to just display the camera but I like the idea of having a more functional addon. I'd be willing to test out what you have or help with the addon if you need it. 

@robweber I'll need to check that.

I got it working great, would like to display the txt better among a few other ideas... But hey I'm very happy with what I've got so far.

You can find it here :
Next ideas to add is the ability to monitor multiple printers and switch between them.
I figure default to load printer profile 1
On say tab key, switch to next printer.

When called externally, I plan to add some sort of printer=x, X being which printer profile. So default can be bypassed. (I click print then when preheated a script is called to run kodi addon so I can be watchin and ready to cancel a bad start)

I made a mini addon for PnP, I was thinking of adding a way to switch between mini display and full screen. Maybe in 1 addon by shortcut key. Call self mini=1 maybe..

Lots to learn, feel free to hack and mod it and add what ever features you think would be nice to have or make better code.
Thread Rating:
  • 0 Vote(s) - 0 Average

Logout Mark Read Team Forum Stats Members Help
OctoPrint addon dev help00