Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tesla Inventory Notifier

A Tampermonkey/Greasemonkey userscript that monitors Tesla's Model 3 and Model Y inventory pages and sends notifications via ntfy.sh when new vehicles become available.

Features

  • Real-time monitoring: Intercepts Tesla's inventory API responses
  • Multi-language support: Automatically detects French (/fr_*) or English URLs
  • Notification filters: Filter by motorization and color
  • Auto-refresh: Automatic page refresh (randomized 60-180s to avoid blocking)
  • ntfy.sh integration: Push notifications to your phone/desktop
  • VIN tracking: Remembers seen vehicles to avoid duplicate notifications

Supported Models

  • Model 3 (/inventory/new/m3*)
  • Model Y (/inventory/new/my*)

Installation

1. Install Tampermonkey

Install the Tampermonkey extension for your browser:

2. Install the Script

  1. Open Tampermonkey in your browser
  2. Click "Create a new script"
  3. Paste the contents of tesla-notifier.user.js
  4. Save the script

3. Configure Notifications

When you first visit a Tesla inventory page, the script will prompt you for:

  1. NTFY URL: Your ntfy.sh topic URL (e.g., https://ntfy.sh/my-tesla-alerts)
  2. Bearer Token: Your ntfy.sh access token (starts with tk_)

These credentials are stored locally in your browser and are never sent to any server except ntfy.sh for notifications.

4. Get ntfy.sh Credentials

  1. Go to ntfy.sh
  2. Create an account or use a public topic
  3. Go to Settings → Access Tokens
  4. Create a new token (starts with tk_)

Usage

  1. Navigate to a Tesla inventory page:

    • Model 3: https://www.tesla.com/*/inventory/new/m3*
    • Model Y: https://www.tesla.com/*/inventory/new/my*
  2. The Tesla Notifier panel will appear in the bottom-right corner

  3. Configure your filters:

    • Motorization: Select which trim levels to monitor
    • Color: Select which colors to monitor
  4. Click "Auto" to enable automatic refresh (randomized 60-180s)

  5. When a new vehicle matching your filters is found, you'll receive a notification

Panel Controls

Button Function
Auto Start/stop automatic refresh (60-180s randomized countdown)
Reset Clear all cached VINs (single click)
Reset (double-click) Clear VINs + reset ntfy configuration
Logs ▶ Show/hide activity log
- Minimize/expand panel

Resetting Configuration

To change your ntfy.sh credentials:

  1. Double-click the "Reset" button
  2. Confirm the reset
  3. Refresh the page
  4. You will be prompted for new credentials

Alternatively, you can clear Tampermonkey's stored values:

  • Tampermonkey → Dashboard → Tesla Stock Notifier → Storage → Clear

Language Support

The script automatically detects the language based on the Tesla URL:

URL Pattern Language
/fr_*/ French (Français)
All others English

Currently supported languages:

  • French (fr)
  • English (en)

Adding More Languages

To add a new language, edit the i18n object in the script and add a new language key:

const i18n = {
	fr: { ... },en: { ... },
	de: { // German// Add all translations here
		title: 'Tesla Notifier',
		filtersTitle: 'Benachrichtigungsfilter',
		// ...
	}
};

Then update the language detection logic:

const lang = urlMatch && urlMatch[1].toLowerCase().startsWith('fr') ? 'fr' 
           : urlMatch && urlMatch[1].toLowerCase().startsWith('de') ? 'de' 
           : 'en';

Notification Format

Notifications include:

  • Year and trim
  • Price (EUR)
  • Mileage (km)
  • Exterior color
  • Interior color
  • VIN
  • Direct link to order page

Example:

2025 Premium Grande Autonomie Propulsion
Price: 45,990 EUR
Km: 0
Color: Blanc Nacré Multicouches
Interior: Noir Premium
VIN: LRW3...
Link: https://www.tesla.com/fr_fr/my/order/LRW3...

Technical Details

  • Data Storage: Uses GM_getValue/GM_setValue for persistent storage
  • API Interception: Intercepts both fetch and XMLHttpRequest responses
  • VIN Cleanup: Automatically removes VINs older than 24 hours from cache

Privacy

  • All credentials are stored locally in your browser
  • No data is sent to any third-party server (except ntfy.sh for notifications)
  • The script only runs on Tesla inventory pages

Troubleshooting

No notifications are received

  1. Check your ntfy.sh topic URL and token
  2. Double-click "Reset" to reconfigure credentials
  3. Check the browser console for errors

Script not loading

  1. Make sure Tampermonkey is installed and enabled
  2. Check that the script is enabled in Tampermonkey
  3. Verify the @match pattern includes your Tesla inventory URL

Duplicate notifications

The script caches VINs for 24 hours. If you receive duplicates:

  1. Click "Reset" to clear the VIN cache
  2. Check that auto-refresh is working properly

Development

File Structure

tesla-inventory-notifier/
├── tesla-notifier.user.js    # Main userscript
├── AGENTS.md                  # Development guidelines
└── README.md                  # This file

Making Changes

  1. Edit tesla-notifier.user.js
  2. Update the @version number in the header
  3. Test on a Tesla inventory page
  4. Commit your changes

License

GNU Affero General Public License v3.0 with additional clauses.

Key points:

  • Personal and non-commercial use permitted
  • Forks must retain license and attributions
  • Significant modifications must be proposed via Pull Request
  • Commercial use prohibited without written authorization

See LICENSE.md for full details.

Copyright © 2026 JordiMa (contact@jordimarzo.fr)

Contributing

Contributions are welcome! Please read CONTRIBUTING.md for details.

Key points:

  • Fork and create a branch for your changes
  • Submit Pull Requests for significant modifications
  • Follow the code style in AGENTS.md
  • Commercial use requires authorization

Contact: contact@jordimarzo.fr

About

No description, website, or topics provided.

Resources

Contributing

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages