Customize announcement plugin: User configurable rss feeds

Hi there, I would find it useful if the announcement plugin channels could be made user configurable i.e the user could add additional rss feeds to monitor for changes.

For instance I have a Prusa Mk3 and would appreciate it if I could be informed upon Octoprint startup that a new firmware is available. Therefore I would like to add the Github release-rss-feed of the Prusa repo to the channel list.

I already tinkered a bit with adding a new entry into the announcement dict but that did not end in the expected outcome. I will have to invest a bit of time in understanding the way the plugin works, in order to implement the editability.
Any tips or thoughts about it, help is also appreciated?

How important is it to implement a sanity check for the user entered data? Can the plugin cause any harm if it try's to check a non existent feed or any gibberish the user entered?
If so, is there a best practice for implementing the integrity check, or what conventions need to be enforced?

kind regards


Oh, subbing to github release feeds of firmwares is a neat idea!

In principle the plugin already supports custom feeds by manually editing the config.yaml file and adding them in that way. Example:

# ...
  # ...
    # ...
      # ...
        description: Prusa Firmware Release Notes
        name: Prusa Firmware Releases
        priority: 2
        type: atom
# ...

However I just found a small bug in processing the Github release feeds specifically which I'll have fixed in 1.3.10.

1 Like

Thank you, I think in combination with the M115 command and the upgrade firmware plugin it will make keeping the firmware up to date more comfortable.

I tried your example and it successfully created a cache for the new feed, but it did not display the contents. The mentioned bug seems to throw an exception which in turn stops the routine and leaves the message table unpopulated. Thus displaying no information for any stream.

I assume the handling of the open and close tags (partially converted to html) in the github feed is causing some parsing troubles?

On another note, can the config.yaml also be used to add a button to the upgrade firmware plugin which sends an M115 command to the printer and displays the returned text in a textbox next to it, or something like that?

Yep. Fixed in 7f9764c38.

No, slightly unexpected fields in the parsed feed entry.

Not that I'm aware off, that depends entirely on the plugin though.

Hi @foosel
do you have an EAT for Version 1.3.10?
IΒ΄d like to add this (and the Slic3rPE releases) to my octopi installation.

Or could I just patch the changes from 7f9764c38 into my running 1.3.9 (octopi 0.15.1) installation?

wow, that's what I call fast support, works like a charm.
Thank you.

Ok, was just a guess from a short compare of the .xml and .atom feeds

Ok, I thought the config.yaml could override the layout or plugin properties of every part of octoprint. But it can only modify the values that are stored/read from the config.yaml.
So if I would like to add this Button, it needs to be added directly to the upgrade firmware plugin.
Sry, but I have not much experience with programming web applications/applications with a gui. I will need to learn how this is done in octoprint, is there a particular tutorial for the spare time coder, that you would recommend?


Yes you can patch it yourself.
That's what I did with my 1.3.9 version of octoprint.
Just replace the file in the
/home/pi/oprint/lib/python2.7/site-packages/octoprint/plugins/announcements folder with the fixed one.

Thanks, worked!

When it's done :wink:

I usually try to avoid giving out ETAs thanks to reported issues, support requests and sometimes also life getting in the way constantly.