Giter Site home page Giter Site logo

rpilocator-rss-feed's Introduction

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.

rpilocator-rss-feed's People

Contributors

benscobie avatar camerahacks avatar john-h-smith avatar sirianni avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.