Building a Drupal RSS Reader on WebScreen
Someone asked if WebScreen could show Drupal news from RSS feeds. Seemed like a fun challenge, so I spent an afternoon building one. Here's how it went.
The Basic Idea
WebScreen already has a "fallback mode" that shows notifications with animations. Instead of getting notifications from the serial port, why not get them from RSS feeds? Same display system, different data source.
The plan was simple:
■ Download RSS feed every 5 minutes
■ Find new articles since last check
■ Show them with the same scrolling animation
■ Store last check time so we don't show old news
Setting It Up
First, I added RSS support to the config file:
{
"settings": {
"wifi": {
"ssid": "***",
"pass": "***"
},
"mqtt": {
"enabled": false
},
"rss": {
"enabled": true
}
},
"screen": {
"background": "#000000",
"foreground": "#FFFFFF"
},
"script": "drupal_aiot.js"
}And created a simple RSS config:
{
"feed_url": "https://www.drupal.org/planet/rss.xml",
"check_interval_minutes": 5
}
The Real Work: Parsing RSS
RSS looks simple but has some tricks. The XML structure is basic:
// Extract content from RSS XML tags
String extractXMLContent(const String& xml, const String& tag) {
String openTag = "<" + tag + ">";
String closeTag = "</" + tag + ">";
int startPos = xml.indexOf(openTag);
if (startPos == -1) return "";
startPos += openTag.length();
int endPos = xml.indexOf(closeTag, startPos);
if (endPos == -1) return "";
String content = xml.substring(startPos, endPos);
// Clean up HTML entities like ' -> '
content.replace("'", "'");
content.replace("&", "&");
content.replace(""", "\"");
return content;
}Debugging with Serial Monitor
The serial monitor became my best friend during development. It shows exactly what's happening:
18:01:33.560 -> New item: Drupal AI Initiative: Co-designing the future: Share your views on our Drupal AI roadmap
18:01:33.560 -> New item: mandclu: Event Platform: July 2025 Updates - Fri, 18 Jul 2025 10:33:26 +0000
18:01:33.560 -> New item: The Drop Times: HIPAA & ISO 27001 Compliance for Enterprise Websites in 2025
18:01:33.592 -> Updated last check time in flash: 2025-07-22 09:01:33 (0)
18:01:33.592 -> Found 30 new RSS items, showing latest: Drupal AI Initiative: Co-designing the future
18:01:33.592 -> Displaying latest RSS item (1/2): Drupal AI Initiative: Co-designing the future
18:01:48.627 -> Displaying latest RSS item (2/2): Drupal AI Initiative: Co-designing the future
18:02:03.683 -> Returning to GIF display after showing item twiceThis output tells me everything:
■ How many items were found
■ Which item is being displayed
■ When it shows the item twice (like the original fallback)
■ When it returns to the GIF animation
■ When the next RSS check happens
Later, when no new items are found:
18:06:29.141 -> Received 140804 bytes of RSS data 18:06:29.141 -> Last check time (flash): 2025-07-22 09:01:33 -> 1070373432 18:06:29.173 -> No new RSS items foundTesting Different Items
Added a debug feature to easily test different scenarios:
{
"feed_url": "https://www.drupal.org/planet/rss.xml",
"check_interval_minutes": 5,
"lastcheck_debug": "2025-07-21 17:59:00"
}This lets me manually set the "last check" time to see specific items.
How It Works
■ Boot: WebScreen checks config, sees RSS is enabled
■ Setup: Connects WiFi, syncs time with NTP servers
■ First Run: Downloads RSS feed, finds all items newer than stored timestamp
■ Display: Shows latest item with slow scrolling animation (twice, like serial notifications)
■ Wait: Returns to GIF, waits 5 minutes for next check
The display flow is exactly like the original fallback mode:
■ Welcome animation with cat ASCII art
■ Transition to notification GIF
■ When new item found: show scrolling text twice
■ Back to peaceful GIF
What's Next?
This RSS reader could easily become:
■ Multi-feed support
■ Keyword filtering
■ Weather updates
■ Stock tickers
■ Social media feeds
The foundation is flexible enough for lots of ideas.
Support Us on Crowd Supply
We’re on Crowd Supply, and we need your help to bring WebScreen to more people. Your backing makes it possible to keep prices low and quality high—so everyone can enjoy the power of an open-source secondary display.
Check out the campaign and get involved: WebScreen on Crowd Supply