Skip to content

Display your currently playing Spotify tracks on your pwnagotchi

License

Notifications You must be signed in to change notification settings

itsOwen/PwnSpotify

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 Cannot retrieve latest commit at this time.

History

8 Commits
 
 
 
 
 
 
 
 

Repository files navigation

๐ŸŽต PwnSpotify Plugin for Pwnagotchi

Turn your Pwnagotchi into a music companion! Display your currently playing Spotify tracks with a sleek scrolling animation. Now your Pwnagotchi listens to your playlist ๐ŸŽง

PwnSpotify Plugin

    โ”Œโ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”
    โ”‚    โŠ™    โŠ™       โ”‚
    โ”‚      โ–ผ          โ”‚
    โ”‚  โ™ซ Bohemian... >โ”‚
    โ””โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”€โ”˜

๐ŸŽฌ Demo

Watch the YouTube Shorts video

โœจ Features

  • ๐Ÿ”„ Real-time display of currently playing Spotify tracks
  • ๐Ÿ“ฑ Smooth scrolling text animation
  • ๐ŸŽฏ Configurable display position and scroll speed
  • ๐Ÿ” Automatic token refresh
  • ๐Ÿ’ช Robust error handling and reconnection
  • ๐ŸŽจ Clean and minimal UI integration

โœจ Upcoming Features

  • Control songs directly via your pwnagotchi.
  • More animations.
  • Pwnagotchi react to the songs!

๐Ÿ“‹ Prerequisites

  • Pwnagotchi with display
  • Active Spotify account
  • Spotify Developer Access
  • Internet connectivity for your Pwnagotchi

๐Ÿš€ Installation

  1. Copy the pwnspotify.py file to your Pwnagotchi plugins directory:
Figure it our yourself mate!

๐ŸŽฏ Spotify API Setup

  1. Visit the Spotify Developer Dashboard ๐ŸŒ

  2. Click Create an App

  3. Fill in the application details:

    • Name: Pwnagotchi Spotify
    • Description: Spotify integration for Pwnagotchi
    • Website: (optional)
    • Redirect URI: http://localhost:8080
  4. After creating the app, you'll get:

    • โญ Client ID
    • ๐Ÿ”‘ Client Secret
  5. Generate your authorization code:

    • Replace YOUR_CLIENT_ID in this URL and open it in your browser:
    https://accounts.spotify.com/authorize?client_id=YOUR_CLIENT_ID&response_type=code&redirect_uri=http://localhost:8080&scope=user-read-currently-playing
    
    • Log in and authorize the application
    • You'll be redirected to localhost:8080
    • Copy the code parameter from the URL (everything after code=)

โš™๏ธ Configuration

Add these lines to your /etc/pwnagotchi/config.toml:

main.plugins.pwnspotify.enabled = true
main.plugins.pwnspotify.client_id = "YOUR_CLIENT_ID"
main.plugins.pwnspotify.client_secret = "YOUR_CLIENT_SECRET"
main.plugins.pwnspotify.redirect_uri = "http://localhost:8080"
main.plugins.pwnspotify.auth_code = "YOUR_AUTH_CODE"

๐Ÿ› ๏ธ Optional Settings

main.plugins.pwnspotify.scroll_speed = 2          # Text scroll speed
main.plugins.pwnspotify.check_interval = 30       # How often to check for new tracks (seconds)
main.plugins.pwnspotify.retry_interval = 5        # Connection retry interval (seconds)
main.plugins.pwnspotify.display_position = [180, 100]  # Screen position [x, y]
main.plugins.pwnspotify.display_width = 12        # Number of characters to show
main.plugins.pwnspotify.static_display_time = 3   # Full text display duration (seconds)
main.plugins.pwnspotify.token_file = "/root/.spotify_tokens"  # Token storage location

๐ŸŽฎ Usage

  1. Restart your Pwnagotchi after configuration:
systemctl restart pwnagotchi
  1. The plugin will automatically:
    • ๐Ÿ”„ Connect to Spotify
    • ๐Ÿ’พ Handle token management
    • ๐Ÿ“ฑ Display your currently playing track

๐Ÿ” Display Format

  • Playing: โ™ซ Track Name - Artist
  • No track: No track playing
  • Connecting: Connecting to Spotify...

๐Ÿ› Troubleshooting

  1. No Display

    • Check if plugin is enabled in config
    • Verify Spotify credentials
    • Check Pwnagotchi logs
  2. Authorization Failed

    • Generate new auth code
    • Verify client ID and secret
    • Check redirect URI in Spotify dashboard
  3. Token Issues

    • Delete /root/.spotify_tokens
    • Restart Pwnagotchi
    • Plugin will generate new tokens

๐Ÿค Contributing

Feel free to:

  • ๐Ÿ› Report bugs
  • ๐Ÿ’ก Suggest features
  • ๐Ÿ”ง Submit pull requests

๐Ÿ“„ License

This project is licensed under MIT.

Made with โค๏ธ for the Pwnagotchi community

About

Display your currently playing Spotify tracks on your pwnagotchi

Topics

Resources

License

Stars

Watchers

Forks

Languages