Skip to content

camerahacks/rpilocator-rss-feed

Repository files navigation

rpilocator RSS Feed Notifications

This is the official rpilocator.com and hwlocator.com RSS feed reader and push notification scripts and Node-RED flows. The RSS feed is checked every minute and the script/flow sends a push notification when a product comes in stock.

Send ntfy, Pushbullet, Pushover or Gotify notifications to your device.

If you appreciate the work I do with rpilocator.com and hwlocatorcom consider buying me a coffee. I spend a lot of time looking for Raspberry Pi computers (and other hardware), tweaking the sites, and communicating with different sellers so you don't have to spend your time doing it.

ko-fi

RSS Notification Setup

Ntfy

Download ntfy to your device (Android/iOS app, webapplication). Subscribe to any desired topic and insert it to the script:

NTFY_TOPIC = '<your topic here>'

If you want to use a private ntfy instance, you can also edit the NTFY_BASE_URL (without trailing /).

Pushbullet

Download Pushbullet to your device (Android/iOS App or Browser extension). After logging in to your Pushbullet account, create an Access Token. This token is used to send a push notification to your devices through the Pushbullet API.

Edit the script and enter your Access Token.

PUSHBULLET_TOKEN = '<your access token here>'

Pushover

Download Pushover to your device (Android/iOS/Desktop). After logging in to your Pushover account, register an application. You will need your user key and the application token/key send a push notification to your devices through the Pushover API.

Edit the script and enter your user key and application token/key.

# User Key
PUSHOVER_KEY = '<your user key here>'

# Application Key
PUSHOVER_API_KEY = '<your application key here>'

Gotify

Create an application in your Gotify server. You will need the token from the server to send a push notification to your devices through the Gotify API.

Edit the script and enter your server base URL and application token.

# Gotify Server Base URL e.g. https://mygotifyserver.com
GOTIFY_BASE_URL = '<your gotify server url>'

# Application Key
GOTIFY_TOKEN = '<your application key here>'

Python Dependencies

The script uses the Feedparser module to parse RSS feed information, so you'll have to install it first.

pip install feedparser

It also uses Requests to send the notification to the APIs.

pip install requests

Usage

Python Scripts

The easiest way to run the Pyhton scrips continuously is to use nohup

nohup python3 rpilocator-rss-pushbullet.py &

Node-RED Flow

You can import the JSON file into Node-RED as a new flow or just copy and paste it. Make sure to update the authorization information. For example, the Pushbullet node has a Access-Token header that needs to be update.

Filters

If you would like to only get notified if certain product categories come in stock in a certain country (for example), you can use the feed customizer at rpilocator.com or hwlocator.com.

After customzing the feed, update the FEED_URL variable.

FEED_URL = 'https://rpilocator.com/feed/?country=US,CA&cat=CM4'

The example above will only send notifications if Compute Module 4 comes in stock at a US or Canadian store.

Terms of use

The script is set to check the RSS feed every minute. Don't be tempted to change this to a faster update interval. Faster updates will be blocked and you will end up missing a stock alert :)

Feel free to modify the script and use with other RSS feeds. If you do so, please change the User Agent to something else. The User Agent is how web servers identify which software is accessing their website.

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages