Zum Hauptinhalt springen

RSS & Atom Smart-Home-Integration, kostenlos und Open Source

RSS & Atom-Integration für Gladys Assistant

Latest articles of your RSS and Atom feeds: a dashboard widget and "new article" scenes.

Info

Die Dokumentation dieser Integration wird von ihrem Autor geschrieben und ist bisher nur auf Englisch verfügbar.

Reads the RSS and Atom feeds of your choice and brings their latest articles into Gladys: a dashboard widget, a scene trigger when a new article is published, a scene action to read the latest one into a message. No account, no key. This integration is not affiliated with the publishers of the feeds you read: the articles, titles and summaries belong to them.

What you get​

SurfaceContent
WidgetNews feeds: the latest articles of one feed or of all of them, newest first, with the source, the age, the summary and the link (tap an article)
Scene triggerNew article in a feed, optionally only for one feed and only for a keyword of the title
Scene actionLatest article of a feed: title, link, summary, publication date and number of matching articles
Settings buttonTest the feeds: reads every feed now and shows its format, its number of articles and its latest title, or the error

Supported formats: RSS 2.0 (and 0.9x), RSS 1.0 (RDF) and Atom 1.0.

Setup​

Type the addresses of your feeds in Feeds, separated by commas. Each address may be followed by a custom name, after a space or a |:

https://www.lemonde.fr/rss/une.xml Le Monde, https://community.gladysassistant.com/latest.rss|Forum
  • Only http:// and https:// addresses are read; an entry that is not one is ignored and named (by its position) in the status and the test button.
  • Without a custom name, a feed is named after its own title (for example "Debian News"). A short custom name is easier to type in a scene.
  • A feed protected by a password can be written https://user:[email protected]/feed.xml: the password is sent to that server only, as an Authorization header, and never appears in the logs.
  • A comma inside an address must be written %2C.

Then press Test the feeds: each feed answers with its format, its number of articles and its latest title.

Articles kept per feed (10 by default) is the number of newest articles of each feed the widget and the scene action look at.

Reading pace​

Each feed is read every 15 minutes by default (option Reading interval, 5 minutes at least), one feed after another. The integration is polite with the publishers:

  • it asks "has it changed since?" (ETag, Last-Modified): an unchanged feed costs the publisher an empty answer;
  • when a publisher asks for a longer delay (Cache-Control: max-age or the RSS ttl), it is honoured, up to 6 hours;
  • a feed that fails is retried after the interval, then less and less often (up to every 4 hours), and after the delay a busy server asks for (Retry-After).

Scenes​

New article in a feed starts a scene when a feed publishes an article that was not there at its previous reading. Its two filters, both optional:

  • Feed name: the custom name of the feed, or its title when it has none, exactly as the widget or the test button shows it.
  • Keyword: list keywords in the Keywords option of the integration (for example Gladys, Zigbee, storm). A new article whose title contains one of them (case and accents ignored) carries the first one found, and a scene whose keyword filter is that word, spelled exactly as in the option, runs for it.

Variables: feed, keyword, title, link, summary (up to 1000 characters, without HTML) and published (ISO date, empty when the feed gives none).

Good to know:

  • After a start of the integration, the first reading of each feed only learns which articles are there: it starts no scene. The memory of the articles already seen is not written on disk.
  • A feed that publishes many articles at once starts at most 5 scenes per reading (the 5 newest).

Latest article of a feed gives {{title}}, {{link}}, {{summary}}, {{published}}, {{feed}} and {{count}} for the newest article of a feed (its name or its position in the list; empty for all feeds) whose title contains a word (optional). count is 0 when nothing matches.

Widget​

Add News feeds to a dashboard. Settings: the feed (its name, its position in the list, or empty for all feeds) and the number of articles shown (1 to 8). Tap an article for its summary and its link. An http:// link is opened in https://, the only kind the dashboard accepts.

Troubleshooting​

  • "not an RSS or Atom feed": the address is a web page, not its feed. Look for the RSS icon or a <link rel="alternate" type="application/rss+xml"> in the page source.
  • "HTTP 403": some sites refuse automated readers; nothing to do on the Gladys side.
  • "answer over 2 MB": the feed is too big to be read safely; publishers often offer a shorter one (per category).
  • "more than 5 redirects" or "timeout": check the address in a browser.
  • Logs: the integration's log level is set with the LOG_LEVEL variable. The logs name the feeds by name and host only, never their full address (it may carry a token).

Privacy and security​

The integration only contacts the addresses you typed, and the ones they redirect to (http and https only, 5 redirects at most). Each answer is abandoned past 2 MB or 15 seconds. Every text is stripped of its HTML and bounded (title 300 characters, summary 1000) before it reaches Gladys. Nothing is written on disk.

Konfigurationseinstellungen​

Diese Einstellungen fragt RSS & Atom in seinem Konfigurationsbildschirm in Gladys ab.

EinstellungTypPflichtfeldBeschreibung
Your news feeds in GladyssectionNeinReads the RSS 2.0, RSS 1.0 and Atom feeds you list below (no account, no key): a "News" widget shows their latest articles, a scene can start when a new article is published (optionally only for a keyword in its title), and the "Latest article" scene action reads one into a message. Not affiliated with the publishers of the feeds: the articles belong to them. Feeds are read one after another, every 15 minutes by default, or less often when a publisher asks for it.
FeedsstringNeinFeed addresses (http or https), separated by commas. Optional custom name after a space or a | — e.g. "https://www.lemonde.fr/rss/une.xml Le Monde, https://community.gladysassistant.com/latest.rss\|Forum". The name is what scenes and widgets use to pick a feed.
Reading interval (minutes)numberNeinHow often each feed is read. A feed that asks for a longer delay (Cache-Control, ttl) is read less often.
Articles kept per feednumberNeinThe newest articles of each feed shown by the widget and the scene action; a new article is announced once it enters them.
Keywords for the "new article" triggerstringNeinOptional, separated by commas. A new article whose title contains one of them (case and accents ignored) carries it, so a scene can filter on it: type it in the trigger exactly as here.

So installierst du RSS & Atom in Gladys​

  1. Öffne in Gladys Integrationen: RSS & Atom erscheint im Katalog neben den nativen Integrationen, mit einem Community-Badge.
  2. Klicke auf Installieren. Gladys lädt das Docker-Image (ghcr.io/lm1lc3n7/gladys-rss:0.1.1) herunter, startet es in einer vom Kern isolierten Sandbox und erzeugt die Oberfläche der Integration (Geräte, Erkennung und Konfiguration).
  3. Öffne den Bildschirm Konfiguration der Integration, fülle die Einstellungen aus und speichere.
  4. Du kannst sie auch direkt über die URL ihres Repositorys installieren: https://github.com/LM1LC3N7/gladys-rss.

RSS & Atom benötigt Gladys >=5.1.0. Der Katalog in Gladys wird stündlich aktualisiert, eine neue Version ist also spätestens eine Stunde nach ihrer Veröffentlichung verfügbar.

Du nutzt Gladys noch nicht? Es ist kostenlos und Open Source: folge der Installationsanleitung, um loszulegen.

Über externe Integrationen​

RSS & Atom ist eine externe Integration: eine Community-Integration, die als Docker-Container verpackt und auf GitHub veröffentlicht wird. Gladys installiert sie mit einem Klick und führt sie in einer vom Kern isolierten Sandbox aus. Sie wird von LM1LC3N7 veröffentlicht und gepflegt, nicht vom Gladys-Kernteam.

Abonniere den Newsletter von Gladys Assistant

Ein paar E-Mails im Monat zu neuen Releases und Neuigkeiten aus dem Projekt. Verschickt von Pierre-Gilles Leymarie, dem Gründer des Projekts. Jederzeit abbestellbar 🙂