{"id":19305944,"url":"https://github.com/alejandrosnz/esp-spotify-oled","last_synced_at":"2025-08-13T18:34:23.381Z","repository":{"id":261938859,"uuid":"885493481","full_name":"alejandrosnz/ESP-Spotify-OLED","owner":"alejandrosnz","description":"ESP8266/ESP32 Spotify OLED Display","archived":false,"fork":false,"pushed_at":"2024-12-22T22:17:24.000Z","size":2699,"stargazers_count":34,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-07-31T06:44:10.603Z","etag":null,"topics":["arduino","esp","esp32","esp8266","spotify","spotify-api","weather"],"latest_commit_sha":null,"homepage":"","language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/alejandrosnz.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2024-11-08T17:34:35.000Z","updated_at":"2025-07-05T08:51:38.000Z","dependencies_parsed_at":"2024-11-09T12:21:12.752Z","dependency_job_id":"5d6788d5-b949-426a-ada6-ff23a0af6d94","html_url":"https://github.com/alejandrosnz/ESP-Spotify-OLED","commit_stats":null,"previous_names":["alejandrosnz/esp-spotify-oled"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/alejandrosnz/ESP-Spotify-OLED","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrosnz%2FESP-Spotify-OLED","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrosnz%2FESP-Spotify-OLED/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrosnz%2FESP-Spotify-OLED/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrosnz%2FESP-Spotify-OLED/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/alejandrosnz","download_url":"https://codeload.github.com/alejandrosnz/ESP-Spotify-OLED/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/alejandrosnz%2FESP-Spotify-OLED/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":270288743,"owners_count":24558847,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-13T02:00:09.904Z","response_time":66,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["arduino","esp","esp32","esp8266","spotify","spotify-api","weather"],"created_at":"2024-11-10T00:03:24.102Z","updated_at":"2025-08-13T18:34:23.299Z","avatar_url":"https://github.com/alejandrosnz.png","language":"C","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ESP8266/ESP32 Spotify OLED Display\n\nThis project displays current Spotify playback information and weather data on an OLED display using an ESP8266 or ESP32.\n\n![Spotify OLED Display](images/esp-spotify-oled.png)\n\n\n## 🎵 Features\n\n- Shows current Spotify track information including:\n  - Song title\n  - Artist(s)\n  - Progress bar\n  - Play/pause status\n  - Elapsed/total time\n- When no music is playing, displays:\n  - Current time\n  - Current temperature\n  - Weather icon\n\n## 📋 Requirements\n\n### Hardware\n- ESP8266 or ESP32 (ex.: D1 Mini)\n- SH1106 OLED Display (128x64)\n\n### Connections\n- OLED SDA -\u003e D1\n- OLED SCL -\u003e D2\n- VCC -\u003e 3.3V\n- GND -\u003e GND\n\n### Arduino Libraries\nInstall the following libraries from the Arduino Library Manager:\n\n- Spotify API Arduino [(repo)](https://github.com/witnessmenow/spotify-api-arduino.git)\n- Adafruit GFX Library - 1.10.9 [(repo)](https://github.com/adafruit/Adafruit-GFX-Library)\n- Adafruit SH110X - 2.1.10 [(repo)](https://github.com/adafruit/Adafruit_SH110X.git)\n- ArduinoJson - 6.21.x [(docs)](https://arduinojson.org/v6/doc/installation/)\n- EzTime - 0.8.3 [(repo)](https://github.com/ropg/ezTime)\n\nYou can install the libraries using the Arduino IDE Library Manager (Tools \u003e Manage Libraries...) except for `Spotify API Arduino` which you need to install manually, download the [library repository](https://github.com/witnessmenow/spotify-api-arduino.git) as a ZIP and install it as an external library (Sketch \u003e Include Library \u003e Add .ZIP Library...).\n\n### Spotify API Credentials\n\nTo get your Spotify API credentials, follow these steps:\n\n1. Create a Spotify Developer Account:\n   - Go to [Spotify Developer Dashboard](https://developer.spotify.com/dashboard)\n   - Log in with your Spotify account or create one\n   - Accept the Terms of Service\n\n2. Create a new Application:\n   - Click \"Create an App\" \n   - Fill in the App name and description\n   - Accept the Terms of Service\n   - Click \"Create\"\n\n3. Get Client ID and Client Secret:\n   - Once created, you'll see your Client ID on the dashboard\n   - Click \"Show Client Secret\" to reveal your Client Secret\n   - Save both values, you'll need them for `secrets.h`\n\n4. Get Refresh Token:\n   - Visit the [Spotify Auth Token Generator](https://spotify-refresh-token-generator.netlify.app/)\n   - Enter your Client ID and Client Secret\n   - Leave the Redirect URI as-is\n   - Select the following Scopes:\n      - user-read-currently-playing\n      - user-read-playback-state\n   - Click \"Get Refresh Token\"\n   - Authorize the application when prompted\n   - Copy the generated Refresh Token\n\n5. Update `secrets.h`:\n   ```cpp\n   #define SPOTIFY_CLIENT_ID     \"your_client_id_here\"\n   #define SPOTIFY_CLIENT_SECRET \"your_client_secret_here\" \n   #define SPOTIFY_REFRESH_TOKEN \"your_refresh_token_here\"\n   ```\n\n### Weather API Credentials\n\nTo get your OpenWeatherMap API key, follow these steps:\n\n1. Create an OpenWeatherMap Account:\n   - Go to [OpenWeatherMap](https://openweathermap.org/)\n   - Click \"Sign Up\" and create a free account\n   - Verify your email address\n\n2. Get your API Key:\n   - Log in to your account\n   - Go to your profile menu (top right) and click \"My API Keys\"\n   - You'll find your default API key there\n   - Or generate a new key by entering a name and clicking \"Generate\"\n\n3. Update `secrets.h`:\n   ```cpp\n   #define WEATHER_API_KEY \"your_api_key_here\"\n   ```\n\n## 🔧 How to Compile\n\n1. Install all required libraries as described above\n\n2. In Arduino IDE:\n   - Select your board:\n     - For ESP8266: Tools \u003e Board \u003e ESP8266 Boards \u003e [Your ESP Board]\n     - For ESP32: Tools \u003e Board \u003e ESP32 Arduino \u003e [Your ESP Board]\n\n3. Create the required configuration files:\n   - Update `secrets.h` with your WiFi, Spotify and Weather API credentials\n   - Update `config.h` with your Spotify country market code, Timezone code and weather location\n\n4. Verify library dependencies:\n   ```cpp\n   #include \u003cSpotifyArduino.h\u003e\n   #include \u003cSpotifyArduinoCert.h\u003e\n   #include \u003cAdafruit_SH110X.h\u003e\n   #include \u003cezTime.h\u003e\n   ```\n   If you see any errors, double-check that all libraries are properly installed\n\n5. Connect your ESP8266/ESP32 to your computer\n\n6. Select the correct port in Arduino IDE:\n   - Tools \u003e Port \u003e [Your ESP Port]\n\n7. Click the \"Upload\" button or use Sketch \u003e Upload\n\n8. Monitor the upload process in the IDE's console\n\n## 📦 3D Model\n\nYou can find the 3D model used for this project [here](https://www.printables.com/model/1098419-terminal-for-ssd1106-13-oled-remix).\n\n## 🛠️ Troubleshooting\n\nIf you encounter issues while using the ESP8266/ESP32 Spotify OLED Display, here are some common problems and their solutions:\n\n1. **OLED Display Not Turning On**:\n   - Ensure that the connections (SDA, SCL, VCC, GND) are correct and secure.\n   - Check if the OLED display is powered properly.\n\n2. **Spotify API Credentials Not Working**:\n   - Double-check that you have entered the correct Client ID, Client Secret, and Refresh Token in `secrets.h`.\n   - Ensure that the application has the necessary permissions and scopes enabled.\n\n3. **Weather Data Not Displaying**:\n   - Verify that your OpenWeatherMap API key is correct and active.\n   - Check your internet connection; the ESP8266/ESP32 needs to be connected to WiFi to fetch weather data.\n\n4. **Compilation Errors**:\n   - Make sure all required libraries are installed correctly.\n   - Check for any typos in your code or configuration files.\n\n5. **No Music Playing Information**:\n   - Ensure that the Spotify account is active and that the device is playing music.\n   - Verify that the correct scopes are set in the Spotify API settings.\n\n6. **Token too long error**:\n   - This error may occur if you have selected too many scopes when generating the Spotify refresh token.\n   - Re-generate the refresh token selecting only the required scopes (user-read-currently-playing and user-read-playback-state)\n   - The generated refresh token should be around 130-140 chars long\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrosnz%2Fesp-spotify-oled","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Falejandrosnz%2Fesp-spotify-oled","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Falejandrosnz%2Fesp-spotify-oled/lists"}