OctoPrint addon dev help
#1
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!
Reply
#2
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)|

Kodi Blog Posts
Reply
#3
... 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:
https://kodi.wiki/view/HOW-TO:Script_addon

links to the python functions you need to set the text of the label control:
- get the control:
https://codedocs.xyz/xbmc/xbmc/group__py...9835092d65
- set the label of the control:
https://codedocs.xyz/xbmc/xbmc/group__py...0ca9bbe560
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.
Reply
#4
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?
Reply
#5
you can start a release thread in the program addons section:
https://forum.kodi.tv/forumdisplay.php?fid=151

if you'd like it to be included in the kodi repo, here's the details on how to submit it:
https://kodi.wiki/view/Submitting_Add-ons
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.
Reply
#6
@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. 

https://github.com/robweber
Reply
#7
@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 :
https://github.com/MaritimeMaker/Octoprint-Kodi
Reply
#8
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.
Reply

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